Approved
Last Updated: 06 Feb 2017 11:16 by ADMIN
ADMIN
Hristo
Created on: 02 Dec 2016 09:33
Category: ChartView
Type: Bug Report
1
FIX. RadChartView - after changing the size of the chart some smart labels are not positioned correctly
How to reproduce:

Public Class Form1

    Sub New()

        InitializeComponent()

        Me.SetupLineSeries()

    End Sub

    Private Sub SetupLineSeries()
        Dim splitContainer = New RadSplitContainer()
        splitContainer.SplitPanels.Add(New SplitPanel())
        splitContainer.SplitPanels.Add(New SplitPanel())
        splitContainer.SplitPanels(0).Controls.Add(Me.RadChartView1)
        Me.RadChartView1.Dock = DockStyle.Fill

        splitContainer.Orientation = Orientation.Horizontal
        splitContainer.Parent = Me
        splitContainer.Dock = DockStyle.Fill


        Dim lineSeries As New Telerik.WinControls.UI.LineSeries("2014")
        lineSeries.LegendTitle = "2014"
        lineSeries.ShowLabels = True

        lineSeries.DataPoints.Add(New CategoricalDataPoint(8000, "Jan"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8700, "Feb"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8500, "Mar"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8900, "Apr"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8400, "May"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8300, "Jun"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8600, "Jul"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8800, "Aug"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8400, "Sep"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8300, "Oct"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8500, "Nov"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8100, "Dec"))

        Me.RadChartView1.Series.Add(lineSeries)
        Dim lineSeries2 As New Telerik.WinControls.UI.LineSeries("2015")
        lineSeries2.LegendTitle = "2015"
        lineSeries2.ShowLabels = True

        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Jan"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5900, "Feb"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5700, "Mar"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5500, "Apr"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5300, "May"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5600, "Jun"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Jul"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Aug"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5900, "Sep"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(6100, "Oct"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(7900, "Nov"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(7600, "Dec"))
        Me.RadChartView1.Series.Add(lineSeries2)

        Me.RadChartView1.ShowSmartLabels = True
        Me.RadChartView1.ShowTitle = True
        Me.RadChartView1.ShowLegend = True
        Me.RadChartView1.LegendTitle = "Legend"

        Dim verticalAxis As LinearAxis = RadChartView1.Axes.[Get](Of LinearAxis)(1)
        verticalAxis.Minimum = 4000
        verticalAxis.Maximum = 20000
        verticalAxis.MajorStep = 4000

        Me.RadChartView1.ShowPanZoom = True
    End Sub

End Class
0 comments