Vega-lite

From Bitpost wiki
Revision as of 15:01, 3 March 2018 by M (talk | contribs) (Created page with "=== Shapes and Colors === To use shapes and colors for data series, ensure that the data source is a STRING not NUMBER, then: "mark": "point", // when using sha...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Shapes and Colors

To use shapes and colors for data series, ensure that the data source is a STRING not NUMBER, then:

         "mark": "point",    // when using shape field in encoding
         "encoding": {
           "shape": {"field": "Name", "type": "nominal"},
           "color": {"field": "Name", "type": "nominal"},

Size

You can use a hardcoded size for shapes and cirles:

           "size": {"field": "Cylinders", "type": "quantitative"}

Or you can use a NUMBER as a quantitative type:

           "size": {"value": 200}