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
212bf5df
Commit
212bf5df
authored
Feb 05, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix to png rendering
parent
0fa6b34f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
src/app/directives/grafanaGraph.js
+14
-13
No files found.
src/app/directives/grafanaGraph.js
View file @
212bf5df
...
...
@@ -62,7 +62,7 @@ function (angular, $, kbn, moment, _) {
if
(
!
setElementHeight
())
{
return
;
}
if
(
_
.
isString
(
data
))
{
render_panel_as_graphite_png
();
render_panel_as_graphite_png
(
data
);
return
;
}
...
...
@@ -166,28 +166,29 @@ function (angular, $, kbn, moment, _) {
addAxisLabels
();
}
function
render_panel_as_graphite_png
()
{
data
+=
'&width='
+
elem
.
width
();
data
+=
'&height='
+
elem
.
css
(
'height'
).
replace
(
'px'
,
''
);
data
+=
'&bgcolor=1f1f1f'
;
// @grayDarker & @kibanaPanelBackground
data
+=
'&fgcolor=BBBFC2'
;
// @textColor & @grayLighter
data
+=
scope
.
panel
.
stack
?
'&areaMode=stacked'
:
''
;
data
+=
scope
.
panel
.
fill
!==
0
?
(
'&areaAlpha='
+
(
scope
.
panel
.
fill
/
10
).
toFixed
(
1
))
:
''
;
data
+=
scope
.
panel
.
linewidth
!==
0
?
'&lineWidth='
+
scope
.
panel
.
linewidth
:
''
;
data
+=
scope
.
panel
.
steppedLine
?
'&lineMode=staircase'
:
''
;
function
render_panel_as_graphite_png
(
url
)
{
url
+=
'&width='
+
elem
.
width
();
url
+=
'&height='
+
elem
.
css
(
'height'
).
replace
(
'px'
,
''
);
url
+=
'&bgcolor=1f1f1f'
;
// @grayDarker & @kibanaPanelBackground
url
+=
'&fgcolor=BBBFC2'
;
// @textColor & @grayLighter
url
+=
scope
.
panel
.
stack
?
'&areaMode=stacked'
:
''
;
url
+=
scope
.
panel
.
fill
!==
0
?
(
'&areaAlpha='
+
(
scope
.
panel
.
fill
/
10
).
toFixed
(
1
))
:
''
;
url
+=
scope
.
panel
.
linewidth
!==
0
?
'&lineWidth='
+
scope
.
panel
.
linewidth
:
''
;
switch
(
scope
.
panel
.
nullPointMode
)
{
case
'connected'
:
data
+=
'&lineMode=connected'
;
url
+=
'&lineMode=connected'
;
break
;
case
'null'
:
break
;
// graphite default lineMode
case
'null as zero'
:
data
+=
"&drawNullAsZero=true"
;
url
+=
"&drawNullAsZero=true"
;
break
;
}
elem
.
html
(
'<img src="'
+
data
+
'"></img>'
);
url
+=
scope
.
panel
.
steppedLine
?
'&lineMode=staircase'
:
''
;
elem
.
html
(
'<img src="'
+
url
+
'"></img>'
);
}
...
...
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