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

feat(heatmap): add valueShown in heatmap debug state #1460

Merged
merged 6 commits into from
Nov 17, 2021

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Nov 3, 2021

Summary

The heatmap debugState will now include a valueShown parameter to show if the value labels for the cells are shown or not based on the config.

...
  // Heatmap debug state
      heatmap: {
        cells: geoms.heatmapViewModel.cells.map((cell) => ({
          x: cell.x,
          y: cell.y,
          fill: RGBATupleToString(cell.fill.color),
          formatted: cell.formatted,
          value: cell.value,
          valueShown: geoms.config.cell.label.visible && Number.isFinite(geoms.heatmapViewModel.cellFontSize(cell)),
        })),
...

Screen Shot 2021-11-04 at 12 03 30 PM

Details

The calculation is lifted from canvas_renderers.ts line 77

Issues

Closes #1436

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • All related issues have been linked (i.e. closes #123, fixes #123)

@rshen91 rshen91 added :heatmap Heatmap/Swimlane chart related issue enhancement New feature or request labels Nov 3, 2021
@rshen91 rshen91 marked this pull request as ready for review November 4, 2021 18:38
Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

LGTM

@rshen91 rshen91 merged commit 962e089 into elastic:master Nov 17, 2021
@rshen91 rshen91 deleted the annotation-heatmap branch November 17, 2021 17:13
nickofthyme pushed a commit that referenced this pull request Nov 18, 2021
# [40.0.0](v39.0.2...v40.0.0) (2021-11-18)

### Bug Fixes

* **interactions:** remove the option for pixelRatio with png snapshot ([#1431](#1431)) ([eebb069](eebb069))
* **xy:** occlude points outside of y domain ([#1475](#1475)) ([3176f02](3176f02))

### Features

* **annotations:** add annotations to DebugState ([#1434](#1434)) ([c5ea600](c5ea600))
* **heatmap:** add valueShown in heatmap debug state ([#1460](#1460)) ([962e089](962e089))

### BREAKING CHANGES

* **interactions:** The getPNGSnapshot function no longer has an option for pixelRatio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :heatmap Heatmap/Swimlane chart related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Heatmap] Add value label visibility/drawing state in debug data
2 participants