Drawing labels and ticks on the axis in case of series lack
Drawing labels and ticks on the axis in case of series lack
Hello, is it possible to show ticks and labels on the axis when seriries associated with the axis are invisible, or are absent. Generaly, i want one custom axis for one line, and i want to have ability to hide this line, without hiding axis, but when i do it, all the labels and dick disappearars. what should i do to fix this disappearing?
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Drawing labels and ticks on the axis in case of series lack
You could use the Series.Transparency property, e.g.Petr wrote:Hello, is it possible to show ticks and labels on the axis when seriries associated with the axis are invisible, or are absent. Generaly, i want one custom axis for one line, and i want to have ability to hide this line, without hiding axis, but when i do it, all the labels and dick disappearars. what should i do to fix this disappearing?
Code: Select all
private void InitializeChart()
{
tChart1.Series.Add(typeof(Bar)).FillSampleValues();
}
private void button1_Click(object sender, EventArgs e)
{
//tChart1[0].Visible = !tChart1[0].Visible;
tChart1[0].Transparency = tChart1[0].Transparency == 0 ? 100 : 0;
}
Best Regards,
Christopher Ireland / 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 |
Re: Drawing labels and ticks on the axis in case of series lack
Hi Christopher, unfrtunately that doesn't helps. let me try to explain you on example.In attachement there are two pics, on the "active axis.png" you can see the situation than all axes are active( active means that line is visible ). In this case axis has the same color as line and have labels and marks on it ( so, it's scaled ). On the second pic, called "inactive axis.png" you can see the situation i want to modify, the first plot is invisible now( you can see it's uncheked ), so the first axis is inactive, that means that should become gray with saving all the marks and labels on it. As you can see it's gray, but, there are no labels and ticks on it. So what should i do to set it back?
- Attachments
-
- inactive axis..png (141.78 KiB) Viewed 7853 times
-
- active axis..png (102.55 KiB) Viewed 7855 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Drawing labels and ticks on the axis in case of series lack
I think I understand your situation. What I don't understand is why you cannot set the Series.Transparency property to 100 instead of setting the Series.Active/Visible property to false when you uncheck the checkbox. The issue is here that axis labels and ticks will only be drawn if a series is associated to the axis, and setting the Series.Active/Visible property to false disassociates the series from the axis. The only way, therefore, to have the series invisible but the axis labels and ticks visible is to keep the series associated to the axis, that is, keep the Series.Active/Visible property set to true, but to set the Series.Transparency to 100.Petr wrote:Hi Christopher, unfrtunately that doesn't helps. let me try to explain you on example.In attachement there are two pics, on the "active axis.png" you can see the situation than all axes are active( active means that line is visible ). In this case axis has the same color as line and have labels and marks on it ( so, it's scaled ). On the second pic, called "inactive axis.png" you can see the situation i want to modify, the first plot is invisible now( you can see it's uncheked ), so the first axis is inactive, that means that should become gray with saving all the marks and labels on it. As you can see it's gray, but, there are no labels and ticks on it. So what should i do to set it back?
Best Regards,
Christopher Ireland / 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 |
Re: Drawing labels and ticks on the axis in case of series lack
Thanks a lot, setting transparency to series solved this problem.