Showing "fixed lines" with no data points in chart

How may I create the fixed line showing in this example?

Thinking of daily average and today lines in the picture below.
Is is possible to share the code behind the entire "health stat" demo?

Image_5562_1693167071018


3 Replies 1 reply marked as answer

GV Gopalakrishnan Veeraraghavan Syncfusion Team August 28, 2023 02:51 PM UTC

Hi Art Vandelay,


We have analyzed your query regarding fixed lines with no data points in the chart. You can render the fixed lines with text using ChartStripline. Additionally, we have also shared the code behind for the health stats demo. You can refer to the code sample through the GitHub repository provided below. We have attached a sample and screenshot for your reference. Please check the following code snippet.


GitHub repository: https://github.com/syncfusion/blazor-showcase-healthtracker



<ChartPrimaryYAxis Minimum="0" Maximum="3.5" Interval="0.5">

        <ChartStriplines>

            <ChartStripline DashArray="20,20" SizeType="SizeType.Pixel" Text="2.5 avg. hours" HorizontalAlignment="Anchor.Start" VerticalAlignment="Anchor.End" Start="2.5" Color="#3a69d3">

                <ChartStriplineTextStyle Size="15px" Color="#3a69d3" />

            </ChartStripline>

            <ChartStripline DashArray="20,20" SizeType="SizeType.Pixel" Text="1.5 hours" HorizontalAlignment="Anchor.Start" VerticalAlignment="Anchor.End" Start="1.5" Color="brown">

                <ChartStriplineTextStyle Size="15px" Color="#3a69d3" />

            </ChartStripline>

        </ChartStriplines>

  </ChartPrimaryYAxis>


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BLA15F~11124328798.zip


Screenshot:

A screenshot of a graph

Description automatically generated



UG for Stripline: https://blazor.syncfusion.com/documentation/chart/strip-line#horizontal-striplines


Kindly revert us if you have any concerns.


Regards,

Gopalakrishnan Veeraraghavan


Marked as answer

AV Art Vandelay August 28, 2023 06:50 PM UTC

Thank you, Gopalakrishnan Veeraraghavan,

Most appreciated



GV Gopalakrishnan Veeraraghavan Syncfusion Team August 29, 2023 09:28 AM UTC

Hi Art Vandelay,


Most welcome. Please get back to us if you need any further assistance. We are always happy in assisting you.


Regards,

Gopalakrishnan Veeraraghavan


Loader.
Up arrow icon