This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi! How can I add datapoints to the line series in code behind whithout binding? I use Visual Basic language. Please write an example. Thanks! |
|
|
Hello, For just adding a collection of data to a line series once, the trick is to access each series' ItemsSource property through the Chart object they belong to. To do this, in the XAML, your chart needs a name, along with however many LineSeries you want to display:
Then in code you can populate the ItemsSource as follows:
If you want to dynamically add data points during the app's lifetime you just need use an ObservableCollection(Of Point) instead of the List(Of Point) shown above. Whenever a new point is added to the collection the line series will update. |
|
|
Thanks for your answer! |
|