krb875 Posted June 17, 2008 Report Share Posted June 17, 2008 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; this.m_Report.axes_temp.Series.Add(series); } Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted June 19, 2008 Report Share Posted June 19, 2008 Hi 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. Paul Quote Link to comment Share on other sites More sharing options...
krb875 Posted June 19, 2008 Author Report Share Posted June 19, 2008 This is not an option with the beta of Chart FX I am using, is there a newer build that supports this? Also I really need to know how to change the point makers to be all of one type Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted June 19, 2008 Report Share Posted June 19, 2008 What version are you using currently? I have 0.8.3065.20832 Paul Quote Link to comment Share on other sites More sharing options...
krb875 Posted June 19, 2008 Author Report Share Posted June 19, 2008 I am running 0.8.2957.30556 Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted June 19, 2008 Report Share Posted June 19, 2008 Ah - probably best to email thier WFP address to request updated version as a first step then have another go. Seeing as they don't seem interested in doing it themselves I'll post in http://community.softwarefx.com/forums/t/9366.aspx with my current version as a reference along with the date I got it. Paul Quote Link to comment Share on other sites More sharing options...
krb875 Posted June 19, 2008 Author Report Share Posted June 19, 2008 appreciate it! you wouldnt happen to know how to create a custom grid line, im posting a new topic on the matter Quote Link to comment Share on other sites More sharing options...
krb875 Posted June 19, 2008 Author Report Share Posted June 19, 2008 I got the Marker Shape to work but I cannot change the color of the seires. is it series.fill = Color.Red for instance; cause when i try this it says cannot convert System.Drawing.Color to System.Windows.Media.Brush Quote Link to comment Share on other sites More sharing options...
JuanC Posted June 19, 2008 Report Share Posted June 19, 2008 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)); Regards, JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.