Jump to content
Software FX Community

CLR data for simple X,Y plot graph


Recommended Posts


I can't for the life of me figure out how to simply plot a bunch of points with x,y coordinates, ideally with both x and y axis logarithmic. Trying to decide whether to purchase SoftwareFX for our project.

Tried various combinations of SeriesAttributes.BindingPath and  AxisX.DataPath etc etc and I'm getting frustrated what am I missing?

The following does the Y axis correctly but the X axis is just in order that the points are added and does not use my RoomPressure property as the X value.

 The chart FlowRPChart is currently set to  Gallery="Line" but really I don't want lines connection the point.



  public class Reading   {   public double TotalFlow { get; set; }   public double RoomPressure { get; set; }   public Reading(double totalFlow, double roomPressure)   {   this.TotalFlow = totalFlow;   this.RoomPressure = roomPressure;   }   }   private void Go_Click(object sender, RoutedEventArgs e)   {   List<Reading> Readings = new List<Reading>();   Readings.Add(new Reading(114, 45));   Readings.Add(new Reading(190, 48));   Readings.Add(new Reading(76, 40));   Readings.Add(new Reading(73, 36));   Readings.Add(new Reading(79, 38));   Readings.Add(new Reading(67, 35));   Readings.Add(new Reading(65, 34));   Readings.Add(new Reading(62, 31));   this.FlowRPChart.ItemsSource = Readings;   SeriesAttributes series = new SeriesAttributes();   series.Content = "Flow";   series.BindingPath = "TotalFlow";   series.BindingPathX = "RoomPressure";   FlowRPChart.Series.Add(series);   FlowRPChart.AxisX.DataPath = "RoomPressure";


Link to comment
Share on other sites

Make sure you clear the series collection in case the chart already has data (or was displayed with random data). Also remove the AxisX.DataPath setting, this is useful when the gallery does not "natively" support X values (e.g. Bar) but you still want smart labels in the X axis typically dates.

If you don't want the lines connecting the points you should set the Gallery to Scatter.


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.

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.

  • Create New...