Hi,
How to refresh chart once 'chart area' is draged?
I am plotting a report chart based on some filteration,chart is plotting correctly but when i dragged on chart area toward right side my chart cruves(Line series) and axes data (y primary and y secondary) is changed(which is fine) but when i change my filteration its seems my chart is not refeshing properlly.(may be its saving somewhere in cache the previous draged status...not know).
I am using TeeChart.Silverlight(4.1.2012.1033)
I have tried with - 1:tChart.AutoRepaint = false;,tChart.AutoRepaint = true;
2 tChart.Invalidate() 3: TeeChart.DataContext = null;
but its not wroked for me.
Regards
Satyendra
How to refesh chart once 'chart area' is draged?
Re: How to refesh chart once 'chart area' is draged?
Hello Neelam,
As I told you in this thread you can use to redraw the chart, the property of MainPage Visibiblity and set it to Visible as do in next lines of code:
So, I think you can use this property every time you need to redraw the chart. Can you confirm us if it solve your problem?
I hope will helps.
Thanks,
As I told you in this thread you can use to redraw the chart, the property of MainPage Visibiblity and set it to Visible as do in next lines of code:
Code: Select all
//Add it to redraw
this.Visibility = System.Windows.Visibility.Visible;
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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: How to refesh chart once 'chart area' is draged?
Hi
Thanks for yr reply.
Its seems you have not understand the actual issue.i am attaching a file pls refer for more brief on issue.
I dont want to redraw the chart.
Regards
Satyendra
Thanks for yr reply.
Its seems you have not understand the actual issue.i am attaching a file pls refer for more brief on issue.
I dont want to redraw the chart.
Regards
Satyendra
- Attachments
-
- ChartDraggedIssue.rar
- Chart dragged issue brief
- (224.26 KiB) Downloaded 1043 times
Re: How to refesh chart once 'chart area' is draged?
Hello Neelam,
Thanks for extra information. I have made a simple code where I am initializing the chart every time I am changing the scenario and I think you can use to achieve as you want.
Can you tell if it works as you expect?
I hope will helps.
Thanks,
Thanks for extra information. I have made a simple code where I am initializing the chart every time I am changing the scenario and I think you can use to achieve as you want.
Code: Select all
Steema.TeeChart.Silverlight.Styles.Line Series1, Series2;
public MainPage()
{
InitializeComponent();
//Series
//comboBox
this.comboBox1.Items.Add("Scenario A");
this.comboBox1.Items.Add("Scenario B");
this.comboBox1.SelectedIndex = 0;
this.comboBox1.SelectedItem = 0;
comboBox1.SelectionChanged +=new SelectionChangedEventHandler(comboBox1_SelectionChanged);
// comboBox1
InitializeChart();
Scrolling();
}
void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch(comboBox1.SelectedIndex)
{
case 0:
tChart1.Clear();
InitializeChart();
Scrolling();
break;
case 1:
tChart1.Clear();
tChart1.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
Series1.FillSampleValues();
Scrolling();
break;
}
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
Series2 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
Series1.Add(0, 0.05);
Series1.Add(1, 0.1);
Series1.Add(2, 0.15);
Series1.Add(3, 0.2);
Series1.Add(4, 0.25);
Series1.Add(5, 0.30);
Series1.VertAxis = VerticalAxis.Left;
Series2.Add(0, 35);
Series2.Add(1, 20);
Series2.Add(2, 150);
Series2.Add(3, 98);
Series2.Add(4, 75);
Series2.Add(5, 120);
Series1.VertAxis = Steema.TeeChart.Silverlight.Styles.VerticalAxis.Left;
tChart1.Axes.Right.Visible = true;
Series2.VertAxis = Steema.TeeChart.Silverlight.Styles.VerticalAxis.Right;
this.Visibility = System.Windows.Visibility.Visible;
}
private void Scrolling()
{
tChart1.Zoom.Allow = false;
tChart1.Panning.Allow = Steema.TeeChart.Silverlight.ScrollModes.Horizontal;
tChart1.Panning.MouseButton = System.Windows.Browser.MouseButtons.Left;
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |