protected override Image DoCreateChartImage()
 {
     var chart = new UltraChart {ChartType = ChartType.LineChart};
     var sc1 = new NumericSeries();
     foreach (var valuePair in Parameters.SeriaData)
     {
         sc1.Points.Add(new NumericDataPoint(valuePair.Key, valuePair.Value.ToString(), false));
     }
     chart.Series.Add(sc1);
     chart.Height = Parameters.ChartHeight;
     chart.Width = Parameters.ChartWidth;
     using (var stream = new MemoryStream())
     {
         chart.SaveTo(stream, ImageFormat.Png);
         return new Bitmap(stream);
     }
 }
Ejemplo n.º 2
0
    void Refresh()
    {
        int           complete   = 0;
        int           incomplete = 0;
        SqlDataReader myReader   = SQLHelper.ExecuteReader(Cache["ApplicationDatabase"].ToString(), "GetStatistics");

        while (myReader.Read())
        {
            complete   = (int)myReader.GetValue(0);
            incomplete = (int)myReader.GetValue(1);
        }


        NumericSeries serie = new NumericSeries();

        serie.Points.Add(
            new NumericDataPoint(
                complete,
                "Completo",
                false)
            );

        serie.Points.Add(
            new NumericDataPoint(
                incomplete,
                "Imcompleto",
                false)
            );

        serie.PEs.Add(new PaintElement(Color.Green));
        serie.PEs.Add(new PaintElement(Color.DarkRed));

        UltraChart1.CompositeChart.Series.Add(serie);
    }
Ejemplo n.º 3
0
        /// <summary>
        ///     Método que adiciona uma datatable dentro do ultrachart e apresenta
        /// para o usuário.
        /// </summary>
        /// <param name="Dados">DataTable contendo os dados.</param>
        private void AdicionaCotacao_Grafico(DataTable Dados)
        {
            if (Dados != null && Dados.Rows.Count > 0)
            {
                NumericSeries series = new NumericSeries();

                for (int x = 0; x < Dados.Rows.Count; x++)
                {
                    Double valor = Convert.ToDouble(Dados.Rows[x]["ValorNum"].ToString());
                    String data  = Convert.ToDateTime(Dados.Rows[x]["DtConsulta"].ToString()).ToString("dd/MM/yyyy");
                    series.Points.Add(new NumericDataPoint(valor, data, false));
                }

                ultraChart1.CompositeChart.Series.Add(series);

                //Comentei esse trecho, pois o gráfico fica estranho com o valor 0;
                //ultraChart1.Data.ZeroAligned = true;

                //Remove a legenda (não existe)
                //ultraChart1.CompositeChart.Legends.RemoveAt(0);

                //Não apresenta a legenda.
                ultraChart1.Legend.Visible = false;
            }
        }
Ejemplo n.º 4
0
        private NumericSeries GetNumericSeriesUnBound()
        {
            NumericSeries series = new NumericSeries();

            series.Label = "Series B";
            // this code populates the series using unbound data
            series.Points.Add(new NumericDataPoint(5.0, "Point A", false));
            series.Points.Add(new NumericDataPoint(4.0, "Point B", false));
            series.Points.Add(new NumericDataPoint(3.0, "Point C", false));
            series.Points.Add(new NumericDataPoint(2.0, "Point D", false));
            series.Points.Add(new NumericDataPoint(1.0, "Point E", false));
            return(series);
        }
Ejemplo n.º 5
0
        private NumericSeries GetNumericSeriesBound()
        {
            NumericSeries series = new NumericSeries();

            series.Label = "Series A";
            // this code populates the series from an external data source
            DataTable table = GetData();

            series.Data.DataSource  = table;
            series.Data.LabelColumn = "Label Column";
            series.Data.ValueColumn = "Value Column";
            return(series);
        }
