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

Chart Navigator animation

1 Answer 51 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Chance
Top achievements
Rank 2
Chance asked on 29 Sep 2014, 03:14 PM
How can I move the navigator slider programmatically?? 
The navigator returns days and I only want months (working), but I need to 'snap' the navigator to the nearest tick.

navigator: {
    seriesDefaults: {
        missingValues: "interpolate"
    },
    series: series,
    pane: {
        height: 60
    },
    select: {
        from: sliderStartDate,
        to: endDate
    },
    categoryAxis: {
        baseUnit: 'months',
        baseUnitStep: "auto",
        autoBaseUnitSteps: {
            months: [1]
        },
        labels: {
            rotation: -30,
            step: 1,
            font: "8px sans-serif"
        }
    },
    hint: {
        format: "{0:MMM yyyy} - {1:MMM yyyy}"
    }
},
selectEnd: function () {
    var totalChart = $("#total-chart").data('kendoStockChart');
    var selectedStartDate = new Date(totalChart._navigator.options.select.from.getFullYear(), totalChart._navigator.options.select.from.getMonth(), 1);
    var selectedEndDate = new Date(totalChart._navigator.options.select.to.getFullYear(), totalChart._navigator.options.select.to.getMonth() + 1, 0);
    //TODO: figure out how to snap slider to first and last days of months.
    renderPage(selectedStartDate, selectedEndDate);
}

For the Above TODO I have tried:
totalChart._navigator.options.select.from = selectedStartDate;
totalChart._navigator.options.select.to = selectedEndDate;
totalChart.resize();

Which does not work.
Any ideas how I can re-render the chart (preferably just the navigation slider) without requesting the remote chart data again??

Thanks,
Chance

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 30 Sep 2014, 12:29 PM
Hello Chance,

Unfortunately with our current implementation of Kendo UI Stock chart the navigator is not so flexible and you can't do this. We will try to improve it in our future releases. So stay tuned.

I have updated your telerik points.

Regards,
Hristo Germanov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Chance
Top achievements
Rank 2
Answers by
Hristo Germanov
Telerik team
Share this question
or