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

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

2 Answers 5 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeffry
Top achievements
Rank 1
Jeffry asked on 02 Jan 2014, 03:42 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Nikolova
Telerik team
answered on 03 Jan 2014, 08:39 AM
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!
0
Accepted
Jeffry
Top achievements
Rank 1
answered on 03 Jan 2014, 05:36 PM
ah yes
the key to making every label show up was:
step: 1,
skip: 0


thank you
Tags
General Discussions
Asked by
Jeffry
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Jeffry
Top achievements
Rank 1
Share this question
or