Template:Describedgraph

From LinuxReviews
Jump to navigationJump to search

just Template:Standardgraph with more room to write descriptions for each value. {

 "version": 2, "width": 350, "height": {{{2}}},
 "padding": {"top": 10, "left": 220, "bottom": 30, "right": 10},
 "data": [
   {
     "name": "table",

{{{1}}}

   }
 ],
 "scales": [
   {
     "name": "x",
     "range": "width",
     "domain": {"data": "table", "field": "v"}
   },
   {
     "name": "y",
     "range": "height",
     "type": "ordinal",
     "domain": {"data": "table", "field": "t"}
   }
 ],
 "axes": [
   {"type": "x", "scale": "x"},
   {"type": "y", "scale": "y"}
 ],
 "marks": [
   {
     "type": "rect",
     "from": {"data": "table"},
     "properties": {
       "enter": {
         "y": {"scale": "y", "field": "t"},
         "height": {"scale": "y", "band": true, "offset": -1},
         "x": {"scale": "x", "value": 0},
         "x2": {"scale": "x", "field": "v"}
       },
       "update": {
         "fill": {"value": "steelblue"}
       },
       "hover": {
         "fill": {"value": "green"}
       }
     }
   }
 ]

}