-
Notifications
You must be signed in to change notification settings - Fork 393
feat: Wire heatmap chart into dashboard editor and tile rendering #2107
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
base: main
Are you sure you want to change the base?
Changes from 23 commits
ec48095
1ee7f0f
21dfd1a
f21af1f
9a15708
58011b3
a7d7646
aa64f1a
1f5b425
09854eb
9b4dc70
1895cee
0160d84
af06542
b392516
78c26de
d68bb1a
9772d1f
2721fb6
badd8d5
58fd368
7180587
59b2476
a587ca2
f730d48
be51b97
435663b
a285969
e676713
e89d581
c8970d6
1f2b4fe
7509050
41fff1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -29,6 +29,7 @@ import { IS_LOCAL_MODE } from '@/config'; | |||||
| import { DEFAULT_TILE_ALERT } from '@/utils/alerts'; | ||||||
|
|
||||||
| import { ChartSeriesEditor } from './ChartSeriesEditor'; | ||||||
| import { HeatmapSeriesEditor } from './HeatmapSeriesEditor'; | ||||||
| import { TileAlertEditor } from './TileAlertEditor'; | ||||||
|
|
||||||
| type ChartEditorControlsProps = { | ||||||
|
|
@@ -56,6 +57,7 @@ type ChartEditorControlsProps = { | |||||
| chartConfigForExplanations?: ChartConfigWithOptTimestamp; | ||||||
| onSubmit: (suppressErrorNotification?: boolean) => void; | ||||||
| openDisplaySettings: () => void; | ||||||
| openHeatmapSettings?: () => void; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need to be optional? Looks like it is always provided
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — (no longer optional).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Apologies, previous reply lost the code snippet to shell escaping.) Done — |
||||||
| }; | ||||||
|
|
||||||
| export function ChartEditorControls({ | ||||||
|
|
@@ -83,6 +85,7 @@ export function ChartEditorControls({ | |||||
| chartConfigForExplanations, | ||||||
| onSubmit, | ||||||
| openDisplaySettings, | ||||||
| openHeatmapSettings, | ||||||
| }: ChartEditorControlsProps) { | ||||||
| return ( | ||||||
| <> | ||||||
|
|
@@ -113,7 +116,15 @@ export function ChartEditorControls({ | |||||
| )} | ||||||
| </Group> | ||||||
| </Flex> | ||||||
| {displayType !== DisplayType.Search && Array.isArray(select) ? ( | ||||||
| {displayType === DisplayType.Heatmap && Array.isArray(select) ? ( | ||||||
| <HeatmapSeriesEditor | ||||||
| control={control} | ||||||
| setValue={setValue} | ||||||
| tableSource={tableSource} | ||||||
| onSubmit={onSubmit} | ||||||
| onOpenDisplaySettings={openHeatmapSettings ?? openDisplaySettings} | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would we ever want to open the display settings here?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — |
||||||
| /> | ||||||
| ) : displayType !== DisplayType.Search && Array.isArray(select) ? ( | ||||||
| <> | ||||||
| {fields.map((field, index) => ( | ||||||
| <ChartSeriesEditor | ||||||
|
|
@@ -208,7 +219,8 @@ export function ChartEditorControls({ | |||||
| <Flex mt={4} align="center" justify="space-between"> | ||||||
| <Group gap="xs"> | ||||||
| {displayType !== DisplayType.Number && | ||||||
| displayType !== DisplayType.Pie && ( | ||||||
| displayType !== DisplayType.Pie && | ||||||
| displayType !== DisplayType.Heatmap && ( | ||||||
| <Button | ||||||
| variant="subtle" | ||||||
| size="sm" | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.