This is a migrated thread and some comments may be shown as answers.

Line chart - Blank space in left and right side

1 Answer 245 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Satish
Top achievements
Rank 1
Satish asked on 25 Aug 2011, 07:55 PM
Hi,

I am using the line chart to display about 1000 points (could be more), so I thought I would use the inbuilt scrolling feature and everything looked perfect for less data points (for about 250) but when the number increased the vertical grid lines and the X-Axis labels were so close to each other it become  unreadable. (please find the attached telerik.jpg)

So we tried setting the width dynamically based on the number of data points and wrap it within a div with scrolling, it works but the problem is that the generated image has a blank space in the left & right side.. (please find the attached telerik2.png).

Questions:
1. How to dynamically set the distance between the Grid Lines so that they don;t render closer (for option 1 discussed above)
2. How to remove the blank spaces (for option 2 discussed)
3. Is there any other option or setting, I should consider?

I really appreciate your help on this..

Thanks
Sathish



  

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 30 Aug 2011, 08:45 AM
Hello Satish,

Onto your questions:
  1. The axes in RadChart expose a property for controlling how many labels will be shown -- LabelStep (RadChart1.PlotArea.XAxis.LabelStep). A value of 2 means every second label is shown, for 3 -- only every third label will be shown. The ticks and gridlines which correspond to the hidden labels will be hidden too. You will have to define the value for this property dynamically, based on the number of items in the chart.
  2. RadChart sets some values by default, but when the size gets bigger the margins get bigger too. You can control that space through the RadChart.PlotArea.Margins property. You can find more details in this help topic.
  3. Both approaches mentioned above should deal with the problem. I don't think there are any alternatives that should be considered here.

Best regards,
Ves
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
General Discussions
Asked by
Satish
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or