Legend not displaying

Hi,

I cannot get chart legend to display on any of my charts, below is an example of code used, what am i missing?

<SfChart Width="100%" Title="Tickets Logged Overall">

    <ChartPrimaryXAxis Title="Week" ValueType="Syncfusion.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>

    <ChartPrimaryYAxis Title="Tickets Logged"></ChartPrimaryYAxis>

    <ChartSeriesCollection>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Request" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Advice" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Incident" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>

    </ChartSeriesCollection>
    <ChartLegendSettings Visible="true" Position="LegendPosition.Bottom"></ChartLegendSettings>
</SfChart>

2 Replies

MA Martin replied to Martin January 28, 2021 09:00 PM UTC

Hi,

I cannot get chart legend to display on any of my charts, below is an example of code used, what am i missing?

<SfChart Width="100%" Title="Tickets Logged Overall">

    <ChartPrimaryXAxis Title="Week" ValueType="Syncfusion.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>

    <ChartPrimaryYAxis Title="Tickets Logged"></ChartPrimaryYAxis>

    <ChartSeriesCollection>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Request" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Advice" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>
        <ChartSeries DataSource="@tickets_byweek" XName="Week" YName="Incident" Type="ChartSeriesType.StackingColumn">
            <ChartMarker>
                <ChartDataLabel Visible="true"></ChartDataLabel>
            </ChartMarker>
        </ChartSeries>

    </ChartSeriesCollection>
    <ChartLegendSettings Visible="true" Position="LegendPosition.Bottom"></ChartLegendSettings>
</SfChart>

Please ignore this request, I noticed I hadn't named my columns. The legend is now displaying. 



SM Srihari Muthukaruppan Syncfusion Team January 29, 2021 04:32 AM UTC

Hi Martin, 
 
We are glad to know that the issue is resolved. Kindly get in touch with us, if you requires further assistance. We are always happy in assisting you.   
   
Thanks,   
Srihari M 


Loader.
Up arrow icon