Zero line more evident on Y axis..

Hi,

I'm trying to achieve this result:


(it is just a screenshot, I've drawn the red line manually on it).

I want to draw a line at zero coordinate or to make the zero grid line more evident.

I've tried with striplines:

                            <ChartStriplines>

                                <ChartStripline ZIndex="ZIndex.Over" Start="0" End="1" Color="Red" />

                            </ChartStriplines>

But start and end values are based on the Y scale, that it is not fixed and it is in millions.

Is there another solution?

Thanks.



3 Replies

DG Durga Gopalakrishnan Syncfusion Team July 9, 2021 02:25 PM UTC

Hi Maurizio, 

Greetings from Syncfusion. 

We request you to enable Visible property for striplines. We have prepared sample based on your requirement and attached for your reference. Please check with below snippet and sample. 

<SfChart> 
    <ChartPrimaryYAxis> 
        <ChartStriplines> 
            <ChartStripline Start="0" End="0.05" ZIndex="ZIndex.Over" Color="red" Visible="true"></ChartStripline> 
        </ChartStriplines> 
    </ChartPrimaryYAxis> 
</SfChart> 


 


Please revert us if you have any concerns. 

Regards, 
Durga G 



MZ maurizio ziraldo July 12, 2021 07:09 AM UTC

Hi,


thanks for the example but my case is more similar to the one attached. 


The scale can be in millions or thousands or other. It's not fixed, so start/end values of the stripline can be different.


If to draw a line you need to use striplines, I think I should find a formula to calculate End value based on max/min of the scale.


Any other suggestions?



Attachment: Striplinemodified_53e0177a.zip


DG Durga Gopalakrishnan Syncfusion Team July 13, 2021 03:22 PM UTC

Hi Maurizio, 

Yes, by default Y axis stripline height is calculated based on y values specified in the chart series points. If y values differs, then stripline end value also need to be changed based on provided y value.  

Regards, 
Durga G 


Loader.
Up arrow icon