Binding DataSet / DataTable to Chart

Hello All, My requirement is to assign datasource to a chart at run time. My datasource is set of items[ on X axis] and prices[ on Yaxis]. But when I try to assign any string to X axis or Y axis it does not allow me to do that. Only datatypes I could find is double & dateTime, but in my case this will not work. Please give me suggestions on how to solve this. Thanks Vinay

3 Replies

GM Geetha M Syncfusion Team August 30, 2005 11:18 AM UTC

Hello Vinay, To work with string datatype, you can have the ChartValueType property set to Custom. This property helps in implementing user-defined datatypes. The code snippet for the same is shown below: this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.Custom; Please refer to the sample attached below and let me know if you have any questions. sample_8698.zip Thanks, Geetha.


VI Vinay August 30, 2005 01:50 PM UTC

Hello Geetha, I could not find the mdb file in the attached Zip . Could you please attach it again. Thanks Vinay >Hello Vinay, > >To work with string datatype, you can have the ChartValueType property set to Custom. This property helps in implementing user-defined datatypes. The code snippet for the same is shown below: > >this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.Custom; > >Please refer to the sample attached below and let me know if you have any questions. > >sample_8698.zip > > >Thanks, > >Geetha. > > > >


GM Geetha M Syncfusion Team August 31, 2005 07:02 AM UTC

Hello Vinay, Sorry for the inconvenience caused. Please refer the sample attached below and let me know if you have any questions. DataBind_5990.zip Thanks, Geetha.

Loader.
Up arrow icon