Hi Steema Support,
We want to create contour and its interaction with the track bar with the chart(contour) when we scroll it.
As shown in fig-1, when we scroll the track bar then contour properties changes as shown in fig-2 below
It will so helpful for us if you please provide any alternative solution.
Thanks in advance.
Thanks and Regards
Planoresearch
Contour Intraction with trackbar
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Contour Intraction with trackbar
I'm afraid I'm not entirely sure how I can help you here. Windows Forms has a TrackBar Class which you can use for the TrackBar. The question is: which property of the Contour series do you want to change when the trackbar is changed? I'm afraid I cannot make that decision for you.amol wrote: It will so helpful for us if you please provide any alternative solution.
It seems to me that the trackbar could represent "levels" of a dataset, the dataset being a 3-dimensional surface, say, and the contour being a 2-dimensional representation of it at different levels. A very simple example of what I mean could look like this:
Code: Select all
Contour contour;
List<List<double>> yValues;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
contour = new Contour(tChart1.Chart);
Random rnd = new Random();
yValues = new List<List<double>>();
for (int i = 0; i < 10; i++)
{
yValues.Add(new List<double>());
for (int j = 0; j < 100; j++)
{
yValues[i].Add(rnd.NextDouble());
}
}
AddValues(0);
trackBar1.Minimum = 0;
trackBar1.Maximum = 9;
trackBar1.LargeChange = 1;
trackBar1.ValueChanged += trackBar1_ValueChanged;
}
private void AddValues(int index)
{
for (int x = 0; x < 10; x++)
{
for (int z = 0; z < 10; z++)
{
contour.Add(x, yValues[index][x * z], z);
}
}
}
void trackBar1_ValueChanged(object sender, EventArgs e)
{
contour.Clear();
AddValues(trackBar1.Value);
}
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 |