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
e8e1c140
Unverified
Commit
e8e1c140
authored
Dec 17, 2020
by
Dominik Prokop
Committed by
GitHub
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GraphNG: bring back tooltip (#29910)
parent
6c1f8b9c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts
+46
-0
packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.ts
+3
-0
No files found.
packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts
View file @
e8e1c140
...
...
@@ -6,6 +6,34 @@ import { expect } from '../../../../../../public/test/lib/common';
import
{
AreaGradientMode
,
AxisPlacement
,
DrawStyle
,
PointVisibility
,
ScaleDistribution
}
from
'../config'
;
describe
(
'UPlotConfigBuilder'
,
()
=>
{
describe
(
'default config'
,
()
=>
{
it
(
'builds default config'
,
()
=>
{
const
builder
=
new
UPlotConfigBuilder
();
expect
(
builder
.
getConfig
()).
toMatchInlineSnapshot
(
`
Object {
"axes": Array [],
"cursor": Object {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
"stroke": [Function],
"width": [Function],
},
},
"scales": Object {},
"series": Array [
Object {},
],
}
`
);
});
});
describe
(
'scales config'
,
()
=>
{
it
(
'allows scales configuration'
,
()
=>
{
const
builder
=
new
UPlotConfigBuilder
();
...
...
@@ -24,6 +52,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
@@ -82,6 +113,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
@@ -121,6 +155,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
@@ -161,6 +198,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
@@ -234,6 +274,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
@@ -337,6 +380,9 @@ describe('UPlotConfigBuilder', () => {
"drag": Object {
"setScale": false,
},
"focus": Object {
"prox": 30,
},
"points": Object {
"fill": [Function],
"size": [Function],
...
...
packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.ts
View file @
e8e1c140
...
...
@@ -85,6 +85,9 @@ export class UPlotConfigBuilder {
/*@ts-ignore*/
fill
:
(
u
,
seriesIdx
)
=>
u
.
series
[
seriesIdx
].
points
.
stroke
(
u
,
seriesIdx
),
},
focus
:
{
prox
:
30
,
},
};
defaultsDeep
(
config
.
cursor
,
cursorDefaults
);
...
...
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