Cluvio updates
Cluvio updates
www.cluvio.com

Labels for GeoJSON charts

 

Improvement

 

 

GeoJSON map chart now supports adding labels for the displayed features (Point, Line, or Polygon). These can be added via the properties section in the generated GeoJSON using the following attributes:

  • label-text - text to display. You can use \n to wrap text.
  • label-color - font color, as a hex value.
  • label-size - font size in points.

Here is an example:

geojson-labels.png

SELECT '{
  "type": "Feature",
  "properties": {
    "name": "Bermuda Triangle",
    "label-text": "Bermuda\\nTriangle",
    "label-color": "#FF0000",
    "label-size": 16,
    "area": 1150180
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-64.73, 32.31],
        [-80.19, 25.76],
        [-66.09, 18.43],
        [-64.73, 32.31]
      ]
    ]
  }
}' as polygon