How to Hide the Border of a Spline Chart

I've turned all of the grid lines off of the chart, but I can't seem to figure out how to get rid of the gray border around the chart itself. I want nothing but the line to be displayed. How do I toggle this off?


<SfChart Height="100px" Width="450px" >

                        <ChartBorder Color="#fff" />

                        <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.DateTime" LabelFormat="ddd" Visible="false"></ChartPrimaryXAxis>

                        <ChartPrimaryYAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Double" Visible="false"></ChartPrimaryYAxis>


                        <ChartTooltipSettings Enable="true"></ChartTooltipSettings>


                        <ChartSeriesCollection>

                            <ChartSeries DataSource="@Ratios"

                                         XName="ReportDate"

                                         YName="Ratio"

                                         Type="ChartSeriesType.Spline"

                                         Fill="@(LineColor())">

                                <ChartMarker Visible="true" Height="10" Width="10" />

                            </ChartSeries>

                        </ChartSeriesCollection>

                    </SfChart>


1 Reply

DG Durga Gopalakrishnan Syncfusion Team April 20, 2022 03:18 PM UTC

Hi Brian,


Greetings from Syncfusion.


We suggest you to specify Width as 0 for ChartAreaBorder to hide the border around the chart. We have prepared sample based on your requirement. Please check with the below snippet and sample.


<SfChart>

     <ChartArea>

        <ChartAreaBorder Width="0" />

    </ChartArea>

</SfChart>



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


UG : https://blazor.syncfusion.com/documentation/chart/chart-appearance#chart-area-customization


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon