athaurgs Posted December 27, 2007 Report Share Posted December 27, 2007 I have downloaded your beta version. I am trying to bind a database with the chart. I am not able to do that. This is how my code look like DataSet dataset = new DataSet(); //Database Connectionstring ConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}", "Northwind.mdb"); OleDbConnection Connection = new OleDbConnection(ConnectionString);OleDbCommand Command = new OleDbCommand("Select Top 10 * from [Products]", Connection); OleDbDataAdapter DataAdapter = new OleDbDataAdapter(Command); //Fill the datasetDataAdapter.Fill(dataset, "Product"); //Creating resource with the name MyDBSourcethis.Resources.Add("MyDBSource", dataset.Tables["Product"].Rows); InitializeComponent(); XAML < my:SeriesAttributes Fill="Crimson" Gallery="Line" GalleryAttributes="{x:Null}" BindingPathX="ProductID" ItemsSource="{StaticResource MyDBSource}" BindingPathFrom="UnitPrice"> When I try to run this application. it gives exception stating 'name' parameter not found. let me know what have to be changed in the code to make my chart work. Quote Link to comment Share on other sites More sharing options...
BMWSauberF1 Posted December 27, 2007 Report Share Posted December 27, 2007 Hi, I have just had a look at this (since I am evaluating the beta also). If you change the XAML attribute BindingFromPath="UnitPrice" to BindingPath="UnitPrice" I found that it works OK. Not sure from my knowledge what the actual meanings are so only a little help for you. Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 4, 2008 Report Share Posted January 4, 2008 The SeriesAttributes class has 3 properties related to data binding BindingPath (required): Name of the CLR property or database field that contains the value to be plotted BindingPathX (optional): Name of the CLR property or database field that contains the X value to be plotted. This X value can be numeric or datetime. BindingPathFrom (optional): Name of the CLR property or database field that contains the "From" value to be plotted. This is supported by certain galleries (e.g. bar, gantt and area) where each point plotted has a "From" and a "To". Apologies for the lack of docs. JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.