When you do the following,
AxisLabelItem myLabel = new AxisLabelItem();
myLabel.Color = (blah, blah, blah ....)
...
Chart.Axes.Bottom.Labels.Items.Add(myLabel);
you get an exception on the paint event.
The internal iAxisLabelsItems is not being set during this type of Add.
Adding custom label doesn't initialize properly
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi davidh,
Thanks for reporting,
We have fixed this issue and we expect to have a new maintenance release ready before the end of this week. You should use something like this:
Thanks for reporting,
We have fixed this issue and we expect to have a new maintenance release ready before the end of this week. You should use something like this:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
line1.FillSampleValues();
tChart1.Axes.Bottom.Labels.Items.Clear();
AxisLabelItem myLabel = new AxisLabelItem(tChart1.Chart);
myLabel.Transparent = false;
myLabel.Color = Color.Red;
myLabel.Value = 10;
tChart1.Axes.Bottom.Labels.Items.Add(myLabel);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |