bertin icon indicating copy to clipboard operation
bertin copied to clipboard

Choropleth: using normalized value between [0, 1] => Only one class

Open remydecoupes opened this issue 1 year ago • 0 comments

I'm trying to draw a choropleth layer with values between [0, 1], but it seems that the process rounds the numbers (truncating them to 0):

bertin_truncating_0

Here is my chunck of code:

bertin.draw({
  layers: [
    {
      type: "layer",
      geojson: gdi,
      tooltip: "$mean_ratio",
      fill: {
        type: "choro",
        values: "mean_ratio",
        nbreaks: 10,
        method: "quantile",
        colors: "RdYlGn",
        leg_round: -1,
        leg_title: `Mean ratio`,
        leg_x: 100,
        leg_y: 200,
      }
    },
    {type: "graticule"},
    {type: "outline"},
  ],
}

remydecoupes avatar Jun 26 '24 15:06 remydecoupes