Jump to content
Software FX Community

Right way to add data to a scatter plot?


wekelly
 Share

Recommended Posts

I found examples that showed using chart1.Data[0,0] = 3.14 as a way to populate data for an XY scatter plot. But this requires adding data points one at a time.

Is there a way to populate a scatter chart using SeriesAttributes.ItemSource?

My thoughts were perhaps binding to List<double[]> where double[0] is the X value and double[1] is the Y value.

I also considered binding to List<MyValues> where MyValues has properties X and Y.

I cannot seem to find the right way to do this. Any suggestions?

Link to comment
Share on other sites

Figured it out. Here is what I was missing:

1. SeriesAttributes has both a BindingPath and BindingPathX.

2. I had Visibility.Collapsed my markers for my Line plot. When I switched my chart from a Line plot to a Scatter plot, nothing was displaying because my markers were still Visibility.Collapsed.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...