Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a94c2565
Unverified
Commit
a94c2565
authored
Jan 15, 2021
by
Dominik Prokop
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GraphNG: remove y-axis position control from series color picker in the legend (#30302)
parent
c14c7b68
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
26 deletions
+8
-26
packages/grafana-ui/src/components/ColorPicker/SeriesColorPickerPopover.tsx
+6
-8
packages/grafana-ui/src/components/VizLegend/VizLegendListItem.tsx
+0
-1
packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx
+2
-16
packages/grafana-ui/src/components/VizLegend/VizLegendTableItem.tsx
+0
-1
No files found.
packages/grafana-ui/src/components/ColorPicker/SeriesColorPickerPopover.tsx
View file @
a94c2565
...
...
@@ -12,11 +12,9 @@ export interface SeriesColorPickerPopoverProps extends ColorPickerProps, Popover
export
const
SeriesColorPickerPopover
:
FunctionComponent
<
SeriesColorPickerPopoverProps
>
=
props
=>
{
const
{
yaxis
,
onToggleAxis
,
color
,
...
colorPickerProps
}
=
props
;
return
(
<
ColorPickerPopover
{
...
colorPickerProps
}
color=
{
color
||
'#000000'
}
customPickers=
{
{
const
customPickers
=
onToggleAxis
?
{
yaxis
:
{
name
:
'Y-Axis'
,
tabComponent
()
{
...
...
@@ -36,9 +34,9 @@ export const SeriesColorPickerPopover: FunctionComponent<SeriesColorPickerPopove
);
},
},
}
}
/>
)
;
}
:
undefined
;
return
<
ColorPickerPopover
{
...
colorPickerProps
}
color=
{
color
||
'#000000'
}
customPickers=
{
customPickers
}
/>
;
};
interface
AxisSelectorProps
{
...
...
packages/grafana-ui/src/components/VizLegend/VizLegendListItem.tsx
View file @
a94c2565
...
...
@@ -27,7 +27,6 @@ export const VizLegendListItem: React.FunctionComponent<Props> = ({ item, onSeri
onSeriesColorChange
(
item
.
label
,
color
);
}
}
}
yAxis=
{
item
.
yAxis
}
/>
<
div
onClick=
{
event
=>
{
...
...
packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx
View file @
a94c2565
...
...
@@ -5,28 +5,14 @@ import { SeriesIcon } from './SeriesIcon';
interface
Props
{
disabled
:
boolean
;
color
:
string
;
yAxis
:
number
;
onColorChange
:
(
color
:
string
)
=>
void
;
onToggleAxis
?:
()
=>
void
;
}
export
const
VizLegendSeriesIcon
:
React
.
FunctionComponent
<
Props
>
=
({
disabled
,
yAxis
,
color
,
onColorChange
,
onToggleAxis
,
})
=>
{
export
const
VizLegendSeriesIcon
:
React
.
FunctionComponent
<
Props
>
=
({
disabled
,
color
,
onColorChange
})
=>
{
return
disabled
?
(
<
SeriesIcon
color=
{
color
}
/>
)
:
(
<
SeriesColorPicker
yaxis=
{
yAxis
}
color=
{
color
}
onChange=
{
onColorChange
}
onToggleAxis=
{
onToggleAxis
}
enableNamedColors
>
<
SeriesColorPicker
color=
{
color
}
onChange=
{
onColorChange
}
enableNamedColors
>
{
({
ref
,
showColorPicker
,
hideColorPicker
})
=>
(
<
SeriesIcon
color=
{
color
}
...
...
packages/grafana-ui/src/components/VizLegend/VizLegendTableItem.tsx
View file @
a94c2565
...
...
@@ -35,7 +35,6 @@ export const LegendTableItem: React.FunctionComponent<Props> = ({
onSeriesColorChange
(
item
.
label
,
color
);
}
}
}
yAxis=
{
item
.
yAxis
}
/>
<
div
onClick=
{
event
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment