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

a couple of stock chart questions

3 Answers 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeffry
Top achievements
Rank 1
Jeffry asked on 01 Jan 2014, 01:47 AM
hi
the first one might be easier so ill start with that
1)  is there anyway to get rid of the navigator?
2)  in my chart i should be having 10 bars
ie, i have an array with 10 data objects

here is my code:
  
console.log(wData);
 $J($chartD).kendoStockChart({
     dataSource: wData,
     series: [{
         type: "candlestick",
         openField: "open",
         highField: "high",
         lowField: "low",
         closeField: "close"
     }],
     categoryAxis:{
         categories: cats,
         type: "category"
     },
     valueAxis: {
         labels: {
             format: "N0"
         }
     }
 });



i have attached a text file with what console.log(wData) is
also i have a attached a screen shot of the graph

as you can see 
the chart is only rendering the last object and not even correctly
because the open should be "0"

also just fyi
here is what "cats" looks like in the js console (which is correct)
Array[9]
0: "2009"1: "Workforce Headcount"2: "Direct Hire"3: "Acquisition"4: "Voluntary Termination"5: "Involuntary Termination"6: "Layoff"7: "Net Mobility"8: "2010"


pls help
thanks so much

3 Answers, 1 is accepted

Sort by
0
Jeffry
Top achievements
Rank 1
answered on 01 Jan 2014, 01:56 AM
sorry - i meant 9 objects
and i forgot to post the files
=:-(

i couldnt attach the data file
so im just posting it here


Array[9]
0: Object
cat: "2009"
close: 10674
high: 10674
low: 0
open: 0
__proto__: Object
1: Object
cat: "Workforce Headcount"
close: 7671
high: 7671
low: 6831
open: 6831
__proto__: Object
2: Object
cat: "Direct Hire"
close: 2336
high: 2336
low: 2354
open: 2354
__proto__: Object
3: Object
cat: "Acquisition"
close: 695
high: 695
low: 125
open: 125
__proto__: Object
4: Object
cat: "Voluntary Termination"
close: 1034
high: 1034
low: 1268
open: 1268
__proto__: Object
5: Object
cat: "Involuntary Termination"
close: 70
high: 70
low: 48
open: 48
__proto__: Object
6: Object
cat: "Layoff"
close: 351
high: 351
low: 48
open: 48
__proto__: Object
7: Object
cat: "Net Mobility"
close: 0
high: 0
low: 0
open: 0
__proto__: Object
8: Object
cat: "2010"
close: 12157
high: 12157
low: 1
open: 1
__proto__: Object
0
Accepted
Iliana Dyankova
Telerik team
answered on 03 Jan 2014, 08:23 AM
Hi Jeffry,

Apologies for not getting back to you earlier.

Up to the questions:
     1. is there anyway to get rid of the navigator?

To achieve this you should set navigator.visible option to false:
$("#stock-chart").kendoStockChart({
  //....
  navigator: {
      //....
      visible: false
  }
});

    
2. ....the chart is only rendering the last object and not even correctly....
In order to achieve the expected result please try using series.categoryField (instead of categoryAxis.categories):
$("#stock-chart").kendoStockChart({
  //....
  series: [{
     //....
     categoryField: "cat"
 }],
});

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
Jeffry
Top achievements
Rank 1
answered on 03 Jan 2014, 05:35 PM
thank you very much
Tags
General Discussions
Asked by
Jeffry
Top achievements
Rank 1
Answers by
Jeffry
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or