Jump to content
Software FX Community

Graph Coloring and Datapoint Style Issue


Recommended Posts

 I use the following code to generate a output based on temperature reference from a camera response during testing.  Because each region of temp calls the function seperately I need a way to make the line color on selected lines the same instead of using randomly generated colors.  Also when it marks the points it uses a different symbol everytime and I would like to default it to X everytime.



location = nextLocation;

ChartFX.WPF.SeriesAttributes series = new ChartFX.WPF.SeriesAttributes();

List<XYMeasure> dataPts = new List<XYMeasure>();for (int i = 0; i < value[k].Length; i++)



dataPts.Add(new XYMeasure(location, value[k]));if (i < value[k].Length - 1)


location += Scale;



series.ItemsSource = dataPts;

series.BindingPath = "Y";

series.BindingPathX =

"X";this.m_Report.axes_temp.Palette = ChartFX.WPF.Palettes.Professional;




Link to comment
Share on other sites


 Can help with the series color issue - you'll need to call series.fill to set the individual series color, or chart.allseries.fill to effect all created series.  I dont't know if setting on the individual series would override a color set by allseries, but I assume it would.

Also, to set the point symbol you'd need to use series.marker = MarkerShape.X

This might be setable on the allseries property off of the chart instead of on each individual series.


Link to comment
Share on other sites

The Fill property is of type brush (like all other WPF elements) so you have to create a SolidColorBrush or use the Brushes class to use a stock brush.

chart1.Series[0].Fill = System.Windows.Media.

Brushes.Red;chart1.Series[1].Fill = new System.Windows.Media.SolidColorBrush(Color.FromArgb(128, 240, 40, 0)); 



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...