Commit 08231cb8 authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - bar chart element sample output

parent 015bd222
...@@ -23,25 +23,169 @@ ...@@ -23,25 +23,169 @@
// json string data should be valid else it will return null // json string data should be valid else it will return null
$rawData = '{ $rawData = '{
"color":[
"#8dd3c7",
"#ffffb3"
],
"textStyle":{ "textStyle":{
"color":"#fff" "fontFamily":"Roboto, Arial, Verdana, sans-serif",
"fontSize":13
},
"animationDuration":750,
"grid":{
"left":0,
"right":30,
"top":30,
"bottom":0,
"containLabel":true
}, },
"xAxis":{ "legend":{
"type":"category", "data":[
"data":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"] "Customers",
"Returned"
],
"itemHeight":8,
"itemGap":20,
"textStyle":{
"padding":[
0,
5
],
"color":"#fff"
}
}, },
"yAxis":{ "tooltip":{
"type":"value" "trigger":"axis",
"backgroundColor":"rgba(255,255,255,0.9)",
"padding":[
10,
15
],
"textStyle":{
"color":"#222",
"fontSize":13,
"fontFamily":"Roboto, sans-serif"
},
"axisPointer":{
"type":"shadow",
"shadowStyle":{
"color":"rgba(255,255,255,0.1)"
}
}
}, },
"xAxis":[
{
"type":"value",
"axisLabel":{
"color":"#fff"
},
"axisLine":{
"lineStyle":{
"color":"rgba(255,255,255,0.25)"
}
},
"splitLine":{
"show":true,
"lineStyle":{
"color":"rgba(255,255,255,0.1)",
"type":"dashed"
}
}
}
],
"yAxis":[
{
"type":"category",
"data":[
"Oct",
"Sep",
"Aug",
"July",
"June",
"May",
"Apr",
"Mar",
"Feb",
"Jan"
],
"axisLabel":{
"color":"#fff"
},
"axisLine":{
"lineStyle":{
"color":"rgba(255,255,255,0.25)"
}
},
"splitLine":{
"show":true,
"lineStyle":{
"color":"rgba(255,255,255,0.1)"
}
},
"splitArea":{
"show":true,
"areaStyle":{
"color":[
"rgba(255,255,255,0.01)",
"rgba(0,0,0,0.01)"
]
}
}
}
],
"series":[ "series":[
{ {
"data":[820,932,901,934,1290,1330,1320], "name":"Customers",
"type":"bar", "type":"bar",
"areaStyle":{} "barCategoryGap":"40%",
"label":{
"normal":{
"textStyle":{
"color":"#682d19"
},
"position":"left",
"show":false,
"formatter":"{b}"
}
},
"itemStyle":{
"normal":{
"color":"#6bca6f"
}
},
"data":[
1900,
1029,
1602,
2004,
1100,
1800,
2800,
1407,
2200,
900
]
},
{
"name":"Returned",
"type":"line",
"symbol":"circle",
"symbolSize":7,
"silent":true,
"data":[
100,
1000,
800,
1070,
900,
300,
1200,
900,
1200,
200
],
"itemStyle":{
"normal":{
"color":"#fff",
"borderWidth":2
}
}
} }
] ]
}'; }';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment