Remove empty gridlines

Hi

Is it possible to remove empty grid lines with no data? 

Attached is a sample PPTX file with an example


Attachment: Grid_lines.pptx_128f50e3.zip

6 Replies 1 reply marked as answer

MR Manikandan Ravichandran Syncfusion Team February 16, 2022 11:38 AM UTC

Hi Moran,

If you want to remove the gridlines in the chart, you can use the below code example. 
chart.PrimaryValueAxis.HasMajorGridLines = false; 

If you want to show the gridlines only when primary value axis has data means, then you can adjust the limit of the primary value axis by using the below code example. 
chart.PrimaryValueAxis.MinimumValue = 1;
chart.PrimaryValueAxis.MaximumValue = 3;
 

Please find the output screenshot from below.


Please complete sample from the below link.
https://www.syncfusion.com/downloads/support/forum/172911/ze/ConsoleApp3.1_F172911-258368402

Regards,
Manikandan Ravichandran
 



MM Moran Monovich February 17, 2022 02:50 PM UTC

Thanks. Is there a way to close the gap between the grid lines in the chart?

Screen Shot 2022-02-17 at 11.49.25.png



MR Manikandan Ravichandran Syncfusion Team February 18, 2022 02:50 PM UTC

Hi Moran,

We have tried to reduce the gap between 2 primary value axes in Microsoft PowerPoint application and we unable to reduce the gab directly. Likewise, we are not able to reduce the gab.

We can only reduce the size only by reduce the chart height or increase the primary value axis maximum value in the chart.

Please refer the code example from below 
// for dislikes chart
chart.Height = 200; 
……...
………
………
…….…
// for likes chart
chart.Height = 300; 

Please refer the output from below


Regards,
Manikandan Ravichandran 


Marked as answer

MM Moran Monovich replied to Manikandan Ravichandran March 8, 2022 01:36 PM UTC

Hi 

I am having an issue with an edge case when I have a product with only one topic like this:

When I try to set the following code:

chart.PrimaryValueAxis.MaximumValue = 1;

I get an exception. When I try to set the property to "auto" I get 2 lines

chart.PrimaryValueAxis.IsAutoMax = true;


LB Lokesh Baskar Syncfusion Team March 9, 2022 11:46 PM UTC

Hi Moran,

Currently, we are checking the problem and share the further details on 10th March 2022.

Regards,
Lokesh B




LB Lokesh Baskar Syncfusion Team March 10, 2022 03:18 PM UTC

Hi Moran,

We have tried to reproduce reported exception problem after set the PrimaryValueAxis.MaximumValue  but, it works properly at our end. For your reference, we have attached the sample application which we used to reproduce the reported issue and it can be downloaded from the below link.

https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample-724887217.zip   

We suspect that the reported issue might be due to file level information of the PPTX document. So, could you please share the Input PPTX documents used at your end.
This will be more helpful to reproduce the same issue at our end. Thereby, we will proceed further on the reported issue and provide you with the appropriate solution at the earliest.
 

Regards, 
Lokesh B 


Loader.
Up arrow icon