-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Color Map pass the colorMapping object to giraffe
#3473
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
Changes from 11 commits
539c3d6
c71f238
00ad1bd
d4bbdfc
91a40a9
54bc75e
7c319cd
a1ebcae
71f7be5
4d203cc
c04bb10
fe0c4cc
89a4ac1
192bb99
eac7e40
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 |
|---|---|---|
|
|
@@ -50,6 +50,8 @@ import { | |
|
|
||
| // Annotations | ||
| import {addAnnotationLayer} from 'src/visualization/utils/annotationUtils' | ||
| import {getColorMappingObjects} from 'src/visualization/utils/colorMappingUtils' | ||
| import {isFlagEnabled} from '../../../shared/utils/featureFlag' | ||
|
|
||
| interface Props extends VisualizationProps { | ||
| properties: XYViewProperties | ||
|
|
@@ -179,6 +181,17 @@ const XYPlot: FC<Props> = ({ | |
| return <EmptyGraphMessage message={INVALID_DATA_COPY} /> | ||
| } | ||
|
|
||
| let colorMapping = null | ||
|
|
||
| if (isFlagEnabled('graphColorMapping')) { | ||
| const [, fillColumnMap] = createGroupIDColumn(result.table, groupKey) | ||
| const {colorMappingForGiraffe} = getColorMappingObjects( | ||
| fillColumnMap, | ||
| properties | ||
| ) | ||
| colorMapping = colorMappingForGiraffe | ||
| } | ||
|
|
||
| const config: Config = { | ||
| ...currentTheme, | ||
| table: result.table, | ||
|
|
@@ -210,6 +223,7 @@ const XYPlot: FC<Props> = ({ | |
| interpolation, | ||
| position: properties.position, | ||
| colors: colorHexes, | ||
| colorMapping, | ||
|
||
| shadeBelow: !!properties.shadeBelow, | ||
| shadeBelowOpacity: 0.08, | ||
| hoverDimension: properties.hoverDimension, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this
SHAlives in a branch, maybe we should wait for this PR influxdata/openapi#248