refresh datasource and chart
Greetings and well met!
I have the 4.1.0.50 Syncfusion package and have a question related chart:
How do i refresh the datasource of the chart?
Exp.: The user is presented with a couple of Comboboxes and a refresh button; this refresh button takes the values from the comboboxes and builds a sql statement to retrieve data (dataset.datatable) for the Chartdatabindmodel class. What exactly do i have to do now? just rebind the dataset to the chartdatabindmodel or just a refresh?
THX in advance
I have the 4.1.0.50 Syncfusion package and have a question related chart:
How do i refresh the datasource of the chart?
Exp.: The user is presented with a couple of Comboboxes and a refresh button; this refresh button takes the values from the comboboxes and builds a sql statement to retrieve data (dataset.datatable) for the Chartdatabindmodel class. What exactly do i have to do now? just rebind the dataset to the chartdatabindmodel or just a refresh?
THX in advance
SIGN IN To post a reply.
7 Replies
AD
Administrator
Syncfusion Team
September 4, 2006 11:40 AM UTC
Hi Christian ,
We regret very much for the delay in updating you.
You need to rebind the dataset to the ChartDataBindModel again after executing a query from the SQL server.
I will send you the sample with above factors within a day or two.
Thank you for choosing Syncfusion products.
Regards,
Jaya
CF
Christian Fleischhacker
September 5, 2006 12:17 PM UTC
Ok :-)
There is another question arisen:
When I add the following code line:
and use ChartDateTimeIntervalType.Auto instead of weeks i receiving an execption out of your library during runtime;
(i added the cut out message as picture)
Is an intended behavior or am i doing something wrong?
There is another question arisen:
When I add the following code line:
'' Me.ChartControl1.PrimaryXAxis.DateTimeRange = New Syncfusion.Windows.Forms.Chart.ChartDateTimeRange(mdl_model.getMinDate, mdl_model.getMaxDate, 1, ChartDateTimeIntervalType.Weeks)
and use ChartDateTimeIntervalType.Auto instead of weeks i receiving an execption out of your library during runtime;
(i added the cut out message as picture)
Is an intended behavior or am i doing something wrong?
Issue9.zip
AD
Administrator
Syncfusion Team
September 6, 2006 06:13 AM UTC
Hi Christian,
Thank you for bringing this issue to our attention.I am able to reproduce this issue.
I will create a bug report on this regard and let you know once it is implemented.
Thank you for your continued interest in Syncfusion products.
Regards,
Jaya
CF
Christian Fleischhacker
September 6, 2006 07:46 AM UTC
Hi Jaya!
np! Glad to help; Just keep me informed please.
So right now it is impossible to specify a range for dateTime Axis and let your library handle the interval?
(except for writing a own class that evaluates my data and set the chart according to parameters i specified via code)
Another thing i recognised is the following: If i don''t set the DateTime Ranges by Code and pass my dataset according to your Tut''s to the Chartmodel, the chart start drawing itself around a month or so before the "first" dateTime value in my dataset; also the charts stops drawing not at the last date of my dataset instead 2 months later; I found Range Properties of the X Axis in the Designer Properties window, but they seem to accept only double values; Maybe there you could incorperate an extra property for the DateTimeRange inside the Designer-Properties Window
np! Glad to help; Just keep me informed please.
So right now it is impossible to specify a range for dateTime Axis and let your library handle the interval?
(except for writing a own class that evaluates my data and set the chart according to parameters i specified via code)
Another thing i recognised is the following: If i don''t set the DateTime Ranges by Code and pass my dataset according to your Tut''s to the Chartmodel, the chart start drawing itself around a month or so before the "first" dateTime value in my dataset; also the charts stops drawing not at the last date of my dataset instead 2 months later; I found Range Properties of the X Axis in the Designer Properties window, but they seem to accept only double values; Maybe there you could incorperate an extra property for the DateTimeRange inside the Designer-Properties Window
AD
Administrator
Syncfusion Team
September 7, 2006 01:18 PM UTC
Hi Christian,
The following is about setting ChartDateTimeIntervalType to Auto :
Set ChartDateTimeIntervalType to Auto in the IntervalType of the primary Axis instead of using it in the DateTimeRange
i.e, Use this.chartControl1.PrimaryXAxis.IntervalType= ChartDateTimeIntervalType.Auto; instead of using this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(Startdate,EndDate,3,ChartDateTimeIntervalType.Auto);
You can set the following for DateTimeRange under PrimaryXAxis node in the Designer window :
1)ValueType to DateTime
2)IntervalType to Auto, Months, Hours and etc.,
3)Desired Intervals to some numeric values
4)DateTimeFormat to ddd/MM/yy, hh :mm for setting day/ month/ year, hour : minute
But you need to set the StartDate in the code window.
Kindly let me know if this helps.
Thank you for your continued interest in Syncfusion products.
Regards,
Jaya
CF
Christian Fleischhacker
September 8, 2006 12:39 PM UTC
Hi Jaya!
Thanks for the reply you suggestion seems to work!
I still have the problem to set the StartDate and EndDate properly, could you be a little more specific how to set the StartDate per Code, since i can''t find a function or property for it (the Me.ChartControl1.PrimaryXAxis.DateTimeRange class offers me just readOnly properties)
And i''m still waiting for the promised sample regarding the "refresh datasource and chart" issue i have.
Greetings Christian!
Thanks for the reply you suggestion seems to work!
I still have the problem to set the StartDate and EndDate properly, could you be a little more specific how to set the StartDate per Code, since i can''t find a function or property for it (the Me.ChartControl1.PrimaryXAxis.DateTimeRange class offers me just readOnly properties)
And i''m still waiting for the promised sample regarding the "refresh datasource and chart" issue i have.
Greetings Christian!
AD
Administrator
Syncfusion Team
September 12, 2006 12:13 PM UTC
Hi Christian,
We regret for the delay in updating you.
You can set the StartDate and EndDate using DateTime class with
IntervalType to Auto.
The following code illustrate this :
DateTime start=new DateTime(2006,2,13,0,0,0);
DateTime end=new DateTime(2006,2,13,9,0,0);
chartControl1.PrimaryXAxis.IntervalType= ChartDateTimeIntervalType.Auto;
The Axis labels will vary according to the desired intervals you set in the design time.I have also attached Databind Sample. The sample explain how to bind a data after the modification of the data source. In this sample you are able to modify second point of the chartseries at runtime.
Please try the sample which accommodates the above factors.
Thank you for your patience.
Regards,
Rashidha.
We regret for the delay in updating you.
You can set the StartDate and EndDate using DateTime class with
IntervalType to Auto.
The following code illustrate this :
DateTime start=new DateTime(2006,2,13,0,0,0);
DateTime end=new DateTime(2006,2,13,9,0,0);
chartControl1.PrimaryXAxis.IntervalType= ChartDateTimeIntervalType.Auto;
The Axis labels will vary according to the desired intervals you set in the design time.I have also attached Databind Sample. The sample explain how to bind a data after the modification of the data source. In this sample you are able to modify second point of the chartseries at runtime.
Please try the sample which accommodates the above factors.
Thank you for your patience.
Regards,
Rashidha.
DateTime and DataBinding.zip
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
CF Christian Fleischhacker
- Aug 31, 2006 07:49 AM UTC
- Sep 12, 2006 12:13 PM UTC