Ejemplo n.º 6
0
    public void AddLineChart(string name_, string[] xAxis_, double[] yAxis_)
    {
      DataTable d = new DataTable();
      d.Columns.Add("Heading", typeof(string));
      d.Columns.Add(name_, typeof(double));

      for (int i = 0; i < xAxis_.Length; ++i)
        d.LoadDataRow(new object[] { xAxis_[i], yAxis_[i] }, true);

      ChartLayerAppearance chart;
      NumericSeries series;
      LineChartAppearance lcApp;

      series = new NumericSeries();
      series.Data.LabelColumn = "Heading";
      series.Data.ValueColumn = name_;
      series.Key = name_;
      series.Label = name_;
      series.PEs.Add(new PaintElement(ColorAttribute.GetColor(ultraChart.CompositeChart.Series.Count)));
      ultraChart.CompositeChart.Series.Add(series);

      chart = new ChartLayerAppearance();
      chart.ChartComponent = ultraChart;
      chart.ChartArea = ultraChart.CompositeChart.ChartAreas[0];
      chart.AxisX = chart.ChartArea.Axes.FromKey("xAxis_Line");
      chart.AxisY = chart.ChartArea.Axes.FromKey("yAxis_Line");
      chart.ChartType = ChartType.LineChart;

      lcApp = (LineChartAppearance)chart.ChartTypeAppearance;
      lcApp.Thickness = 2;
      lcApp.MidPointAnchors = false;
      lcApp.NullHandling = NullHandling.InterpolateSimple;

      chart.Key = string.Format("{0}_chart", name_);
      ultraChart.CompositeChart.ChartLayers.Add(chart);

      chart.Series.Add(series);
      series.Data.DataSource = d;
      series.DataBind();

      m_datatables.Add(dt);
      ultraChart.InvalidateLayers();
    }
