Scrolling a chart takes my labels with it...

2 posts, 0 answers
  1. scott
    scott avatar
    67 posts
    Member since:
    Jul 2010

    Posted 23 Feb 2013 Link to this post

    Hi.  I'm working with the winforms chartview and exploring what it can do.  I've noticed that If I scroll and zoom my chart with control/mouse-wheel and click/drag operations, the labels fly off the X axis and start scrolling with the chart... I've attached a pic and some code.

    Ideas?

    ChartPanZoomController panZoomController = new ChartPanZoomController();
    panZoomController.PanZoomMode = ChartPanZoomMode.Both;
    chart.Controllers.Add(panZoomController);
    private void DrawChart(string ticker)
    {
        chart.Series.Clear();
        chart.ShowPanZoom = true;
     
        CandlestickSeries series = new CandlestickSeries();
        List<DailyOHLCV> prices = hStocks[ticker];
        foreach (DailyOHLCV dayPrice in prices)
            series.DataPoints.Add(
                new OhlcDataPoint(dayPrice.open, dayPrice.high, dayPrice.low, dayPrice.close, dayPrice.date));
     
        DateTimeCategoricalAxis axis = new DateTimeCategoricalAxis();
        axis.LabelFormat = "{0:dd-MMM-yy}";
        axis.LabelRotationAngle = 90;
        axis.LabelFitMode = AxisLabelFitMode.Rotate;
        axis.MajorTickInterval = chart.Width / 10;
        series.HorizontalAxis = axis;
        chart.Series.Add(series);
    }
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 27 Feb 2013 Link to this post

    Hi Scott,

    Thank you for writing.

    I was able to reproduce the issue you are experiencing and have logged it in our Public Issue Tracking System - PITS. You can track the progress of the issue, subscribe for status changes and add your vote/comment to it on the following link - PITS Issue. We will do our best to try and fix this issue for our next release. Unfortunately I am not able to give you a workaround due to the nature of the issue.

    I have also updated your Telerik points for bringing this issue to our attention.

    I hope this helps. Do not hesitate to write back with any further questions.

    All the best,
    Ivan Petrov
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top