Baseunitstep in MVC

2 posts, 0 answers
  1. Mattias Hermansson
    Mattias Hermansson avatar
    24 posts
    Member since:
    May 2010

    Posted 05 Feb 2014 Link to this post


    I'm trying to get the baseunitstep to only be used while showing days, and or if the days exceed more then 100 or if you get to many charts to fit, is this possible with the razor extension?

    Thanks in advance
  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 07 Feb 2014 Link to this post

    Hi Mattias,

    In order to achieve this I can suggest the following: 
    • In the chart dataBound event check what the categoryAxis.baseUnit is (or any other condition you need);
    • If it is days set categoryAxis.baseUnitStep through the setOptions() method.
    function onDB(e) {
        if (e.sender.options.categoryAxis.baseUnit == "days") {
              categoryAxis: {
                 baseUnitStep: 4 // specify the baseUnitStep

    Iliana Nikolova
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top