Ejemplo n.º 7
0
    private void addAreas()
    {
      if (ultraChart.CompositeChart.ChartAreas.Count > 2)
        return;

      ultraChart.CompositeChart.ChartAreas.Clear();

      for (int i = 0; i < 12; ++i)
      {
        ChartArea area = new ChartArea();
        AxisItem xAxis = new AxisItem();
        AxisItem yAxis = new AxisItem();
        Months month = (Months)(i + 1);

        xAxis.Key = string.Format("xAxis_{0}", i.ToString());
        xAxis.DataType = Infragistics.UltraChart.Shared.Styles.AxisDataType.String;
        xAxis.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
        xAxis.Labels.ItemFormat = Infragistics.UltraChart.Shared.Styles.AxisItemLabelFormat.Custom;
        xAxis.Labels.ItemFormatString = "<ITEM_LABEL>";
        xAxis.MajorGridLines.Visible = true;
        xAxis.OrientationType = Infragistics.UltraChart.Shared.Styles.AxisNumber.X_Axis;
        xAxis.SetLabelAxisType = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.GroupBySeries;
        xAxis.Extent = 35;

        yAxis.Key = string.Format("yAxis_{0}", i.ToString());
        yAxis.DataType = Infragistics.UltraChart.Shared.Styles.AxisDataType.Numeric;
        yAxis.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
        yAxis.Labels.ItemFormat = Infragistics.UltraChart.Shared.Styles.AxisItemLabelFormat.Custom;
        yAxis.Labels.ItemFormatString="<DATA_VALUE:#,###>";
        yAxis.Labels.Font = new Font(yAxis.Labels.Font.FontFamily, 6.0f);
        yAxis.MajorGridLines.Visible = true;
        yAxis.OrientationType = Infragistics.UltraChart.Shared.Styles.AxisNumber.Y_Axis;
        yAxis.SetLabelAxisType = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.GroupBySeries;
        yAxis.Extent = 18;

        area.Axes.Add(xAxis);
        area.Axes.Add(yAxis);
        area.Key=string.Format("area_{0}",i.ToString());

        int x=i, y=i;

        x = i;
        if (i > 7) x -= 4;
        if (i > 3) x -= 4;


        y = 0;
        if (i > 3) ++y;
        if (i > 7) ++y;

        area.Bounds = new Rectangle(25 * x, 33 * y, 25, 33);
        area.BoundsMeasureType = Infragistics.UltraChart.Shared.Styles.MeasureType.Percentage;

        ultraChart.CompositeChart.ChartAreas.Add(area);

        DataTable d = new DataTable();
        d.Columns.Add("Date", typeof(string));
        d.Columns.Add(string.Format("{0} Perf",month.ToString()), typeof(double));

        NumericSeries ns = new NumericSeries
        {
          Data = {LabelColumn = "Date", ValueColumn = string.Format("{0} Perf", month.ToString())},
          Label = string.Format("{0} value", month.ToString()),
          Key = string.Format("series_{0}", i.ToString())
        };

        ultraChart.CompositeChart.Series.Add(ns);

        ChartLayerAppearance chart = new ChartLayerAppearance
        {
          ChartComponent = ultraChart,
          ChartArea = area,
          AxisX = area.Axes[0],
          AxisY = area.Axes[1],
          ChartType = ChartType.ColumnChart,
          Key = string.Format("chart_{0}", i.ToString())
        };

        ultraChart.CompositeChart.ChartLayers.Add(chart);
        chart.Series.Add(ns);
        ns.Data.DataSource = d;
        chart.SeriesList = string.Format("{0}", ns.Key);
        ns.DataBind();
        ns.PEs.Add(new PaintElement(ColorAttribute.GetColor(i)));

        dts.Add(d);
      }
    }
    public void Create(ConstructGen<double> wts_, FXGroup[] groups_)
    {
      ConstructGen<double> groupConv = new ConstructGen<double>(groups_.Length);
      groupConv.ColumnHeadings = groups_.Select(x => x.ToString()).ToArray();
      Currency[] ccys = wts_.ColumnHeadings.Select(x => Singleton<FXIDs>.Instance[x]).ToArray();

      List<int[]> indicies =new List<int[]>();

      foreach(FXGroup group in groups_)
      {
        List<int> groupIndicies=new List<int>();
        for(int i=0;i<ccys.Length;++i)
          if(ccys[i].IsGroup(group))
            groupIndicies.Add(i);
        
        indicies.Add(groupIndicies.ToArray());
      }

      foreach (DateTime date in wts_.Dates)
      {
        double[] dateWeights = wts_.GetValues(date);
        double[] buckets = new double[groups_.Length];

        for(int g=0;g<groups_.Length;++g)
          foreach (int index in indicies[g])
            buckets[g] += dateWeights[index];

        groupConv.SetValues(date, buckets);
      }

      DataTable dt1 = groupConv.ToDataTable(groupConv.ColumnHeadings, "Date", "dd-MMM-yyyy");

      Chart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.Composite;

      ChartArea area = new ChartArea();
      Chart.CompositeChart.ChartAreas.Add(area);

      AxisItem axisY = new AxisItem();
      axisY.Extent = 50;
      axisY.DataType = AxisDataType.Numeric;
      axisY.OrientationType = AxisNumber.Y_Axis;
      axisY.LineColor = Color.Blue;
      axisY.Labels.Visible = true;
      area.Axes.Add(axisY);

      AxisItem axisX = new AxisItem();
      axisX.DataType = AxisDataType.String;
      axisX.Extent = 80;
      axisX.SetLabelAxisType = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.GroupBySeries;
      axisX.OrientationType = AxisNumber.X_Axis;
      axisX.LineColor = Color.Blue;
      axisX.Labels.Orientation = TextOrientation.VerticalLeftFacing;
      axisX.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing;
      area.Axes.Add(axisX);

      AxisItem axisX2 = new AxisItem();
      axisX2.DataType = AxisDataType.String;
      axisX2.Extent = 80;
      axisX2.OrientationType = AxisNumber.X_Axis;
      axisX2.LineColor = Color.Blue;
      axisX2.Labels.Orientation = TextOrientation.VerticalLeftFacing;
      axisX2.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing;
      axisX2.SetLabelAxisType = SetLabelAxisType.ContinuousData;
      area.Axes.Add(axisX2);

      ChartLayerAppearance myColumnLayer = new ChartLayerAppearance();
      myColumnLayer.ChartType = ChartType.StackColumnChart;
      myColumnLayer.ChartArea = area;

      foreach (FXGroup group in groups_)
      {
        NumericSeries series1 = new NumericSeries();
        series1.Key = group.ToString();
        series1.DataBind(dt1, group.ToString(), "Date");
        series1.PEs.Add(new PaintElement(ColorAttribute.GetAttribute(group).Color));
        myColumnLayer.Series.Add(series1);
        Chart.CompositeChart.Series.Add(series1);
      }

      DataTable dt2 = wts_.SumRows().ToDataTable(format_:"dd-MMM-yyyy");

      ChartLayerAppearance myColumnLayer2 = new ChartLayerAppearance();
      myColumnLayer2.ChartType = ChartType.LineChart;
      myColumnLayer2.ChartArea = area;

      NumericSeries seriesA = new NumericSeries();
      seriesA.Key = "Sum of Wts";
      seriesA.DataBind(dt2, "Value", "Date");
      seriesA.PEs.Add(new PaintElement(Color.Orange));
      myColumnLayer2.Series.Add(seriesA);
      Chart.CompositeChart.Series.Add(seriesA);


      LineChartAppearance la = new LineChartAppearance();
      la.Thickness = 4;
      myColumnLayer2.ChartTypeAppearance = la;


      myColumnLayer.AxisX = axisX;
      myColumnLayer.AxisY = axisY;

      myColumnLayer2.AxisX = axisX2;
      myColumnLayer2.AxisY = axisY;

      myColumnLayer.SwapRowsAndColumns = true;
      this.Chart.CompositeChart.ChartLayers.Add(myColumnLayer);
      this.Chart.CompositeChart.ChartLayers.Add(myColumnLayer2);

      EstablishDefaultTooltip();
      m_wts = wts_;
      m_groups = groups_;
      pbSplitIntoYears.BringToFront();
    }
    public ChartLayerAppearance AddScatterSeries(string desc_, string[] xAxis_, double[] yAxis_, Color color_, NullHandling nullHandling_ = NullHandling.DontPlot, SymbolIcon icon = SymbolIcon.Circle)
    {
      var d = new DataTable();
      d.Columns.Add("Heading", typeof(string));
      d.Columns.Add(desc_, typeof(double));

      for (int i = 0; i < xAxis_.Length; ++i)
      {
        d.LoadDataRow(!double.IsNaN(yAxis_[i]) ? new object[] {xAxis_[i], yAxis_[i]} : new object[] {xAxis_[i]}, true);
      }

      var series = new NumericSeries
      {
        Key = desc_,
        Label = desc_,
        Data =
        {
          LabelColumn = "Heading",
          ValueColumn = desc_
        }
      };
      series.PEs.Add(new PaintElement(color_));
      ultraChart.CompositeChart.Series.Add(series);

      var chart = new ChartLayerAppearance
      {
        ChartComponent = ultraChart,
        ChartArea = ultraChart.CompositeChart.ChartAreas[0],
        ChartType = ChartType.LineChart,
        Key = string.Format("{0}_chart", desc_),
      };

      chart.Series.Add(series);
      series.Data.DataSource = d;
      series.DataBind();

      chart.AxisX = chart.ChartArea.Axes.FromKey("xAxis_Line");
      chart.AxisY = chart.ChartArea.Axes.FromKey("yAxis_Line");

      var lcApp = (LineChartAppearance)chart.ChartTypeAppearance;
      {
        lcApp.EndStyle = LineCapStyle.Round;
        lcApp.DrawStyle = LineDrawStyle.Dot;
        lcApp.Thickness = 7;
        lcApp.MidPointAnchors = true;
        //lcApp.ConnectWithLines = false;
        //lcApp.Icon = icon;
        //lcApp.IconSize = SymbolIconSize.Medium;
        lcApp.NullHandling = nullHandling_;
      }

      ultraChart.CompositeChart.ChartLayers.Add(chart);

      m_datatables.Add(desc_, d);
      ultraChart.InvalidateLayers();

      return chart;
    }
    public void AddColumnChart(string name_, string[] xAxis_, double[] yAxis_, double maxValue_)
    {
      DataTable d = new DataTable();
      d.Columns.Add("Heading", typeof(string));
      d.Columns.Add(name_, typeof(double));

      for (int i = 0; i < xAxis_.Length; ++i)
        d.LoadDataRow(new object[] { xAxis_[i], yAxis_[i] }, true);

      var series = new NumericSeries {Data = {LabelColumn = "Heading", ValueColumn = name_}, Key = name_, Label = name_};
      series.PEs.Add(new PaintElement(Color.White, Color.Transparent, 200, 200, GradientStyle.ForwardDiagonal, PaintElementType.Gradient));
      ultraChart.CompositeChart.Series.Add(series);

      var chart = new ChartLayerAppearance
      {
        ChartComponent = ultraChart,
        ChartArea = ultraChart.CompositeChart.ChartAreas[0],
        ChartType = ChartType.ColumnChart,
        Key = string.Format("{0}_chart", name_)
      };
      chart.AxisX = chart.ChartArea.Axes.FromKey("xAxis_Column");
      chart.AxisY = chart.ChartArea.Axes.FromKey("yAxis_Column");
      chart.AxisY.Labels.ItemFormat = AxisItemLabelFormat.Custom;
      chart.AxisY.Labels.ItemFormatString = "<DATA_VALUE:##0.0%>";

      ultraChart.CompositeChart.ChartLayers.Add(chart);

      chart.Series.Add(series);
      series.Data.DataSource = d;
      series.DataBind();

      {
        var axis = ultraChart.CompositeChart.ChartAreas[0].Axes.FromKey("yAxis_Column");

        double max = yAxis_.Select(x => Math.Abs(x)).Max();
        axis.RangeType = AxisRangeType.Custom;
        axis.RangeMin = -maxValue_;
        axis.RangeMax = maxValue_;

        axis.TickmarkStyle = AxisTickStyle.Percentage;
        axis.TickmarkPercentage = 10d;
      }

      //m_datatables.Add(dt);
      ultraChart.InvalidateLayers();
      
    }
    public void AddLineChart(string name_, string[] xAxis_, double[] yAxis_)
    {
      var d = new DataTable();
      d.Columns.Add("Heading", typeof(string));
      d.Columns.Add(name_, typeof(double));

      for (int i = 0; i < xAxis_.Length; ++i)
      {
        if (double.IsNaN(yAxis_[i]) == false)
          d.LoadDataRow(new object[] { xAxis_[i], yAxis_[i] }, true);
        else
          d.LoadDataRow(new object[] { xAxis_[i] }, true);
      }

      var series = new NumericSeries {Data = {LabelColumn = "Heading", ValueColumn = name_}, Key = name_, Label = name_};
      series.PEs.Add(new PaintElement(ColorAttribute.GetColor(ultraChart.CompositeChart.Series.Count)));
      ultraChart.CompositeChart.Series.Add(series);

      var chart = new ChartLayerAppearance
      {
        ChartComponent = ultraChart,
        ChartArea = ultraChart.CompositeChart.ChartAreas[0]
      };
      chart.AxisX = chart.ChartArea.Axes.FromKey("xAxis_Line");
      chart.AxisY = chart.ChartArea.Axes.FromKey("yAxis_Line");
      chart.ChartType = ChartType.LineChart;
     

      var lcApp = (LineChartAppearance)chart.ChartTypeAppearance;
      lcApp.Thickness = 3;
      lcApp.MidPointAnchors = false;
      lcApp.NullHandling = NullHandling.DontPlot;
      lcApp.HighLightLines = true;

      chart.Key = string.Format("{0}_chart", name_);
      ultraChart.CompositeChart.ChartLayers.Add(chart);

      chart.Series.Add(series);
      series.Data.DataSource = d;
      series.DataBind();

      m_datatables.Add(name_, d);
      ultraChart.InvalidateLayers();
    }
