We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Layout of Chart Elements

I am coding a UserCotrol containing an Area Chart.
I want to show only graph, no axis labels, no axis ticks.
Can I stretch ChartArea to the border of the Chart, eliminating any margin or padding?
Similary, can I stretch the Series the entire UserControl Area?



3 Replies

PJ Pavithra J Syncfusion Team December 5, 2008 12:35 PM UTC

Thankyou for using Syncfusion Products.

Labels can be removed by setting the property LabelsMode="None" for both primary and the secondary axis.

Once you set this property the ticks in the ChartArea will automatically get removed. The explicit way to remove the ticks is by setting the property SmallTicksPerInterval="0" for ChartAxis.

You can make the ChartArea to stretch towards the border by setting the Margin Property of ChartArea to appropriate value.

For your reference I have created a sample and you can download from the link,

http://websamples.syncfusion.com/samples/WPF/F78248/main.htm

Please let us know if you have any queries.

Thanks



SA Saradha Syncfusion Team December 5, 2008 02:13 PM UTC

Hi Joseph,

Labels can be removed by setting the property LabelsMode="None" for both primary and the secondary axis.

Once you set this property the ticks in the ChartArea will automatically get removed. The explicit way to remove the ticks is by setting the property SmallTicksPerInterval="0" for ChartAxis.

You can make the ChartArea and chart to stretch by setting the Margin property to appropriate value.

Please refer to the sample that shows this behavior and let me know if this fulfils your requirement.

Regards,
K. Saradha Devi.




ChartUsercontrol_d28c5898.zip


AD Administrator Syncfusion Team December 5, 2008 02:35 PM UTC

Thank you all, pavithra and K. Saradha Devi.:

Your example sources are valuable and working perfect as I want.
I had thought that the Margin should be zero (0) to stretch up to the container.

Thank you very much for your help,
Joseph


Loader.
Live Chat Icon For mobile
Up arrow icon