How do I make the line in my line chart take use the entire chart area for plotting purposes? I have already set the Extent of the X and Y axes to be 0. I have no Title. But there is still whitespace.
I have attached a picture of 4 charts (with sample data). The whitespace I want to eliminate is that between the dark X and Y axes and the border of the chart control. How do I do this?
Thank you.
Hi Robert,
Setting the Extent properties for both the X and Y axis to the minimum value of zero, will minimize the amount of whitespace present on the line chart.
After viewing your screenshots; however, the charts do not appear to demonstrating this behavior. How are you implementing these charts? As they appear to be displayed within the context of an UltraTilePanel.
Testing this scenario with the extent set to zero for both axes, I have observed the expected behavior; which I have included a screenshot of below for reference.
Note: I have attached this sample for reference.
It may be possible that there is some other code in your sample that is overriding this setting’s expected behavior. If possible, please provide a sample where this anomaly is produced or further context so that I may guide you further.
If you have any further questions in the meantime, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
I did have Extent = 0 for both axes in my original picture. I am using the builtin FlowLayoutPanel to put these graphs side-by-side. Attached is a new picture of the latest (with sample data). While your example graph does not appear to have much whitespace, I am curious why I still have so much. My FlowLayoutControl has a height of 408 and width of 828 in the new attached picture. therefore, each individual graph of mine has a width of about 160. The whitespace visually looks like it takes up about 1/8 of the size of the plot area, so that would mean that the whitespace has a width of 10 on each side of the actual plot area.
Your graphs may look the same as mine, except that as I shrink my charts to be very small, there is still this minimum of about 10 width of whitespace on each side. that remains. I will attach a 2nd picture to show this.
Is there anyway to entirely remove the whitespace so that the linechart can literally take up the entire visual space of the chart up to its outside border? Thank you.
Your definitely welcome. The maximum amount of white space that can be removed from the chart’s surface is that achieved by setting both axis extents to the minimum value; using this approach, you will be effectively removing the maximum amount of white space that is supported by the LineChart.
If you have any further questions, please let me know.
Wrong picture.
Forgot to add the picture.
Chris,
Thank you for this. Your have basically replicated what i put together, and you are correct that I am creating my graphs programmatically. We are both setting the Extent of X and Y axis to zero for every chart, and indeed when I put your form side-by-side with my form, it shows that your charts have the same amount of whitespace that my charts do. I have attached a picture to show this.
I would like to eliminate this whitespace - perhaps the way to do it is with the extended properties that you mention. How do I set those? I don't see any such settings in your current project. Thank you.
It appears that you may be creating multiple instances of the chart programmatically; it will be necessary to set the extent for each chart instance discretely.
I have created another sample to better replicate your scenario, implementing the FlowLayoutPanel control; please find this new sample attached, where the expected behavior is achieved, for reference on the necessary approach.
I have included the following screen shot for reference which illustrates the result of this approach.
Further, modifying the extend property for both axes will indeed remove the maximum supported amount of white space from the charts margins.
Please take a look at the new sample and if possible, please modify it to more closely match your current approach if necessary, so that this behavior may be produced.
If you have any further questions at all in the meantime that I may assist you with, please let me know.