Jump to content
Software FX Community

Create a chart by loading a Dataset


raydenxxx

Recommended Posts

Hello,

I'm searching how to load a dataset from a xml file...I found the Load function for a System.data.dataset but no doc to explain how to use it... :(

In the doc I found how to create a dataset by connecting to the database but I don't want to do that.

Is it possible to directly load a xml file containing a dataset? (with the schema)

 Thanks,Raydenxxx 

Link to comment
Share on other sites

 I find how to... :(

 

  DataSet dataSet = new DataSet();   string dataPath = Path.Combine(Server.MapPath("App_Data"), "SupportServeur.xml");   //on lit le schema   dataSet.ReadXml(dataPath, XmlReadMode.ReadSchema);   //On prend un graph en bar   Chart1.Gallery = Gallery.Bar;   //on rempli le chart   Chart1.DataSourceSettings.Fields.Add(new FieldMap("LibelleDomaine", FieldUsage.Label));   Chart1.DataSourceSettings.Fields.Add(new FieldMap("NbDossiers", FieldUsage.Value));   Chart1.DataSourceSettings.DataSource = dataSet.Tables[1];

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...