Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding conditional formatting for big number charts. #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leeorengel
Copy link

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
Copy link
Contributor

leqilong commented Mar 1, 2019

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!

@leqilong leqilong self-requested a review October 11, 2019 18:47
Copy link
Contributor

@leqilong leqilong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @leeorengel ,
var bigNumber = content[0][columnName] this line would always return the first row's values 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants