简体   繁体   中英

Displaying data object in wrong category

I have the following implementation:

http://jsfiddle.net/c1dfuj1s/3/

I have two catgeories : 1970 and 1975.

My question is that even though I am adding a data to 1975, but it adds to 1970.

{
   "series": "item6",
   "category": "1975",
   "value": 105
 },

在此处输入图片说明

Not sure exactly why this happens, but you can solve it by adding a zero value item 6 to 1970:

 {
    "series": "item6",
    "category": "1970",
    "value": 0
},  
    {
    "series": "item6",
    "category": "1975",
    "value": 105
},

Updated FIDDLE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM