Series with same value

Thread is closed for posting
4 posts, 1 answers
  1. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 08 Jun 2012 Link to this post

    I have a chart with line series. It happens that the series starting with the same values​​, or close to, the labels are mixed not giving to differentiate from one another. How do I space the value labels of the series?
  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 12 Jun 2012 Link to this post

    Hi Paulo,

     This can be achieved with our Intelligent Labels feature.

    All the best,
    Evgenia
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 12 Jun 2012 Link to this post

    I could not. Below my code. Where do I put the Intelligent Labels? I tried in several places in the code and nothing.

     

    RadChart criaGrafico(ComparativoEmissoresBL bl)

    {

     

    RadChart radChart1 = new RadChart();

    radChart1.Height = 400;

    radChart1.Width = 1024;

    radChart1.ChartTitle.TextBlock.Text = bl.nomeTituloChart;

    radChart1.ChartTitle.TextBlock.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Center;

    radChart1.ChartTitle.Appearance.Dimensions.AutoSize =

     

    false;

    radChart1.ChartTitle.Appearance.Dimensions.Height = 50;

    radChart1.ChartTitle.Appearance.Dimensions.Width = 750;

    radChart1.ChartTitle.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.ChartTitle.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Bottom;

    radChart1.Legend.Appearance.Overflow = Telerik.Charting.Styles.

     

    Overflow.Row;

    radChart1.Legend.Appearance.Dimensions.AutoSize =

     

    false;

    radChart1.Legend.Appearance.Dimensions.Height = 25;

    radChart1.Legend.Appearance.Dimensions.Width = 400;

    radChart1.Legend.Appearance.Border.Color = System.Drawing.

     

    Color.Transparent;

    radChart1.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Bottom;

    radChart1.Legend.TextBlock.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Center;

    radChart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Charting.Styles.

     

    FillType.Solid;

    radChart1.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.

     

    Color.Transparent;

    radChart1.PlotArea.Appearance.Border.Visible =

     

    false;

    radChart1.PlotArea.Appearance.Dimensions.Margins.Top = Telerik.Charting.Styles.

     

    Unit.Percentage(20);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.

     

    Unit.Percentage(30);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.PlotArea.Appearance.Dimensions.Width = 800;

     

    // Telerik.Charting.Styles.Unit.Pixel(400);

    radChart1.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.

     

    ChartAxisLayoutMode.Inside;

    radChart1.PlotArea.XAxis.AutoScale =

     

    false;

    radChart1.PlotArea.XAxis.IsZeroBased =

     

    false;

    radChart1.PlotArea.XAxis.Appearance.MajorGridLines.Visible =

     

    false;

    radChart1.PlotArea.XAxis.Appearance.TextAppearance.AutoTextWrap = Telerik.Charting.Styles.

     

    AutoTextWrap.True;

    radChart1.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Top;

    radChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font =

     

    new System.Drawing.Font("Arial", 8);

    radChart1.Legend.Appearance.ItemMarkerAppearance.Dimensions.Width = 25;

    radChart1.Legend.Appearance.ItemMarkerAppearance.Figure = Telerik.Charting.Styles.

     

    DefaultFigures.Rectangle;

     

    //ChartSeries chartSeries = new ChartSeries();

     

    //Instacia as series que serão mostradas nos gráficos

     

    ChartSeries chartSeries1 = radChart1.CreateSeries((DateTime.Now.Year - 3).ToString(), System.Drawing.Color.Blue, System.Drawing.Color.Blue, ChartSeriesType.Bar);

     

    ChartSeries chartSeries2 = radChart1.CreateSeries((DateTime.Now.Year - 2).ToString(), System.Drawing.Color.Green, System.Drawing.Color.Green, ChartSeriesType.Bar);

     

    ChartSeries chartSeries3 = radChart1.CreateSeries((DateTime.Now.Year - 1).ToString(), System.Drawing.Color.BlueViolet, System.Drawing.Color.BlueViolet, ChartSeriesType.Bar);

     

    ChartSeries chartSeries4 = radChart1.CreateSeries("Variação " + (DateTime.Now.Year - 2).ToString() + "-" + (DateTime.Now.Year - 1).ToString(), System.Drawing.Color.Red, System.Drawing.Color.Red, ChartSeriesType.Line);

    chartSeries1.Type =

     

    ChartSeriesType.Bar;

    chartSeries2.Type =

     

    ChartSeriesType.Bar;

    chartSeries3.Type =

     

    ChartSeriesType.Bar;

    chartSeries4.Type =

     

    ChartSeriesType.Line;

     

    //A orientação do gráfico

    radChart1.SeriesOrientation =

     

    ChartSeriesOrientation.Vertical;

    radChart1.Legend.Appearance.Overflow = Telerik.Charting.Styles.

     

    Overflow.Row;

    radChart1.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

     

    AlignedPositions.Bottom;

    radChart1.PlotArea.XAxis.AddRange(1, bl.stringArrayEmissores.Length, 1);

     

    for (int i = 0; i < bl.stringArrayEmissores.Length; i++)

    {

    radChart1.PlotArea.XAxis[i].TextBlock.Text = bl.stringArrayEmissores[i];

    }

    chartSeries1.SetValues(bl.doubleArray2008);

    chartSeries2.SetValues(bl.doubleArray2009);

    chartSeries3.SetValues(bl.doubleArray2010);

    chartSeries4.SetValues(bl.doubleArrayVariacao);

     

    return radChart1;

    }

  5. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 12 Jun 2012 Link to this post

    I resolved:

    radChart1.IntelligentLabelsEnabled = true;

    Thanks for all.
Back to Top