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

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

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

5 Replies

SK Sanjith Kesavan Syncfusion Team April 11, 2016 12:48 PM UTC

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: https://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.



OS OSubachev April 12, 2016 07:35 AM UTC

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


OS OSubachev April 12, 2016 07:46 AM UTC

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


OS OSubachev April 12, 2016 10:01 AM UTC

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

Oleg Subachev

Attachment: popular.Results.svg_d87543ac.rar


SK Sanjith Kesavan Syncfusion Team April 13, 2016 12:31 PM UTC

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:
https://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.



Loader.
Live Chat Icon For mobile
Up arrow icon