Winnovative control offers the possibility to customize the following properties:
- display grid lines
- change axis labels color and font
- change axis line thickness and color
- change axis display range
- change axis tickmarks interval
- change the space between the axis and the edge of the chart
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebChart1.DataSource = Winnovative.DataSources.GetTestData2();
// display grid lines
WebChart1.Axis.Y.MajorGridLines.Visible = true;
WebChart1.Axis.Y.MajorGridLines.Color = Color.Gray;
// change axis labels color and font
WebChart1.Axis.X.LabelsColor = Color.Green;
WebChart1.Axis.Y.LabelsColor = Color.Red;
WebChart1.Axis.Y.LabelsFont = new Font("Verdana", 8);
// change axis line thickness and color
WebChart1.Axis.Y.Size = 1;
WebChart1.Axis.Y.Color = Color.Blue;
WebChart1.Axis.X.Size = 1;
WebChart1.Axis.X.Color = Color.Blue;
// change axis display range
WebChart1.Axis.Y.ScaleRange.Type = Winnovative.ScaleRangeType.UserDefined;
WebChart1.Axis.Y.ScaleRange.ValueLow = 40;
WebChart1.Axis.Y.ScaleRange.ValueHigh = 320;
// change axis tickmarks interval
WebChart1.Axis.Y.Ticks.Type = Winnovative.TicksType.UserDefined;
WebChart1.Axis.Y.Ticks.Interval = 20;
// change the space between the axis and the edge of the chart
WebChart1.Axis.X.Space = 50;
WebChart1.Axis.Y.Space = 25;
}
}