How can I bind the XamWebChart to a SeriesCollection. I'm getting data from a service, in Xml format, containing the values and styles for few series' with several datapoints.
I created SeriesCollection in my ViewModel. Now how should I bind my view to make it use the SeriesCollection to draw graphs.
You will want to check this post to get you started:
https://es.infragistics.com/community/forums/f/ultimate-ui-for-wpf/38169/series-binding-in-xaml-custom-attached-property
Unfortunately there seems to be a problem with the forums this morning, so this post isn't currently accessible.
-Graham
Its back up. So you can check that out if you want. But the exampl linked is really more for if you want to create the series based on a template in Xaml. If you are already creating the series collection in your View Model have you tried just binding it to the chart?
I.E if the property holding the SeriesCollection on your DataContext is called Series. Have you tried
<XamWebChart Series="{Binding Series} ...
Hi,
Glad it helps!
Did you still have a question? I can't tell. In the sample you attached I had to change the line after InitializeComponent to:
_data = GenerateMarket() to point the sample back at your market data rather than the test data. And then I see columns.
BTW, you should bind the grid against the original data, not the Solidified View:
this.grdXmlData.ItemsSource = _data;
This is because the solidified view is read only proxies, so if you want to edit the source data from the grid, you should bind against the original source. The changes should be propagated through the proxies to the chart through INotifyPropertyChanged and INotifyCollectionChanged.
Hope this helps!
Yeah, it looks like you may need to implement more of the helper to support editing in the grid. It must call a few methods on ICustomTypeProvider that aren't anticipated by the sample you got it from.
To ask what is possible with our dataGrid and pivotGrid controls, I would suggest asking in the forums dedicated to those products, as they will be more familiar with how to configure them. It looks like you are using the standard DataGrid at the moment, rather than our grid though.
It seems like this is a sufficient implementation of
GetIndexParameters:
return
new ParameterInfo[] { };
when I add that code, the grid is editable, and the changes are reflected in the chart.
thx alot
Is there any article or blog that binds the pivot grid with the datachart??
am searching but there is only for webchart
I believe you can just set the Brush property on each fragment.
OK, i will now try to work with the pivotgrid and bind it :)
but i want to ask a question first,
can i chose the colors of the stacked fragments, because i don't want the randomely selected colors i get
i want to specify the color of the fragment when adding it, can i??