C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Need to change the color of point symbols based on criteria

rated by 0 users
This post has 3 Replies | 0 Followers

Top 500 Contributor
Posts 14
dmmattix@cpkelco.com Posted: Mon, Nov 10 2008 5:41 PM

I have created an XY Plot with analysis values in the Y axis and datetime in the X axis.  This works just fine but I would like to make the symbols for the points that "Fail" a different color.  Is this possible with the Web Chart?

 Thanks

Mike

Top 500 Contributor
Posts 14

 Can I assume the silence means that this cannot be done??

 

Mike

Top 25 Contributor
Posts 666
C1_DaveT replied on Tue, Nov 18 2008 2:34 AM

You can change color of a certain data point by using PointStyle.

 

Such as following code will change color of second data point of first data series –

-----------------

//Create a new point style

        C1.Win.C1Chart.PointStyle ps = new C1.Win.C1Chart.PointStyle();

       

        //Set Series index

         ps.SeriesIndex = 0;

 

        //Set Data point index

        ps.PointIndex = 1;

      

 

        //Set color for point style

        ps.SymbolStyle.Color = System.Drawing.Color.Green ;

 

        //Add this style to chart

        this.C1WebChart1.ChartGroups[0].ChartData.PointStylesList.Add(ps);

------------

 

-Dave.

I have created an XY Plot with analysis values in the Y axis and datetime in the X axis.  This works just fine but I would like to make the symbols for the points that "Fail" a different color.  Is this possible with the Web Chart?

 Thanks

Mike



http://helpcentral.componentone.com/cs/forums/p/77218/211131.aspx#211131

Top 500 Contributor
Posts 14

 Dave,

 Worked great.  Thanks for the response.

Mike

Page 1 of 1 (4 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.