Hi,
Many thanks for the teams help for getting me going on my chart as detailed here http://ko.infragistics.com/community/forums/t/92741.aspx
The team helped provide an example solution that I've now managed to incorporate into my own solution. It looks as follows:
I've adapted the code to use a CategoryDateTimeXAxis for the contact data. What I'd like to do is show date values against the x axis and also close up the white space between the -6 Y axis value and the strokes on the x axis.
I've constructed my x axis as follows but I'm obviously missing something:
Dim categoryX As CategoryDateTimeXAxis = New CategoryDateTimeXAxis() categoryX.DateTimeMemberPath = "ActivityDate" categoryX.DisplayType = TimeAxisDisplayType.Continuous categoryX.LabelExtent = 30 categoryX.LabelsVisible = TruecategoryX.LabelFontSize = 8categoryX.Interval = New TimeSpan(7, 0, 0, 0) categoryX.Label = "ActivityDate" categoryX.DataSource = posContacts categoryX.MajorStroke = Brushes.Transparent categoryX.MinorStroke = Brushes.Transparent categoryX.Stroke = Brushes.Black categoryX.StrokeThickness = 2
Your help, as ever, will be much appreciated.
Many thanks,
Nathan
Hello Nathan,
I apologize. I have found that setting the labelextent to zero reduces the gap. Setting it to 30 or even 10 will keep a noticeable gap.
Hi Michael,
If you look at the images below you'll see the LabelExtent doesn't reduce the gap.
This one is with it set to 10
The following is set to 30:
This final one, which is the ideal position for the labels is set to 50
You'll note from each picture that the gap between the chart and the labels does change slightly, but the chart itself shrinks. The gap between the chart and the x axis stroke lines remain constant. It's that big blank space that the arrows are pointing to is the area I'd like reduced.
Kind regards,
The distance between the edge of the chart and the labels of the x axis can be set by the LabelExtent property.
eg.
var axis = new NumericXAxis();axis.LabelExtent = 0;
Let me know if you have any questions regarding this matter.
Hi Mike,
Thanks for looking into it.
There's nothing else required, that is the last piece of the puzzle.
Hi Nathan,
I am looking into this for you. I plan to provide you with some sample code that you can add to your project to control the spacing of the axis. Please let me know if you have any more information for me while I am researching.