mode / alamode

A community-maintained library of visualizations for Mode reports
MIT License
70 stars 67 forks source link

Adding conditional formatting for big number charts. #33

Open leeorengel opened 6 years ago

leeorengel commented 6 years ago

Modeled after the conditional formatting for tables, this adds support for coloring big number charts. Thresholds follow the same rules as the other conditional formatting methods.

Here's a screenshot of what it looks like on a mode report (using the code in this PR as in-lined JS in the report)

screen shot 2018-08-20 at 9 11 14 pm
leqilong commented 5 years ago

Hi @leeorengel , thanks for submitting this PR. var bigNumber = content[0][columnName] this line of code would always return the value in the first row's from query results. It won't return the correct the big number if the big number chart is configured to show sum/average/max/last row, etc. You might want to get the correct big number through inspecting the elements on the chart itself. Here's an example report: https://modeanalytics.com/modeanalytics/reports/cbbe44fd2186/presentation Thanks!