Adding a big number total viz type that is not a timeseries metric#212
Conversation
| @@ -1,4 +1,4 @@ | |||
| .big_number g.axis text { | |||
| .big_number g.axis text, .big_number_total g.axis text { | |||
There was a problem hiding this comment.
nit, but style-wise (https://github.com/airbnb/css#formatting) each selector should have its own line when using multiple selectors in a rule declaration.
|
a couple of nit picky things about js linting, overall looks good though! |
2086607 to
6cfeb0f
Compare
|
To both showcase this new viz and get unit tests coverage you can add an example slice in |
| """Put emphasis on a single metric with this big number viz""" | ||
|
|
||
| viz_type = "big_number_total" | ||
| verbose_name = "Big Number Total" |
There was a problem hiding this comment.
Maybe this new viz should be just "Big Number" and the previous one should say "Big Number with Trendline" or something. The viz_type we cannot change because of backwards compatibility, but the verbose_name we can change all we want.
|
As a side note it would be nice to have a time expression (much like That might be brutal on the database's depending on indexes / partitioning, but maybe there could also be a table level setting called |
6cfeb0f to
0dd20b0
Compare
|
@williaster Thanks for all the feedback. Added fixes. Let me know if there's anything that still doesn't look good |
|
|
||
| .big_number .domain { | ||
| .big_number .domain, | ||
| .big_number_total .domain{ |
There was a problem hiding this comment.
don't worry about changing it for this diff, but going forward I'm trying to get people to adopt dash case for css eg .big-number-total
BEM is also an interesting approach if you feel like reading :) https://css-tricks.com/bem-101/
|
|
||
| viz_type = "big_number" | ||
| verbose_name = "Big Number" | ||
| verbose_name = "Big Number with Trendline" |
|
LGTM! nice improvement! :) |
* init release for wk 45 * update changelog * fix pip dependencies * Update requirements.txt * update requirements * push * Adding docs on bumping submodule / updating roles.yaml * Fixing up requirements.txt * Fixing docs * Minor twweak * Update README.md Co-authored-by: hughhhh <hughmil3s@gmail.com>
…ment (apache#212) Updates the requirements on [@superset-ui/legacy-plugin-chart-sunburst](https://github.com/apache-superset/superset-ui-plugins) to permit the latest version. - [Release notes](https://github.com/apache-superset/superset-ui-plugins/releases) - [Changelog](https://github.com/apache-superset/superset-ui-plugins/blob/master/CHANGELOG.md) - [Commits](apache-superset/superset-ui-plugins@v0.10.0...v0.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…ment (apache#212) Updates the requirements on [@superset-ui/legacy-plugin-chart-sunburst](https://github.com/apache-superset/superset-ui-plugins) to permit the latest version. - [Release notes](https://github.com/apache-superset/superset-ui-plugins/releases) - [Changelog](https://github.com/apache-superset/superset-ui-plugins/blob/master/CHANGELOG.md) - [Commits](apache-superset/superset-ui-plugins@v0.10.0...v0.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…ment (apache#212) Updates the requirements on [@superset-ui/legacy-plugin-chart-sunburst](https://github.com/apache-superset/superset-ui-plugins) to permit the latest version. - [Release notes](https://github.com/apache-superset/superset-ui-plugins/releases) - [Changelog](https://github.com/apache-superset/superset-ui-plugins/blob/master/CHANGELOG.md) - [Commits](apache-superset/superset-ui-plugins@v0.10.0...v0.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…ment (apache#212) Updates the requirements on [@superset-ui/legacy-plugin-chart-sunburst](https://github.com/apache-superset/superset-ui-plugins) to permit the latest version. - [Release notes](https://github.com/apache-superset/superset-ui-plugins/releases) - [Changelog](https://github.com/apache-superset/superset-ui-plugins/blob/master/CHANGELOG.md) - [Commits](apache-superset/superset-ui-plugins@v0.10.0...v0.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…ment (apache#212) Updates the requirements on [@superset-ui/legacy-plugin-chart-sunburst](https://github.com/apache-superset/superset-ui-plugins) to permit the latest version. - [Release notes](https://github.com/apache-superset/superset-ui-plugins/releases) - [Changelog](https://github.com/apache-superset/superset-ui-plugins/blob/master/CHANGELOG.md) - [Commits](apache-superset/superset-ui-plugins@v0.10.0...v0.11.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@williaster @mistercrunch
I'm adding a new big number total viz type that uses the same d3 as the big number but it is not a timeseries metric, so it will aggregate over whatever time period is given (this will allow us to do WAUs). I've also added functionality to add descriptive text below the number. I originally tried to adjust the text size based on the length but couldn't get it to work because of the loading order of the viz.