Blazor | ComponentOne
Controls / FlexChart / Elements / Legend
In This Topic
    Legend
    In This Topic

    Legend is a chart element which displays a list of colors, symbols and text corresponding to each data series drawn on that chart. It helps in understanding and analyzing the plotted data in the case of multiple series. FlexChart provides the option to display legend for denoting the type of data plotted on the axes. By default, the position of legend is set to Auto, which lets the legend position itself automatically depending on the available space. However, you can also set it to display at top, bottom, left or right with respect to the plot area by setting the LegendPosition property using the Position enumeration. Along with the position, you can also play around with various other properties of the legend, such as LegendToggle and LegendStyle. The LegendToggle property allows you to toggle the series visibility on clicking a legend in the chart and the LegendStyle property is used to style the legend.

    Legend

    The following code example demonstrates how to set various legend properties in the FlexChart. This example uses the sample created in the Quick Start section.

    Razor
    Copy Code
    LegendPosition="Position.Bottom" LegendStyle="font-size:18px" LegendToggle="true"