This question is locked. New answers and comments are not allowed.
Visual Studio 2011 / VB.net / framework v4
I am missing something regarding the databinding process for winforms chart controls. In the following example I've used a rad chart inside a custom control but this behavior has been detected elsewhere in my efforts to dynamically and programatically render a databound radchart.
I'm using data tables and I'm using the programtic approach. I am using a data table that contains three columns: series_id (string) , val (float), oa_time (float) and binding it to a chart control that is embedded into a newly instantiated custom control.
The process goes like this:
Populate the data table with series_id, oa time and val (string,double,double).
Create a new control, assign the chart control inside the control the datagroupcolumn "series_id"
databind the chart control to the datatable
inside the custom control I have added a handler to the databound event of the chart (using the .load event of the control).
I fire the databind event and in the handler, assign each series (there is only suposed to be one) the following properties:
s(x).dataycolumn ="val"
s(x).dataxcolumn = "oa_time"
Each time I did this I would get unexpected results. Specifically it appeard to use the "series_id" column for the y val. After a bit I realized that what I was probably seeing was the default bindings at work.
I hope the custom control doesnt throw this off too much because I was getting the exact same issue prior moving to a custom control approach The reason for adding the chart to a custom control was so I could have a nice clean way of capturing the databound event for each dynamically created chart.
My work around (and evidence that my column overrides are not working) is to use a typed datatable and specify a column order and then leave the datagroup and datay datax columns to their "default" values (ie I dont specifiy anything). If i position the oa_time,val and series_id values appropriately in the typed datattable's column-ordinal positions using the designer, I can get away with the default bindings and render my charts.
I have tried this inside and out of custom controls. The only commonality between the two testing conditions being the controls were always created programatically in vb.code. I'm guessing that I'm missing an event that is not contained in the documentation.
Thanks a lot in advance
I am missing something regarding the databinding process for winforms chart controls. In the following example I've used a rad chart inside a custom control but this behavior has been detected elsewhere in my efforts to dynamically and programatically render a databound radchart.
I'm using data tables and I'm using the programtic approach. I am using a data table that contains three columns: series_id (string) , val (float), oa_time (float) and binding it to a chart control that is embedded into a newly instantiated custom control.
The process goes like this:
Populate the data table with series_id, oa time and val (string,double,double).
Create a new control, assign the chart control inside the control the datagroupcolumn "series_id"
databind the chart control to the datatable
inside the custom control I have added a handler to the databound event of the chart (using the .load event of the control).
I fire the databind event and in the handler, assign each series (there is only suposed to be one) the following properties:
s(x).dataycolumn ="val"
s(x).dataxcolumn = "oa_time"
Each time I did this I would get unexpected results. Specifically it appeard to use the "series_id" column for the y val. After a bit I realized that what I was probably seeing was the default bindings at work.
I hope the custom control doesnt throw this off too much because I was getting the exact same issue prior moving to a custom control approach The reason for adding the chart to a custom control was so I could have a nice clean way of capturing the databound event for each dynamically created chart.
My work around (and evidence that my column overrides are not working) is to use a typed datatable and specify a column order and then leave the datagroup and datay datax columns to their "default" values (ie I dont specifiy anything). If i position the oa_time,val and series_id values appropriately in the typed datattable's column-ordinal positions using the designer, I can get away with the default bindings and render my charts.
I have tried this inside and out of custom controls. The only commonality between the two testing conditions being the controls were always created programatically in vb.code. I'm guessing that I'm missing an event that is not contained in the documentation.
Thanks a lot in advance