Chart Navigator animation

2 posts, 0 answers
  1. Chance
    Chance avatar
    12 posts
    Member since:
    Mar 2014

    Posted 29 Sep 2014 Link to this post

    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

  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 30 Sep 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top