This is a migrated thread and some comments may be shown as answers.

Scrolling a chart takes my labels with it...

1 Answer 110 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
scott
Top achievements
Rank 1
scott asked on 24 Feb 2013, 03:52 AM
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);
}

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 27 Feb 2013, 02:50 PM
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.
Tags
ChartView
Asked by
scott
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or