Esempio n. 1
0
        private void                            Ps_Select(object sender, C1.Win.C1Chart.PointStyleSelectEventArgs e)
        {
            C1.Win.C1Chart.PointStyle      ps = sender as C1.Win.C1Chart.PointStyle;
            C1.Win.C1Chart.ChartDataSeries ds = c1Chart1.ChartGroups[0].ChartData[e.SeriesIndex];

            if (ds.Y3.Length == 0)
            {
                return;
            }

            int y = Convert.ToInt32(ds.Y3[e.PointIndex]);

            Console.WriteLine("y = " + y.ToString());

            if (y.Equals(1))
            {
                ps.SymbolStyle.Color = Color.Red;
            }
            else if (y.Equals(-1))
            {
                ps.SymbolStyle.Color = Color.Blue;
            }
            else
            {
                ps.SymbolStyle.Color = Color.Black;
            }

            e.Selected = true;
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

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

            ps.Selection = C1.Win.C1Chart.PointStyleSelectionEnum.Custom;
            ps.Select   += Ps_Select;

            // This is only being done on the left-hand y-axis.
            c1Chart1.ChartGroups[0].ChartData.PointStylesList.Add(ps);
        }