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
083cc0bb
Commit
083cc0bb
authored
Mar 05, 2019
by
corpglory-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aftermerge fixes
parent
250ee229
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
public/app/plugins/panel/piechart/PiechartOptionsBox.tsx
+2
-2
public/app/plugins/panel/piechart/PiechartPanelEditor.tsx
+3
-3
public/app/plugins/panel/piechart/PiechartValueEditor.tsx
+1
-2
No files found.
public/app/plugins/panel/piechart/PiechartOptionsBox.tsx
View file @
083cc0bb
...
...
@@ -16,8 +16,8 @@ const labelWidth = 8;
const
piechartOptions
=
[{
value
:
PiechartType
.
PIE
,
label
:
'Pie'
},
{
value
:
PiechartType
.
DONUT
,
label
:
'Donut'
}];
export
class
PiechartOptionsBox
extends
PureComponent
<
PanelEditorProps
<
PiechartOptions
>>
{
onPieTypeChange
=
({
target
})
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
pieType
:
target
.
value
});
onStrokeWidthChange
=
({
target
})
=>
this
.
props
.
onChange
({
...
this
.
props
.
options
,
strokeWidth
:
target
.
value
});
onPieTypeChange
=
({
target
})
=>
this
.
props
.
on
Options
Change
({
...
this
.
props
.
options
,
pieType
:
target
.
value
});
onStrokeWidthChange
=
({
target
})
=>
this
.
props
.
on
Options
Change
({
...
this
.
props
.
options
,
strokeWidth
:
target
.
value
});
render
()
{
const
{
options
}
=
this
.
props
;
...
...
public/app/plugins/panel/piechart/PiechartPanelEditor.tsx
View file @
083cc0bb
...
...
@@ -7,19 +7,19 @@ import { PiechartOptions, PiechartValueOptions } from './types';
export
default
class
PiechartPanelEditor
extends
PureComponent
<
PanelEditorProps
<
PiechartOptions
>>
{
onValueOptionsChanged
=
(
valueOptions
:
PiechartValueOptions
)
=>
this
.
props
.
onChange
({
this
.
props
.
on
Options
Change
({
...
this
.
props
.
options
,
valueOptions
,
});
render
()
{
const
{
onChange
,
options
}
=
this
.
props
;
const
{
on
Options
Change
,
options
}
=
this
.
props
;
return
(
<>
<
PanelOptionsGrid
>
<
PiechartValueEditor
onChange=
{
this
.
onValueOptionsChanged
}
options=
{
options
.
valueOptions
}
/>
<
PiechartOptionsBox
on
Change=
{
on
Change
}
options=
{
options
}
/>
<
PiechartOptionsBox
on
OptionsChange=
{
onOptions
Change
}
options=
{
options
}
/>
</
PanelOptionsGrid
>
</>
);
...
...
public/app/plugins/panel/piechart/PiechartValueEditor.tsx
View file @
083cc0bb
import
React
,
{
PureComponent
}
from
'react'
;
import
{
FormLabel
,
PanelOptionsGroup
,
Select
}
from
'@grafana/ui'
;
import
UnitPicker
from
'app/core/components/Select/UnitPicker'
;
import
{
FormLabel
,
PanelOptionsGroup
,
Select
,
UnitPicker
}
from
'@grafana/ui'
;
import
{
PiechartValueOptions
}
from
'./types'
;
const
statOptions
=
[
...
...
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