AR 13+ LineCharts 3D SmartLabel

Posted by: dlipsy on 10 June 2021, 4:19 am EST

  • Posted 10 June 2021, 4:19 am EST

    I have had troubles getting my category labels to work for my points values that contain dates. Note how the very first DateTime stamp shows on the left-most side, but not on right-hand side. It just cuts off the right-most value from the label. Can you advise on how I can show my right-most value in the X-Axis label?

    var currentSeries = FindMySeriesByName(series, groupByVal);
                if (currentSeries != null)
                {
                    currentSeries.AxisY = yAxis;
                    currentSeries.AxisX = xAxis;
                    currentSeries.AxisX.LabelFormat = "{0:d}\n{0:t}";
                    currentSeries.AxisX.LabelsGap = 1;
                    currentSeries.AxisX.SmartLabels = false;
                    var lastSeriesVal = currentSeries.Points[currentSeries.Points.Count - 1];
    
    //I've even tried adding a "dummy point" to move the label to show the last value
                    if (DateTime.TryParse(lastSeriesVal.XValue.ToString(), out DateTime lastSeriesValue))
                        currentSeries.Points.Add(new DataPoint(lastSeriesValue.AddMonths(3), new DoubleArray( new double[] { 0.0 }), true));
    
                    currentSeries.AxisX.Title = "Date Collected";
                    var ySuffix = string.Empty;
                    if (yAxis.Max > 1000.0)
                        ySuffix = $" (Thousands)";
                    if (yAxis.Max > 1000000.0)
                        ySuffix = $" (Millions)";
                    currentSeries.AxisY.Title = "RLU Reading "  + ySuffix;
    
                    rluChartControl.Titles[0].Text = currentSeries.Name;
                    rluChartControl.Series.Add(currentSeries);
    ```[img]https://gccontent.blob.core.windows.net/forum-uploads/file-3344d0d9-b2dc-4940-9ea7-d522e833fb93.png[/img][img]https://gccontent.blob.core.windows.net/forum-uploads/file-456ff60a-b4e0-4ba9-87ea-2d5a56cedb22.png[/img]
  • Posted 11 June 2021, 4:59 am EST

    Hello,

    It is by design. It is adjusted according to the Chart size so that label should not trimmed.

    Thanks,

    Mohit

  • Posted 11 June 2021, 7:28 am EST

    OK, so how do I customize these labels, then? I don’t want it to chop off data values, which it is currently doing at the right-hand side.

  • Posted 13 June 2021, 8:45 pm EST - Updated 30 September 2022, 7:39 am EST

    Hello,

    Can you rotate label to 90 degree so that label can fit in the x-axis. Please refer to the attached image.

    Thanks,

    Mohit

  • Posted 15 June 2021, 6:19 am EST

    Thanks, I will check it out.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels