-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(legend): improve last value handling (#2115)
This commit cleans up the concept of what the value, shown after the legend item label, represents. We removed every concept of bucket/time interval from this calculation to clarify the legend item value concept. This allows us to decouple our code from Elasticsearch or other data sources. A small, but fixable side-effect is: the last value depends entirely on the passed data, so if you pass just 10 values of a series that should cover 100 data points, we consider the last value the last of these 10 values: if the 10th value is not at the extreme edge of your data domain we still consider that 10th value as the last one. If you instead, are looking to depict the extreme edge of your data domain (the 100th element) that in the mentioned example is empty/null then you should pass all the 100 data points with null values where needed. BREAKING CHANGE: In cartesian charts, the default legend value now represents the data points that coincide with the latest datum in the X domain. Please consider passing every data point, even the empty ones (like empty buckets/bins/etc) if your x data domain doesn't fully cover a custom x domain passed to the chart configuration.
- Loading branch information
Showing
16 changed files
with
338 additions
and
123 deletions.
There are no files selected for viewing
Binary file added
BIN
+8.59 KB
...nshots/all.test.ts-snapshots/baselines/test-cases/domain-edges-chrome-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+50.2 KB
...-last-value-should-be-aligned-across-areas-and-bars/custom-1ms-chrome-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...st-value-should-be-aligned-across-areas-and-bars/custom-domain-chrome-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.6 KB
...ast-value-should-be-aligned-across-areas-and-bars/custom-empty-chrome-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.4 KB
...last-value-should-be-aligned-across-areas-and-bars/data-domain-chrome-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.