Beispiel #1
0
        protected void AddNewSeriesHorizLine(MSCHART.Chart chart, WebCharting.Data.SeriesDataPoints datapoints, WebCharting.Data.AxisLabels labels)
        {
            var ser = new MSCHART.Series();

            ser.Points.DataBindXY(labels.ToArray(), datapoints.GetDoubleArray());
            if (datapoints.Name != null)
            {
                ser.LegendText = datapoints.Name;
            }
            for (int i = 0; i < datapoints.Count; i++)
            {
                var chart_datapoint = ser.Points[i];
                var v = datapoints[i];
            }
            chart.Series.Add(ser);
        }
Beispiel #2
0
        protected void AddNewSeries(MSCHART.Chart chart, WebCharting.Data.SeriesDataPoints datapoints, WebCharting.Data.AxisLabels labels)
        {
            var ser = new MSCHART.Series();

            ser.Points.DataBindXY(labels.ToArray(), datapoints.GetDoubleArray());
            if (datapoints.Name != null)
            {
                ser.LegendText = datapoints.Name;
            }
            for (int i = 0; i < datapoints.Count; i++)
            {
                var chart_datapoint = ser.Points[i];
                var v = datapoints[i];

                if (v.ToolTip != null && v.ToolTip.Text != null)
                {
                    chart_datapoint.ToolTip = v.ToolTip.Text;
                }

                if (v.Hyperlink != null)
                {
                    chart_datapoint.Url = v.Hyperlink;
                }
            }


            if (datapoints.Hyperlink != null)
            {
                ser.Url = datapoints.Hyperlink;
            }

            if (datapoints.ToolTip != null && datapoints.ToolTip.Text != null)
            {
                ser.ToolTip = datapoints.ToolTip.Text;
            }
            chart.Series.Add(ser);
        }