Skip to content

Commit 14d9b98

Browse files
author
Jim Hague
committed
Set font defaults to mimic the default Grafana theme (Grafana 6.1).
1 parent 8e96332 commit 14d9b98

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/module.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,16 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
9696
legend: {
9797
orientation: 'h',
9898
traceorder: 'normal',
99+
font: {
100+
family: 'Roboto, Helvetica, Arial, sans-serif',
101+
size: 11,
102+
},
99103
},
100104
dragmode: 'lasso', // (enumerated: "zoom" | "pan" | "select" | "lasso" | "orbit" | "turntable" )
101105
hovermode: 'closest',
102106
font: {
103-
family: '"Open Sans", Helvetica, Arial, sans-serif',
107+
family: 'Roboto, Helvetica, Arial, sans-serif',
108+
size: 10.8,
104109
},
105110
xaxis: {
106111
showgrid: true,
@@ -112,6 +117,10 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
112117
ticks: 'outside',
113118
tick0: 0,
114119
dtick: 1,
120+
titlefont: {
121+
family: 'Roboto, Helvetica, Arial, sans-serif',
122+
size: 12,
123+
},
115124
},
116125
yaxis: {
117126
showgrid: true,
@@ -123,6 +132,10 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
123132
ticks: 'outside',
124133
tick0: 0,
125134
dtick: 1,
135+
titlefont: {
136+
family: 'Roboto, Helvetica, Arial, sans-serif',
137+
size: 12,
138+
},
126139
},
127140
zaxis: {
128141
showgrid: true,
@@ -134,6 +147,10 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
134147
ticks: 'outside',
135148
tick0: 0,
136149
dtick: 1,
150+
titlefont: {
151+
family: 'Roboto, Helvetica, Arial, sans-serif',
152+
size: 12,
153+
},
137154
},
138155
},
139156
},

0 commit comments

Comments
 (0)