Chart - Styling

The Chart component supports color palettes, axis configuration, and legend customization — the same styling options available in ASP.NET Web Forms.

Color Palettes

Use the Palette property to set a color scheme. Available palettes: BrightPastel, Berry, Chocolate, EarthTones, Excel, Fire, Grayscale, Light, Pastel, SeaGreen, SemiTransparent.

BrightPastel (Default)

Berry

Fire

SeaGreen


Axis Configuration

Configure axis titles, minimum/maximum values, and intervals using the Axis class.

<ChartArea Name="TempArea"
    AxisX="@(new Axis { Title = "Time of Day" })"
    AxisY="@(new Axis { Title = "Temperature (°F)", Minimum = 50, Maximum = 100, Interval = 10 })" />

More Palette Examples

Chocolate

Excel

Grayscale

Pastel


Custom Series Colors

Override the palette for individual series using the Color property with a WebColor.

<ChartSeries Name="Actual"
    ChartType="SeriesChartType.Column"
    Color="WebColor.DodgerBlue"
    Points="@actualData" />
<ChartSeries Name="Target"
    ChartType="SeriesChartType.Line"
    Color="WebColor.OrangeRed"
    Points="@targetData" />