Ejemplo n.º 12
0
 public SMA(NumericSeries input, int period)
     : base(input, period)
 {
 }
Ejemplo n.º 13
0
 public MACD(NumericSeries input, int fast, int slow, int smooth) : base(input, fast, slow, smooth)
 {
     this._fast   = fast;
     this._slow   = slow;
     this._smooth = smooth;
 }
Ejemplo n.º 14
0
        private void AlimentaGraficos()
        {
            //http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_1_of_2.html
            //http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_2_of_2.html

            //Aqui define o tipo de gráfico que será realizado.
            //https://www.infragistics.com/help/winforms/chart-2d-charts
            this.ultraChart1.ChartType = ChartType.Composite;

            ChartArea myChartArea = new ChartArea();

            this.ultraChart1.CompositeChart.ChartAreas.Add(myChartArea);

            AxisItem axisX = new AxisItem();

            axisX.OrientationType         = AxisNumber.X_Axis;
            axisX.DataType                = AxisDataType.String;
            axisX.SetLabelAxisType        = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.GroupBySeries;
            axisX.Labels.ItemFormatString = "<ITEM_LABEL>";
            axisX.Labels.Orientation      = TextOrientation.VerticalLeftFacing;

            AxisItem axisY = new AxisItem();

            axisY.OrientationType         = AxisNumber.Y_Axis;
            axisY.DataType                = AxisDataType.Numeric;
            axisY.Labels.ItemFormatString = "<DATA_VALUE:0.#>";

            //Adiciona os gráficos
            myChartArea.Axes.Add(axisX);
            myChartArea.Axes.Add(axisY);

            //Adiciona as séries na interface
            NumericSeries seriesA = GetNumericSeriesBound();
            NumericSeries seriesB = GetNumericSeriesUnBound();

            this.ultraChart1.CompositeChart.Series.Add(seriesA);
            this.ultraChart1.CompositeChart.Series.Add(seriesB);

            //Cria a aparência das colunas
            ChartLayerAppearance myColumnLayer = new ChartLayerAppearance();

            myColumnLayer.ChartType = ChartType.ColumnChart;
            myColumnLayer.ChartArea = myChartArea;
            myColumnLayer.AxisX     = axisX;
            myColumnLayer.AxisY     = axisY;
            myColumnLayer.Series.Add(seriesA);
            myColumnLayer.Series.Add(seriesB);
            this.ultraChart1.CompositeChart.ChartLayers.Add(myColumnLayer);

            //Cria a legenda
            CompositeLegend myLegend = new CompositeLegend();

            myLegend.ChartLayers.Add(myColumnLayer);
            myLegend.Bounds               = new Rectangle(0, 75, 20, 25);
            myLegend.BoundsMeasureType    = MeasureType.Percentage;
            myLegend.PE.ElementType       = PaintElementType.Gradient;
            myLegend.PE.FillGradientStyle = GradientStyle.ForwardDiagonal;
            myLegend.PE.Fill              = Color.CornflowerBlue;
            myLegend.PE.FillStopColor     = Color.Transparent;
            myLegend.Border.CornerRadius  = 10;
            myLegend.Border.Thickness     = 0;
            this.ultraChart1.CompositeChart.Legends.Add(myLegend);
        }
