stack-bar-on-show.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "title":{
  3. "text":"Test stacked bar charts",
  4. "style":"{font-size:16px;}"
  5. },
  6. "elements":[
  7. {
  8. "type": "bar_stack",
  9. "keys": [
  10. {"colour":"#FFB900", "text": "Key 1", "font-size": 10},
  11. {"colour":"#FFB9F0", "text": "Key 2", "font-size": 16}
  12. ],
  13. "tip": "#total#<br>(bar total)",
  14. "on-show": {"type": "pop", "delay":0.5, "cascade":0.6},
  15. "values": [
  16. [2.5,{"val":5}],
  17. [{"val":2.5},{"val":5},{"val":2.5}],
  18. null,
  19. [{"val":5},{"val":5},{"val":2},{"val":2},{"val":2,"colour":"#ff00ff","tip":"hello"},{"val":2},{"val":2}]
  20. ]
  21. },
  22. {
  23. "type": "bar",
  24. "colour": "#9933CC",
  25. "text": "Bar",
  26. "font-size": 10,
  27. "on-show": {"type": "pop", "delay":0.5, "cascade":0.6},
  28. "values" : [9,6,7,9]
  29. }
  30. ],
  31. "x_axis":{
  32. "max":4,
  33. "steps": 1,
  34. "labels": {
  35. "labels": ["January","February","March","April"]
  36. },
  37. "stroke": 12,
  38. "tick-height": 6
  39. },
  40. "y_axis":{
  41. "max": 20
  42. },
  43. "tooltip":{
  44. "mouse": 2,
  45. "stroke":1
  46. }
  47. }