Excuse me, how do I customize the settings for the Y axis scale, for example, I have a linear graph, as follows:
In this chart, I focus on the identification of the data for the "1", "2" of the data is secondary, but the "2" of the data accounted for most of the region. I want to achieve the "1" of the data in the display of the majority of the region, and the corresponding reduction of the "2" region. That is, in the "2" area (0-16), the interval of the Y axis scale is 4, while in the "1" area (16-22), the Y axis scale is 1. How to achieve this function. Thank you!
Set the interval between the Y axis scale
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Set the interval between the Y axis scale
Hi csi,
I'm not sure to understand your request correctly. You'd like to have different sections in an axis with different increment values and therefore different labels and ticks. Is that correct? That being the case, the only option I can think of to achieve that is using the GetAxisLabel event, for example:
I'm not sure to understand your request correctly. You'd like to have different sections in an axis with different increment values and therefore different labels and ticks. Is that correct? That being the case, the only option I can think of to achieve that is using the GetAxisLabel event, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Series.Add(new Steema.TeeChart.Styles.Line());
for (int i = 0; i < 100; i++)
{
tChart1[0].Add(i);
}
tChart1.GetAxisLabel += TChart1_GetAxisLabel;
}
private void TChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender.Equals(tChart1.Axes.Left))
{
double tmp = Convert.ToDouble(e.LabelText);
if ((tmp > 60) && (tmp % 4 != 0))
{
e.LabelText = "";
}
}
}
Last edited by Narcís on Thu Aug 27, 2015 7:23 am, edited 1 time in total.
Reason: answer extended
Reason: answer extended
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 |