need help to get stock chart categoryAxis.labels.step=0 to work

3 posts, 2 answers
  1. Jeffry
    Jeffry avatar
    20 posts
    Member since:
    Jun 2013

    Posted 01 Jan 2014 Link to this post

    hello 
    here is the code im using to call a stock chart
    which works
                $J($chartD).kendoStockChart({
                    dataSource: wData,
                    series: [{
                        type: "candlestick",
                        openField: "open",
                        closeField: "close",
                        highField: "high",
                        lowField: "low",
                        categoryField: "cat",
     
                        notes:{
                            line: {
                                width: 2,
                                length: 2
                            },
                            label: {
                                font: "10px arial"
                            }
                        },
     
                        tooltip:{
                            format: "{4}:<br /> {0:n0} -- {3:n0}"
                        }
                    }],
                    categoryAxis:{
                        categories: cats,
                        type: "category",
                        labels: {
                            font: "9px arial,sans-serif",
                            rotation: 45,
    //                        step: 0,
                            skip: 0
                        }
                    },
                    valueAxis: {
                        labels: {
                            format: "N0"
                        }
                    }
                });


    as soon as i uncomment the categoryAxis.labels.step line
    the chart just spins out and crashes my browser tab (chrome)

    can you pls enlighten me on what im doing wrong?

    thx so much




  2. Answer
    Jeffry
    Jeffry avatar
    20 posts
    Member since:
    Jun 2013

    Posted 03 Jan 2014 Link to this post

    Hi Jeffry,

    In order to display each categoryAxis label you should set categoryAxis.labels.step 1:
    $("#stock-chart").kendoStockChart({
      //....
      categoryAxis: {
         //.....
         labels: {
            //....
            step: 1
         }
       }
    });

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Answer
    Jeffry
    Jeffry avatar
    20 posts
    Member since:
    Jun 2013

    Posted 03 Jan 2014 Link to this post

    ah yes
    the key to making every label show up was:
    step: 1,
    skip: 0


    thank you
Back to Top