ExpertPDF Components: .NET Chart Control

WebChart Chart Legend

Learn how you can change the settings of the chart legend box.

Chart Legend

ExpertChart control offers the possibility to display a legend of the data series. You can change the position (left, right, top or bottom), font, color, margins, border and other properties.

100 100 200 200 110 170 300 140 290 100 60 100 300 160 120 200 120 190 For more information visit www.chartingcontrol.net

Source code

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WebChart1.DataSource = ExpertChart.Demo.DataSources.GetTestData2();
 
            WebChart1.LegendBox.Visible = true;
            WebChart1.LegendBox.Font = new System.Drawing.Font("Verdana", 8);
            WebChart1.LegendBox.Color = Color.Blue;
            WebChart1.LegendBox.BorderSize = 1;
            WebChart1.LegendBox.Margins.Bottom = 300;
 
        }
    }

Copyright 2008. ExpertComponents.com ChartingControl.NET.