question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ramping polygon-opacity in Builder with Turbo Carto is not working

See original GitHub issue

In Builder I get an error if I ramp opacity. For example, if I try something like polygon-opacity: ramp([r_total], 0.1,0.9, quantiles);

I get this error: screen shot 2016-10-04 at 9 49 31 am

If I do the same styling in this Turbo Carto block, it works:

screen shot 2016-10-04 at 9 49 55 am

Any ideas why?

cc @rochoa

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
makellacommented, Dec 16, 2016

Was excited the other day to figure out a hack for ramping opacity so thought I’d share here if anyone is interested in trying it out until we have the ability to do it in Builder.

Since we can use rgba() you can do something like this. Of course, you have to figure out the opacity for each class break manually and convert any hex values to rgb, but at least you can use a classification method to do it without having to figure out how to get the class breaks.

You can use a batch hex > rgb converter on any color scheme with a tool like this: http://www.zonums.com/online/color_converter/

Example syntax:

  polygon-fill: 
    ramp([perc_owner], 
    (rgba(196,230,195,0.2),
    rgba(128,199,153,0.3),
    rgba(77,162,132,0.5),
    rgba(45,121,116,0.7),
    rgba(29,79,96,0.9)), 
    quantiles);

@ramiroaznar thought this would mostly be exciting for you 😃

0reactions
makellacommented, Dec 13, 2017

really?? SUPER EXCITING

Read more comments on GitHub >

github_iconTop Results From Across the Web

Styling with Turbo Carto | CARTO Blog
Each polygon is colored according to the class it falls using a sequential color ramp. Dark colors indicate high values, and light colors,...
Read more >
Setting a polygon-fill ramp to have minimum and maximum ...
Using the Carto web-tool I've set up a map to fill polygons based on the value of one of its attributes. However, due...
Read more >
Ramping polygon-pattern-file property · Issue #57 - GitHub
Details Feature request made by 2 users from SB. It should be great to be able to ramp polygon-pattern-file property.
Read more >
Turbocharged Engine Tuning 101 [GOLD WEBINAR LESSON]
Tuning a turbocharged engine can seem daunting to those coming from a background of tuning naturally aspirated engines.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found