Cartodb: Styling by value does not work with boolean fields

Created on 4 Oct 2016  路  13Comments  路  Source: CartoDB/cartodb

Styling by value does not work with boolean fields (Turbo-Carto* is not applied).

STR

  • Create a map with a dataset with a boolean field.
  • Click on STYLE.
  • Click on color FILL.
  • Select BY VALUE and choose the boolean field. The expected result would be a categoric map, instead what is showing is a simple map (screenshot).

boolean

*CartoCSS:

#layer {
  marker-width: 7;
  marker-fill: ramp([arrest], (#5B3F95, #1D6996), ("false", "true"));
  marker-fill-opacity: 1;
  marker-allow-overlap: true;
  marker-line-width: 1;
  marker-line-color: #FFF;
  marker-line-opacity: 1;
}
bug

Most helpful comment

Ready in production

All 13 comments

Tested editing the CartoCSS by hand, and it doesn't either work with:

  • true / false (without quotes)
  • 0 / 1

Is this still happening?

Yes, it is still happening.

boolean

S/B: 10679281

reproduced here.

Happening for S/B 12242644

Not using quotes in the conditional CartoCSS values worked in this test:

screen shot 2017-05-01 at 12 02 02 pm

we might need to prioritize this as a bug @jorgesancha

Prioritizing

PR: cartodb/turbo-carto#67

Acceptance

Deploy the tiler (windshaft-cartodb) branch fix_booleans_turbocarto and follow the STR that Ramiro write down here

Acceptance OK:

screen shot 2017-05-22 at 11 59 23

Ready in production

Great, thanks! @CartoDB/support I notified S/B 10679281 and 12242644.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xavijam picture xavijam  路  5Comments

ivanmalagon picture ivanmalagon  路  3Comments

makella picture makella  路  3Comments

santisaez picture santisaez  路  5Comments

noguerol picture noguerol  路  5Comments