Panel
In xObserve, you can set options for overall charts, when these options is set, every series in the chart will inherit these options.
But somtimes we hope to override some options for a specific series, now you can do it with Panel Overrides
.
First, create a panel and select Graph
visualization, then add datasource queries as below:
Don’t forget to set Legend
field to {{__name__}}
to display their series name in graph legend.
This panel will be reused in the next
Thresholds
andInteractivity
docs
Now, you can see there are two series in the Graph
chart: node_load1
and node_load5
, let’s set some common options to them.
The below options will change the area fill style of all series in the chart:
Now, let’s set the unit of all series in the chart:
It should be noted that value in Unit
is actually / load5
with a space
char at the beginning.
This is a bit weird, load1
series is also using a load5
unit. Let’s fix it first.
To fix the unit issue, the only way is to override the options for load1
series.
But if you look at the Graph
panel, you will find that there is no Y-axis space for load1
series to show its unit / load1
.
So we need to add a new Y-axis for load1
series, and set its unit to / load1
:
load1
Add override item to Click Override
tab and add a new override for load1
sereis as below:
Click Add override rule
and select Series.separateYAxis
type ,then enable it as below:
Where the arrow points to is the new Y-axis
we set for load1
series.
Now it’s time to set its unit.
Click Add override rule
and select Series.Unit
type, then set its value as below and click Submit
button:
Nice, now the load1
series has its own Y-axis and unit.
But there is also a problem: the load1
and load5
series are shown mixed together. Maybe we should separate them.
A viable approach is show load1
in negative y-axis
.
For now, we don’t need separateYAxis
any more, so change it to negativeY
as below:
Ok, the two series never mixed together now and the units is also correct. Let’s override some styles next.
Add some overrides as below :
Series.style
to change node_load1
series from Lines
type that set in common options to Points
typeSeries.fill
it to 10
for node_load1
to make it less opacitySeries.lineWidth
to 0 node_load1
rather than using a default color by seting the Series.color
overrideAfter all these overrides, the final result is not bad: