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
65476d40
Commit
65476d40
authored
Mar 22, 2019
by
ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use process timeseries
parent
0f0f76b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
36 deletions
+18
-36
packages/grafana-ui/src/types/data.ts
+0
-17
public/app/plugins/panel/graph2/GraphPanel.tsx
+17
-18
public/app/plugins/panel/piechart/PieChartPanel.tsx
+1
-1
No files found.
packages/grafana-ui/src/types/data.ts
View file @
65476d40
...
...
@@ -20,27 +20,10 @@ export interface TimeSeriesVM {
label
:
string
;
color
:
string
;
data
:
TimeSeriesValue
[][];
stats
:
TimeSeriesStats
;
allIsNull
:
boolean
;
allIsZero
:
boolean
;
}
export
interface
TimeSeriesStats
{
[
key
:
string
]:
number
|
null
;
total
:
number
|
null
;
max
:
number
|
null
;
min
:
number
|
null
;
logmin
:
number
;
avg
:
number
|
null
;
current
:
number
|
null
;
first
:
number
|
null
;
delta
:
number
;
diff
:
number
|
null
;
range
:
number
|
null
;
timeStep
:
number
;
count
:
number
;
}
export
enum
NullValueMode
{
Null
=
'null'
,
Ignore
=
'connected'
,
...
...
public/app/plugins/panel/graph2/GraphPanel.tsx
View file @
65476d40
...
...
@@ -2,17 +2,9 @@
import
_
from
'lodash'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
{
Graph
,
PanelProps
,
NullValueMode
,
colors
,
TimeSeriesVMs
,
ColumnType
,
getFirstTimeColumn
,
processTimeSeries
,
}
from
'@grafana/ui'
;
import
{
Graph
,
PanelProps
,
NullValueMode
,
colors
,
TimeSeriesVMs
,
ColumnType
,
getFirstTimeColumn
}
from
'@grafana/ui'
;
import
{
Options
}
from
'./types'
;
import
{
getFlotPairs
}
from
'@grafana/ui/src/utils/flotPairs'
;
interface
Props
extends
PanelProps
<
Options
>
{}
...
...
@@ -33,16 +25,23 @@ export class GraphPanel extends PureComponent<Props> {
// Show all numeric columns
if
(
column
.
type
===
ColumnType
.
number
)
{
const
tsvm
=
processTimeSeries
({
data
:
[
table
],
xColumn
:
timeColumn
,
yColumn
:
i
,
// Use external calculator just to make sure it works :)
const
points
=
getFlotPairs
({
rows
:
table
.
rows
,
xIndex
:
timeColumn
,
yIndex
:
i
,
nullValueMode
:
NullValueMode
.
Null
,
})
[
0
]
;
});
const
colorIndex
=
vmSeries
.
length
%
colors
.
length
;
tsvm
.
color
=
colors
[
colorIndex
];
vmSeries
.
push
(
tsvm
);
vmSeries
.
push
({
label
:
column
.
text
,
data
:
points
,
color
:
colors
[
vmSeries
.
length
%
colors
.
length
],
// TODO (calculate somewhere)
allIsNull
:
false
,
allIsZero
:
false
,
});
}
}
}
...
...
public/app/plugins/panel/piechart/PieChartPanel.tsx
View file @
65476d40
...
...
@@ -29,7 +29,7 @@ export class PieChartPanel extends PureComponent<Props> {
const
serie
=
vmSeries
[
i
];
if
(
serie
)
{
datapoints
.
push
({
value
:
serie
.
stats
[
valueOptions
.
stat
],
value
:
7
,
//
serie.stats[valueOptions.stat],
name
:
serie
.
label
,
color
:
serie
.
color
,
});
...
...
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