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
2293ae2e
Unverified
Commit
2293ae2e
authored
Jan 20, 2021
by
Dominik Prokop
Committed by
GitHub
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GraphNG: assume uPlot's series stroke is always a function (#30416)
parent
b7b6632a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin.tsx
+4
-4
No files found.
packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin.tsx
View file @
2293ae2e
...
...
@@ -48,8 +48,8 @@ export const TooltipPlugin: React.FC<TooltipPluginProps> = ({ mode = 'single', t
<
SeriesTable
series=
{
[
{
//
stroke is typed as CanvasRenderingContext2D['strokeStyle'] - we are using strings only for now
color
:
plotContext
.
getSeries
()[
focusedSeriesIdx
!
].
stroke
as
string
,
//
TODO: align with uPlot typings
color
:
(
plotContext
.
getSeries
()[
focusedSeriesIdx
!
].
stroke
as
any
)()
,
label
:
getFieldDisplayName
(
field
,
data
),
value
:
fieldFmt
(
field
.
values
.
get
(
focusedPointIdx
)).
text
,
},
...
...
@@ -76,8 +76,8 @@ export const TooltipPlugin: React.FC<TooltipPluginProps> = ({ mode = 'single', t
return
[
...
agg
,
{
//
stroke is typed as CanvasRenderingContext2D['strokeStyle'] - we are using strings only for now
color
:
plotContext
.
getSeries
()[
i
].
stroke
as
string
,
//
TODO: align with uPlot typings
color
:
(
plotContext
.
getSeries
()[
i
].
stroke
as
any
)
!
()
,
label
:
getFieldDisplayName
(
f
,
data
),
value
:
formattedValueToString
(
f
.
display
!
(
f
.
values
.
get
(
focusedPointIdx
!
))),
isActive
:
focusedSeriesIdx
===
i
,
...
...
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