Hi steema,
We have some query regarding Location of ColorBandTool Location of ScrollPager on mouse click.
1. We want to Change the ColorBandTool Location of ScrollPager where mouse is clicked on Subchart of Scrollpager.
Change ColorBandTool Location of ScrollPager on mouse click.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Change ColorBandTool Location of ScrollPager on mouse click.
You can try something similar to this:amol wrote:1. We want to Change the ColorBandTool Location of ScrollPager where mouse is clicked on Subchart of Scrollpager.
Code: Select all
Line series;
ScrollPager tool;
private void InitializeChart()
{
series = new Line(tChart1.Chart);
tool = new ScrollPager(tChart1.Chart);
series.FillSampleValues(100);
tool.Series = series;
tool.SubChartTChart.MouseDown += SubChartTChart_MouseDown;
}
private void SubChartTChart_MouseDown(object sender, MouseEventArgs e)
{
double start = tool.ColorBandTool.Start;
double end = tool.ColorBandTool.End;
double range = (end - start);
double xval = tool.SubChartTChart[0].XScreenToValue(e.X);
tChart1.Header.Text = xval.ToString();
tool.EndValue = (range / 2) + xval;
tool.StartValue = tool.EndValue - range;
}
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 |