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.
Unfortunately, activation email could not send to your email. Please try again.

How to get rid of empty areas at top and bottom of chart ?

Thread ID:

Created:

Updated:

Platform:

Replies:

123674 Apr 9,2016 02:48 AM Apr 13,2016 08:31 AM Windows Forms 5
loading
Tags: Chart
OSubachev
Asked On April 9, 2016 02:48 AM

When producing chart image I get empty areas at top and bottom of chart (see attached file).
I don't need these areas.
How to get rid of them ?

Attachment: text.Results.svg_e5d21b7f.rar

Sanjith Kesavan [Syncfusion]
Replied On April 11, 2016 08:48 AM

Hi Oleg Subachev,

Thanks for contacting Syncfusion support. We have analyzed your query and replicated the scenario in our sample. But we can’t reproduce the reported issue. Chart is exported exactly like how it is rendered. Please find the below screenshot of the chart while rendering.




If the export button is clicked, then chart is exported to SVG. Please find the below screenshot, while export the chart to SVG



Space given at the top of the chart may occur because of “RangePadding”.  Please ensure whether you have set “RangePaddingType” as “Calculate”. Because this “RangePadding” will add one more interval space at the top of chart. To avoid this space, please set the “RangePaddingType” as “None” for primaryYAxis. Please follow the below code example.

[CS]
chart.PrimaryYAxis.RangePaddingType = ChartAxisRangePaddingType.None;


Now the chart will render like below.



Please find the below screenshot, while exporting the chart to SVG format.



In the below link, we have attached sample for your reference.
Sample link: http://www.syncfusion.com/downloads/support/forum/123674/ze/Sample-1380658607

If you still face any concern, kindly let us know by modifying the attached sample along with replication procedure. Or please provide the sample in which reported issue is reproduced. This will be helpful for us to find and fix the issue sooner.


Regards,
Sanjith.


OSubachev
Replied On April 12, 2016 03:35 AM

Thank you, Sanjith:

I generate chart image from console application solely in code without any visual representation.
Setting “RangePaddingType” as “None” for primaryYAxis helps with empty space at the top of the chart.
But at the bottom empty space remains.
How to remove it ?

Oleg Subachev

Attachment: text.Results.svg_667594b2.rar

OSubachev
Replied On April 12, 2016 03:46 AM

Sanjith:

But another input data produce empty space at the top again (as well as at the bottom).
What's wrong ?

Oleg Subachev

Attachment: scans.Results.svg_f6efe709.rar

OSubachev
Replied On April 12, 2016 06:01 AM

And moreover for large input data.
Particularly for bottom of the chart :-(

Oleg Subachev

Attachment: popular.Results.svg_d87543ac.rar

Sanjith Kesavan [Syncfusion]
Replied On April 13, 2016 08:31 AM

Hi Oleg,

We have analyzed your query and replicated the scenario in our sample. If we add new point at the top of the chart for avoid clipping of the bar, padding is added at the top of the chart. Please find the below screenshot before adding the point at the top

Screenshot of the chart after adding point at the top.


If the padding is not added, then some of the bars will be clipped. In your case, very large space is added at the top and the bottom. This issue is not reproduced at our end. In the below link, we have attached the sample for your reference. 

Sample link:
http://www.syncfusion.com/downloads/support/forum/123674/ze/Console_application1258860913

Please revert us the modified sample along with the replication procedure and detail about your current Essential Studio version to reproduce the reported issue, or else please provide us the sample in which the reported issue is reproduced.

Regards,

Sanjith.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;