Open korinekgergely opened 7 months ago
The screenshot is for overrides for the time series visualization, not table.
So confused
Of course, sorry, my fault. This is a timeseries()
But the question remains, rightly in the case of timeseries.
@torkelo This is the goal, this is what it should look like.
and the 90% red line and yellow lines are time series?
@torkelo Yes, the same time series as the others. I just want to display certain Field names as dashed. What appears as a dashed line will typically be a straight line for us, but not necessarily. Sorry for the late reply. The question is just as interesting and important.
So again, to briefly summarize the question: how can I change the style of a time series to dotted by identifying it by field name (as shown in the top image)? PanelBuilders.timeseries() I suspect that an .override... is needed, but I couldn't find a lineStyle in the documentation. Maybe there is a different way.
Found the solution:
.setOverrides((a: any) => a .matchFieldsWithName('nameBlaBla') .overrideCustomFieldConfig('lineStyle', { "dash": [ 10, 10 ], "fill": "dash" })
Thank you for the solution @korinekgergely , I can confirm that it works, however the Typescript types don't seem to be up to date since I get an error in the IDE.
Please someone help me, write me the exact implementation of the override attached below. I need it in a
PanelBuilders.table()
Because I have searched the source files, I found this everywhere:`/**
Or as json:
"overrides": [ { "matcher": { "id": "byName", "options": "CRITICAL" }, "properties": [ { "id": "custom.lineStyle", "value": { "dash": [ 10, 10 ], "fill": "dash" } }, { "id": "custom.fillOpacity", "value": 0 }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": false, "viz": false } } ] }, { "matcher": { "id": "byName", "options": "WARNING" }, "properties": [ { "id": "custom.lineStyle", "value": { "dash": [ 10, 10 ], "fill": "dash" } }, { "id": "custom.fillOpacity", "value": 0 }, { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": false, "viz": false } } ] } ]
I have a try but I don't find the implementation of the dashed lines. I am not sure if it is a good start:
.setOverrides((critical: any) => critical .matchFieldsWithName('CRITICAL') .overrideColor({ mode: 'fixed', fixedColor: 'red' })
Thank you in advance.