Hi TeeChart Team,
I have 100 fast line series and each having one custom y axis. All the custom axises are of same size. Means, each series has its own area to plot without overlaping. Now each custom y axis size is = Total Height of Y axis/ Total number of Series. So the size of each custom axis is became very small. What i wanted to do is, by default i want to show only 10 series means 10 custom axis and there will be a vertical scroll bar to scroll down or up. This scrolling is not like pagging. It should be like a normal scrolling. Is there anyway i can achieve that??
Scrolling multiple custom axis
Re: Scrolling multiple custom axis
I forgot to inform that - i cant use the mouse to scroll the chart area because all the mouse operations are already in use and users are also use to with the horizontal and vertical scroll bars. One more thing is, when the vertical scrollbar is there and user zooms the window then the vertical scroll bar should be updated. No idea how to implement these features.
Thanks for your help in advance.
Thanks for your help in advance.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scrolling multiple custom axis
Hi Nitin,
The solution that comes up to my mind now is using a vertical scrollbar with minimum value being 0 and maximum value tChart1.Series.Count - NumOfSeriesToVisualize. So that every time you move the scrollbar it should display series starting at its value and up to NumOfSeriesToVisualize.
When zooming you should update scrollbar's value to the bottom-most series in the chart, the series which is in the center or choose the criteria you want. Probably then you should also have to update NumOfSeriesToVisualize to given zoom level.
Hope this helps!
The solution that comes up to my mind now is using a vertical scrollbar with minimum value being 0 and maximum value tChart1.Series.Count - NumOfSeriesToVisualize. So that every time you move the scrollbar it should display series starting at its value and up to NumOfSeriesToVisualize.
When zooming you should update scrollbar's value to the bottom-most series in the chart, the series which is in the center or choose the criteria you want. Probably then you should also have to update NumOfSeriesToVisualize to given zoom level.
Hope this helps!
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 |
Re: Scrolling multiple custom axis
Can you send me a sample code for 10 series with 10 custom axis?
It will really help me.
Thanks in advance.
It will really help me.
Thanks in advance.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scrolling multiple custom axis
Hi Nitin,
You can do something like this:
You can do something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private int NumOfSeriesToVisualize = 3;
private int NumOfSeries = 10;
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
tChart1.Panel.MarginLeft = 12;
for (int i = 0; i < NumOfSeries; i++)
{
tChart1.Axes.Custom.Add(new Steema.TeeChart.Axis());
tChart1.Series.Add(new Steema.TeeChart.Styles.FastLine());
tChart1[i].FillSampleValues();
tChart1[i].CustomVertAxis = tChart1.Axes.Custom[i];
if (i < NumOfSeriesToVisualize)
{
tChart1[i].GetVertAxis.StartPosition = (100 / NumOfSeriesToVisualize) * i;
tChart1[i].GetVertAxis.EndPosition = (100 / NumOfSeriesToVisualize) * (i + 1);
}
else
{
tChart1[i].Active = false;
}
}
vScrollBar1.Dock = DockStyle.Left;
vScrollBar1.Minimum = 0;
vScrollBar1.Maximum = NumOfSeries - NumOfSeriesToVisualize;
vScrollBar1.SmallChange = 1;
vScrollBar1.LargeChange = 1;
}
private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
int count = 0;
for (int i = 0; i < tChart1.Series.Count; i++)
{
if ((i >= e.NewValue) && (i < e.NewValue + NumOfSeriesToVisualize))
{
tChart1[i].GetVertAxis.StartPosition = (100 / NumOfSeriesToVisualize) * count;
tChart1[i].GetVertAxis.EndPosition = (100 / NumOfSeriesToVisualize) * (count + 1);
tChart1[i].Active = true;
count++;
}
else
{
tChart1[i].Active = false;
}
}
}
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 |