Ejemplo n.º 15
0
        private void ultraChart1_Load(object sender, EventArgs e)
        {
            this.ultraChart1.Tooltips.HighlightDataPoint = false;

            ultraChart1.ChartType = ChartType.Composite;
            ultraChart1.Data.ZeroAligned = true;

            ChartArea myChartArea = new ChartArea();
            this.ultraChart1.CompositeChart.ChartAreas.Add(myChartArea);

            AxisItem axisX = new AxisItem();
            AxisItem axisY = new AxisItem();

            //Line
            axisX.OrientationType = AxisNumber.X_Axis;
            axisX.DataType = AxisDataType.String;
            axisX.SetLabelAxisType = SetLabelAxisType.ContinuousData;
            axisX.Labels.ItemFormatString = "<ITEM_LABEL:M/d>";
            //axisX.Labels.ItemFormatString = "< MY_VALUE >";
            
            axisX.Labels.Orientation = TextOrientation.VerticalLeftFacing;
            axisX.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.None;
            axisX.LineThickness = 1;
            //axisX.Extent = 40;
            axisX.Labels.Visible = true;
            axisX.Labels.Font = ultraChart1.Axis.X.Labels.SeriesLabels.Font;
            axisX.Labels.FontColor = ultraChart1.Axis.X.Labels.SeriesLabels.FontColor;
            //axisX.ScrollScale.Visible = true;

            axisY.OrientationType = AxisNumber.Y_Axis;
            axisY.Labels.HorizontalAlign = StringAlignment.Far;
            axisY.DataType = AxisDataType.Numeric;
            axisY.Labels.ItemFormatString = "<DATA_VALUE:##.#>";
            //axisY.Labels.ItemFormatString = "< MY_VALUE >";
            
            axisY.TickmarkStyle = AxisTickStyle.Smart;
            axisY.LineThickness = 1;
            //axisY.Extent = 10;
            axisY.RangeType = AxisRangeType.Custom;
            axisY.RangeMin = 0;
            axisY.RangeMax = 600;
            axisY.Labels.Font = ultraChart1.Axis.Y.Labels.Font;
            axisY.Labels.FontColor = ultraChart1.Axis.Y.Labels.FontColor;

            myChartArea.Axes.Add(axisX);
            myChartArea.Axes.Add(axisY);
            
            ChartLayerAppearance myLineLayer1 = new ChartLayerAppearance();
            myLineLayer1.ChartType = ChartType.LineChart;
            myLineLayer1.ChartArea = myChartArea;
            myLineLayer1.AxisX = axisX;
            myLineLayer1.AxisY = axisY;

            ((LineChartAppearance)myLineLayer1.ChartTypeAppearance).Thickness = 1;


            DataTable table = new DataTable();
            table = GetLineData();
            for (int iC = 0; iC < table.Columns.Count - 1; iC++)
            {
                NumericSeries series = new NumericSeries();
                series.Data.DataSource = table;
                series.Data.LabelColumn = table.Columns[0].Caption.ToString();
                series.Data.ValueColumn = table.Columns[iC + 1].Caption.ToString();
                series.Label = table.Columns[iC + 1].Caption.ToString();
                series.DataBind();

                myLineLayer1.Series.Add(series);
            }

            ultraChart1.CompositeChart.ChartLayers.Add(myLineLayer1);

            ultraChart1.Tooltips.Format = TooltipStyle.DataValue;
            //ultraChart1.Tooltips.FormatString = "<DATA_VALUE:0> <ITEM_LABEL> <SERIES_LABEL>";
            ultraChart1.Tooltips.FormatString = "<DATA_VALUE>";


            CompositeLegend myLegend = new CompositeLegend();
            myLegend.ChartLayers.Add(myLineLayer1);
            myLegend.Bounds = new Rectangle(0, 1, 10, 50);
            myLegend.BoundsMeasureType = MeasureType.Percentage;
            myLegend.PE.ElementType = PaintElementType.None;
            myLegend.PE.FillGradientStyle = GradientStyle.ForwardDiagonal;
            myLegend.PE.FillStopColor = Color.Transparent;
            myLegend.Border.CornerRadius = 0;
            myLegend.Border.Thickness = 2;
            
            ultraChart1.CompositeChart.Legends.Add(myLegend);

            Hashtable MyLabelHashTable = new Hashtable();
            MyLabelHashTable.Add("MY_VALUE", new MyLabelRenderer());
            this.ultraChart1.LabelHash = MyLabelHashTable;
            this.ultraChart1.Tooltips.Format = TooltipStyle.Custom;
            this.ultraChart1.Tooltips.FormatString = "<MY_VALUE>";
            this.ultraChart1.Tooltips.Overflow = TooltipOverflow.ChartArea;
        }