briangann / grafana-gauge-panel

D3 Based Gauge Panel for Grafana 6.x and Higher
MIT License
57 stars 24 forks source link

Allow for 360-degree gauge #13

Open tdobes opened 7 years ago

tdobes commented 7 years ago

It'd be helpful if it was possible to configure the portion of the gauge which is has values displayed. I'd like this functionality to create a 360-degree gauge to represent direction. Similarly, it would aos be helpful to be able to define where the "0" point is located, as I would like to put this at the top rather than the bottom of the gauge.

briangann commented 7 years ago

This has been implemented - but I don't see a good way to show if the value has gone below the min or beyond the max.

With a gauge displaying a range of 0 to 100, and 360 degrees, a value of -10 would be pinned to the same location as 0 and 100. Same with a value beyond 100.

The needle could be modified to change color for "below 0" and "above 360", or add (MIN)/(MAX) to the unit text to indicate the value is out of bounds for the range.

Ideas welcome :)

briangann commented 7 years ago

v0.0.3 has this functionality, let me know if you see any issues with it.

peters77 commented 7 years ago

Is this feature present in the latest commit I downloaded from the Grafana plugin site? As tdobes wrote I would map wind direction (0-360 degrees) to a 360 degree gauge but can't find any option to change the range from 270 to a 360 degree gauge!?

I think the change of needle or value color could really map negative values. But in my case I only have values from 0 to 360 degrees.

In this special case it would be nice to have some kind of "ticks value mapping' (0 degrees N (on top of the gauge), 90 degrees E, 180 degrees S, 270 degrees W)....

Regards,

Christian

peters77 commented 7 years ago

I just discoved that I have to change the json code of my panel.

I tried and got a 360 degree gauge, see screenshot. :-)

bildschirmfoto 2017-08-21 um 01 12 42

But as tdobes wrote in his first post I want to move my '0 degree' value to the top. Any chance to modify the json code and to achive this with version 0.0.3?

Another problem: 0 and 360 degree thick and the value overlap on the same position.

I know it's a very special wish displaying a direction with this gauge but it would be nice to have a 'thick mapping' too. For example map 0 (or 360) to text N(orth), 90 to text E(ast)..etc..

My code:

"mappingType": 1, "thresholds": "", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "format": "none", "operatorName": "last", "gauge": { "minValue": 0, "maxValue": 360, "tickSpaceMinVal": "30", "tickSpaceMajVal": "90", "gaugeUnits": "", "gaugeRadius": 0, "pivotRadius": 0.1, "padding": 0.05, "edgeWidth": 0.05, "tickEdgeGap": 0.05, "tickLengthMaj": 0.15, "tickLengthMin": 0.05, "needleTickGap": 0.05, "needleLengthNeg": 0.2, "ticknessGaugeBasis": 200, "needleWidth": 5, "tickWidthMaj": 5, "tickWidthMin": 1, "unitsLabelFontSize": 8, "labelFontSize": 24, "zeroTickAngle": 0, "maxTickAngle": 360, "zeroNeedleAngle": 0, "maxNeedleAngle": 360, "outerEdgeCol": "#0099CC", "innerCol": "#fff", "pivotCol": "#999", "needleCol": "#0099CC", "unitsLabelCol": "#000", "tickLabelCol": "#000", "tickColMaj": "#0099CC", "tickColMin": "#000", "tickFont": "Open Sans", "unitsFont": "Open Sans", "showThresholdOnGauge": false, "showThresholdColorOnValue": false, "showLowerThresholdRange": false, "showMiddleThresholdRange": true, "showUpperThresholdRange": true, "animateNeedleValueTransition": true, "show": true, "showThresholdColorOnBackground": false }, "gaugeDivId": "d3gauge_svg_33", "datasource": "Influx", "links": [], "timeShift": null, "hideTimeOverride": false, "timeFrom": null }

Could you tell me the right settings to move the '0' to the top?

Regards,

Christian

briangann commented 7 years ago

If you set Zero Tick Angle to 180, and Max Tick Angle to 540 you will have a full gauge with 0 at the top.

You'll want to set Zero Needle Angle to 180, and Max Needle Angle to 540 also.

There's two bugs to sort out: 1) the value displayed also needs an offset to move it "up" out of the tick labels this was actually implemented, in the options D3 Gauge Options, Value Y Offset 2) a way to choose to display the Max value (a toggle to disable if it is going to overlap)

briangann commented 7 years ago

Here's an example with 0 at the top. To map N/S/E/W to the angles is an interesting scenario and shouldn't be tough to add.

Would the value displayed also need to be mapped?

image

briangann commented 7 years ago

I'm putting this into v0.0.4, let me know if this is what you were looking for:

image

There's a new section to map tick values to text:

image

peters77 commented 7 years ago

Great, that's what I'm looking for!

A nice mixture would be mapping + values:

bildschirmfoto 2017-08-21 um 07 23 25

Another big thing for me would be to display another measurement as value inside the gauge (not the wind direction the needle show but the wind gust speed for example)!?

But thats an extra thread feature wish I think.

Thank you for adding this into v0.0.4!

Regards,

Christian

briangann commented 7 years ago

Multiple values would be excellent, that'll take some time to get working (hand per value, and embedding the value inside the gauge).

peters77 commented 7 years ago

B.t.w. An option to hide the numerical value on a gauge would be nice too. In this case the needle points to the direction and I sometimes could spare the numerical wind direction in degrees....unless I could display another value numerical instead (like wind speed as mentioned in an earlier post)...!?

peters77 commented 7 years ago

Thanks for the update! :-) I just installed 0.0.4 but I have two issues:

first:

bildschirmfoto 2017-08-23 um 19 00 47 the thick values "O" and "W" are not aligned very well. I tried to add spaces " " at the end of "W " to align to the left and spaces at " O" to align right but they were ignored. I saw you wrote "East" and West" what solves this issue. Maybe i will try this.

second: the thick mapping is global which will affect my other gauges. I think it should be "per gauge" or per metric (override?)! See this:

bildschirmfoto 2017-08-23 um 19 02 59

But thanks for your great and quick enhancements!

Regards,

Christian

Update: after installing 0.0.4 my gauges in another dashboard disappeared. Had to switch back to 0.0.3 to get it back visible!?

briangann commented 7 years ago

Several items:

1) That's odd that updating would make them disappear, the code for rendering hasn't changed. I'll try an upgrade and see what happens.

Do you have the JSON for the good v.0.0.3 that doesn't work in v0.0.4 by any chance?

2) I'll take a look at the alignment problem too, that is unexpected.

3) I'll see why changes are applying globally, it shouldn't be doing that.

peters77 commented 7 years ago

Here is the code which doesn't work with 0.0.4 but gauges show on 0.0.3:

Thanks for looking into that!

{ "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "datasource": "InfluxDB", "decimals": 1, "fontSizes": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70 ], "fontTypes": [ "Arial", "Avant Garde", "Bookman", "Consolas", "Courier", "Courier New", "Garamond", "Helvetica", "Open Sans", "Palatino", "Times", "Times New Roman", "Verdana" ], "format": "celsius", "gauge": { "animateNeedleValueTransition": true, "edgeWidth": 0.05, "gaugeRadius": 0, "gaugeUnits": "", "innerCol": "#fff", "labelFontSize": 20, "maxNeedleAngle": 320, "maxTickAngle": 300, "maxValue": 50, "minValue": -20, "needleCol": "rgb(204, 0, 0)", "needleLengthNeg": 0.2, "needleTickGap": 0.05, "needleWidth": 5, "outerEdgeCol": "#0099CC", "padding": 0.05, "pivotCol": "#999", "pivotRadius": 0.1, "show": true, "showLowerThresholdRange": false, "showMiddleThresholdRange": true, "showThresholdColorOnValue": false, "showThresholdOnGauge": false, "showUpperThresholdRange": true, "tickColMaj": "#0099CC", "tickColMin": "#000", "tickEdgeGap": 0.05, "tickFont": "Open Sans", "tickLabelCol": "#000", "tickLengthMaj": 0.15, "tickLengthMin": 0.05, "tickSpaceMajVal": 10, "tickSpaceMinVal": 1, "tickWidthMaj": 5, "tickWidthMin": 1, "ticknessGaugeBasis": 200, "unitsFont": "Open Sans", "unitsLabelCol": "#000", "unitsLabelFontSize": 40, "zeroNeedleAngle": 40, "zeroTickAngle": 60 }, "gaugeDivId": "d3gauge_svg_1", "id": 1, "links": [], "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "operatorName": "current", "operatorNameOptions": [ "min", "max", "avg", "current", "total", "name" ], "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "span": 3, "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "exec_fs", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "temp" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": "", "title": "Temperatur", "transparent": true, "type": "briangann-gauge-panel", "unitFormats": [ { "submenu": [ { "click": "menuItemSelected(0,0)", "text": "none", "value": "none" }, { "click": "menuItemSelected(0,1)", "text": "short", "value": "short" }, { "click": "menuItemSelected(0,2)", "text": "percent (0-100)", "value": "percent" }, { "click": "menuItemSelected(0,3)", "text": "percent (0.0-1.0)", "value": "percentunit" }, { "click": "menuItemSelected(0,4)", "text": "Humidity (%H)", "value": "humidity" }, { "click": "menuItemSelected(0,5)", "text": "ppm", "value": "ppm" }, { "click": "menuItemSelected(0,6)", "text": "decibel", "value": "dB" }, { "click": "menuItemSelected(0,7)", "text": "hexadecimal (0x)", "value": "hex0x" }, { "click": "menuItemSelected(0,8)", "text": "hexadecimal", "value": "hex" }, { "click": "menuItemSelected(0,9)", "text": "scientific notation", "value": "sci" } ], "text": "none" }, { "submenu": [ { "click": "menuItemSelected(1,0)", "text": "Dollars ($)", "value": "currencyUSD" }, { "click": "menuItemSelected(1,1)", "text": "Pounds (£)", "value": "currencyGBP" }, { "click": "menuItemSelected(1,2)", "text": "Euro (€)", "value": "currencyEUR" }, { "click": "menuItemSelected(1,3)", "text": "Yen (¥)", "value": "currencyJPY" }, { "click": "menuItemSelected(1,4)", "text": "Rubles (₽)", "value": "currencyRUB" } ], "text": "currency" }, { "submenu": [ { "click": "menuItemSelected(2,0)", "text": "Hertz (1/s)", "value": "hertz" }, { "click": "menuItemSelected(2,1)", "text": "nanoseconds (ns)", "value": "ns" }, { "click": "menuItemSelected(2,2)", "text": "microseconds (µs)", "value": "µs" }, { "click": "menuItemSelected(2,3)", "text": "milliseconds (ms)", "value": "ms" }, { "click": "menuItemSelected(2,4)", "text": "seconds (s)", "value": "s" }, { "click": "menuItemSelected(2,5)", "text": "minutes (m)", "value": "m" }, { "click": "menuItemSelected(2,6)", "text": "hours (h)", "value": "h" }, { "click": "menuItemSelected(2,7)", "text": "days (d)", "value": "d" }, { "click": "menuItemSelected(2,8)", "text": "duration (ms)", "value": "dtdurationms" }, { "click": "menuItemSelected(2,9)", "text": "duration (s)", "value": "dtdurations" } ], "text": "time" }, { "submenu": [ { "click": "menuItemSelected(3,0)", "text": "bits", "value": "bits" }, { "click": "menuItemSelected(3,1)", "text": "bytes", "value": "bytes" }, { "click": "menuItemSelected(3,2)", "text": "kibibytes", "value": "kbytes" }, { "click": "menuItemSelected(3,3)", "text": "mebibytes", "value": "mbytes" }, { "click": "menuItemSelected(3,4)", "text": "gibibytes", "value": "gbytes" } ], "text": "data (IEC)" }, { "submenu": [ { "click": "menuItemSelected(4,0)", "text": "bits", "value": "decbits" }, { "click": "menuItemSelected(4,1)", "text": "bytes", "value": "decbytes" }, { "click": "menuItemSelected(4,2)", "text": "kilobytes", "value": "deckbytes" }, { "click": "menuItemSelected(4,3)", "text": "megabytes", "value": "decmbytes" }, { "click": "menuItemSelected(4,4)", "text": "gigabytes", "value": "decgbytes" } ], "text": "data (Metric)" }, { "submenu": [ { "click": "menuItemSelected(5,0)", "text": "packets/sec", "value": "pps" }, { "click": "menuItemSelected(5,1)", "text": "bits/sec", "value": "bps" }, { "click": "menuItemSelected(5,2)", "text": "bytes/sec", "value": "Bps" }, { "click": "menuItemSelected(5,3)", "text": "kilobits/sec", "value": "Kbits" }, { "click": "menuItemSelected(5,4)", "text": "kilobytes/sec", "value": "KBs" }, { "click": "menuItemSelected(5,5)", "text": "megabits/sec", "value": "Mbits" }, { "click": "menuItemSelected(5,6)", "text": "megabytes/sec", "value": "MBs" }, { "click": "menuItemSelected(5,7)", "text": "gigabytes/sec", "value": "GBs" }, { "click": "menuItemSelected(5,8)", "text": "gigabits/sec", "value": "Gbits" } ], "text": "data rate" }, { "submenu": [ { "click": "menuItemSelected(6,0)", "text": "ops/sec (ops)", "value": "ops" }, { "click": "menuItemSelected(6,1)", "text": "reads/sec (rps)", "value": "rps" }, { "click": "menuItemSelected(6,2)", "text": "writes/sec (wps)", "value": "wps" }, { "click": "menuItemSelected(6,3)", "text": "I/O ops/sec (iops)", "value": "iops" }, { "click": "menuItemSelected(6,4)", "text": "ops/min (opm)", "value": "opm" }, { "click": "menuItemSelected(6,5)", "text": "reads/min (rpm)", "value": "rpm" }, { "click": "menuItemSelected(6,6)", "text": "writes/min (wpm)", "value": "wpm" } ], "text": "throughput" }, { "submenu": [ { "click": "menuItemSelected(7,0)", "text": "millimetre (mm)", "value": "lengthmm" }, { "click": "menuItemSelected(7,1)", "text": "meter (m)", "value": "lengthm" }, { "click": "menuItemSelected(7,2)", "text": "kilometer (km)", "value": "lengthkm" }, { "click": "menuItemSelected(7,3)", "text": "mile (mi)", "value": "lengthmi" } ], "text": "length" }, { "submenu": [ { "click": "menuItemSelected(8,0)", "text": "m/s", "value": "velocityms" }, { "click": "menuItemSelected(8,1)", "text": "km/h", "value": "velocitykmh" }, { "click": "menuItemSelected(8,2)", "text": "mph", "value": "velocitymph" }, { "click": "menuItemSelected(8,3)", "text": "knot (kn)", "value": "velocityknot" } ], "text": "velocity" }, { "submenu": [ { "click": "menuItemSelected(9,0)", "text": "millilitre", "value": "mlitre" }, { "click": "menuItemSelected(9,1)", "text": "litre", "value": "litre" }, { "click": "menuItemSelected(9,2)", "text": "cubic metre", "value": "m3" }, { "click": "menuItemSelected(9,3)", "text": "cubic decimetre", "value": "dm3" }, { "click": "menuItemSelected(9,4)", "text": "gallons", "value": "gallons" } ], "text": "volume" }, { "submenu": [ { "click": "menuItemSelected(10,0)", "text": "watt (W)", "value": "watt" }, { "click": "menuItemSelected(10,1)", "text": "kilowatt (kW)", "value": "kwatt" }, { "click": "menuItemSelected(10,2)", "text": "volt-ampere (VA)", "value": "voltamp" }, { "click": "menuItemSelected(10,3)", "text": "kilovolt-ampere (kVA)", "value": "kvoltamp" }, { "click": "menuItemSelected(10,4)", "text": "volt-ampere reactive (var)", "value": "voltampreact" }, { "click": "menuItemSelected(10,5)", "text": "kilovolt-ampere reactive (kvar)", "value": "kvoltampreact" }, { "click": "menuItemSelected(10,6)", "text": "watt-hour (Wh)", "value": "watth" }, { "click": "menuItemSelected(10,7)", "text": "kilowatt-hour (kWh)", "value": "kwatth" }, { "click": "menuItemSelected(10,8)", "text": "joule (J)", "value": "joule" }, { "click": "menuItemSelected(10,9)", "text": "electron volt (eV)", "value": "ev" }, { "click": "menuItemSelected(10,10)", "text": "Ampere (A)", "value": "amp" }, { "click": "menuItemSelected(10,11)", "text": "Kiloampere (kA)", "value": "kamp" }, { "click": "menuItemSelected(10,12)", "text": "Volt (V)", "value": "volt" }, { "click": "menuItemSelected(10,13)", "text": "Kilovolt (kV)", "value": "kvolt" }, { "click": "menuItemSelected(10,14)", "text": "Decibel-milliwatt (dBm)", "value": "dBm" } ], "text": "energy" }, { "submenu": [ { "click": "menuItemSelected(11,0)", "text": "Celcius (°C)", "value": "celsius" }, { "click": "menuItemSelected(11,1)", "text": "Farenheit (°F)", "value": "farenheit" }, { "click": "menuItemSelected(11,2)", "text": "Kelvin (K)", "value": "kelvin" } ], "text": "temperature" }, { "submenu": [ { "click": "menuItemSelected(12,0)", "text": "Millibars", "value": "pressurembar" }, { "click": "menuItemSelected(12,1)", "text": "Bars", "value": "pressurebar" }, { "click": "menuItemSelected(12,2)", "text": "Kilobars", "value": "pressurekbar" }, { "click": "menuItemSelected(12,3)", "text": "Hectopascals", "value": "pressurehpa" }, { "click": "menuItemSelected(12,4)", "text": "Inches of mercury", "value": "pressurehg" }, { "click": "menuItemSelected(12,5)", "text": "PSI", "value": "pressurepsi" } ], "text": "pressure" }, { "submenu": [ { "click": "menuItemSelected(13,0)", "text": "Newton-meters (Nm)", "value": "forceNm" }, { "click": "menuItemSelected(13,1)", "text": "Kilonewton-meters (kNm)", "value": "forcekNm" }, { "click": "menuItemSelected(13,2)", "text": "Newtons (N)", "value": "forceN" }, { "click": "menuItemSelected(13,3)", "text": "Kilonewtons (kN)", "value": "forcekN" } ], "text": "force" }, { "submenu": [ { "click": "menuItemSelected(14,0)", "text": "Gallons/min (gpm)", "value": "flowgpm" }, { "click": "menuItemSelected(14,1)", "text": "Cubic meters/sec (cms)", "value": "flowcms" }, { "click": "menuItemSelected(14,2)", "text": "Cubic feet/sec (cfs)", "value": "flowcfs" }, { "click": "menuItemSelected(14,3)", "text": "Cubic feet/min (cfm)", "value": "flowcfm" } ], "text": "flow" } ], "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ] }

peters77 commented 6 years ago

HI, did you find the time to look into the issues!?

Tanks in advance!

Regards,

Christian

"... Several items:

That's odd that updating would make them disappear, the code for rendering hasn't changed.
I'll try an upgrade and see what happens.

Do you have the JSON for the good v.0.0.3 that doesn't work in v0.0.4 by any chance?

I'll take a look at the alignment problem too, that is unexpected.

I'll see why changes are applying globally, it shouldn't be doing that.

..."

briangann commented 6 years ago

I'm looking at this now, the alignment issue really stands out with small values.

briangann commented 6 years ago

The JSON worked when I pasted it into a gauge with v0.0.4 on grafana 4.5.2-1.

image

peters77 commented 6 years ago

Hi,

just did a check once more: applying globally was my fault. All gauges were 'duplicated' so I had to erase the 'Gauge Tick Mapping' of the affected gauges.

A fix for the spacing for small values would be really nice. A workaround could be allow for leading and appdended spaces?!

Regards,

Christian bildschirmfoto 2017-10-23 um 23 22 48

briangann commented 6 years ago

Leading/appending spaces sounds like a decent solution. Calculating the location would be better though :)

m4rky-m4rk commented 6 years ago

HI, Just got this installed. Very nice work. Thank you.

I got rid of the value display by mapping all values to 'no entry'. An option to turn it on/off would be nice. In my case the wind direction is 0-15, so not a nice number to display.

I also noticed if I add another gauge they seem to share the same settings as the previous gauge on the panel! I was going to try to simulate a rain gauge but it messed up my wind direction compass.

image

verisgit commented 2 years ago

Does anyone have the JSON for the Compass that works with the latest Grafana?

SaqibOctave commented 2 years ago

I have the latest version of grafana and installed the D3 gauge from the plugin option. I am using JSON API as the data source. I wrote a query to get data. data are shown in the table format but when I change to D3 gauge it shows zero. Also when i apply the changes in the penal gauge is not displayed on the dashboard. Kindly help me to figure it out.

zeroy99 commented 2 years ago

Lastest Grafana 9.0.5 and D3 Gauge installed, following the settings for Compass posted back in 2017 I get something like this... the 112degrees value is correct but not the Alignement of the intervals or the needle position? image

m4rky-m4rk commented 2 years ago

Here is mine: image

Gauge v9, Grafana 8.4.3

Note: My wind direction angles are reprorted as numbers 0 through to 16. With 0 and16 being north and 8 being south etc.

json: { "id": 20, "gridPos": { "h": 6, "w": 3, "x": 0, "y": 69 }, "type": "briangann-gauge-panel", "title": "Current wind direction", "datasource": { "type": "influxdb", "uid": "JF0StE1nk" }, "links": [], "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 0, "fontSizes": [ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70 ], "fontTypes": [ "Arial", "Avant Garde", "Bookman", "Consolas", "Courier", "Courier New", "Garamond", "Helvetica", "Open Sans", "Palatino", "Times", "Times New Roman", "Verdana" ], "format": "none", "gauge": { "animateNeedleValueTransition": true, "animateNeedleValueTransitionSpeed": 4000, "edgeWidth": 0.05, "gaugeRadius": 0, "gaugeUnits": "", "innerCol": "rgb(255, 255, 255)", "labelFontSize": 22, "maxNeedleAngle": 360, "maxTickAngle": 517.5, "maxValue": 15, "minValue": 0, "needleCol": "#0a437c", "needleLengthNeg": 0.2, "needleTickGap": -0.15, "needleWidth": 5, "outerEdgeCol": "#5195ce", "padding": 0.05, "pivotCol": "#999", "pivotRadius": 0.1, "show": true, "showLowerThresholdRange": false, "showMiddleThresholdRange": true, "showThresholdColorOnValue": false, "showThresholdOnGauge": false, "showUpperThresholdRange": true, "tickColMaj": "#0099CC", "tickColMin": "#2f575e", "tickEdgeGap": 0.05, "tickFont": "Arial", "tickLabelCol": "#000", "tickLengthMaj": 0.2, "tickLengthMin": 0.15, "tickSpaceMajVal": 2, "tickSpaceMinVal": 1, "tickWidthMaj": 5, "tickWidthMin": 1, "ticknessGaugeBasis": 200, "unitsFont": "Arial", "unitsLabelCol": "#000", "unitsLabelFontSize": 4, "valueYOffset": -40, "zeroNeedleAngle": 180, "zeroTickAngle": 180 }, "gaugeDivId": "d3gauge_svg_20", "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "markerEndShapes": [ { "id": 0, "name": "arrow" } ], "markerStartShapes": [ { "id": 0, "name": "circle" }, { "id": 1, "name": "square" }, { "id": 2, "name": "stub" } ], "operatorName": "current", "operatorNameOptions": [ "min", "max", "avg", "current", "total", "name" ], "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "svgContainer": {}, "targets": [ { "groupBy": [ { "params": [ "5m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "MobileAlertsWeatherStationWindDirectionNumber", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": "", "tickMaps": [ { "text": "North", "value": 0 }, { "text": "", "value": "1" }, { "text": "NE", "value": "2" }, { "text": "", "value": "3" }, { "text": "East", "value": "4" }, { "text": "", "value": "5" }, { "text": "SE", "value": "6" }, { "text": "", "value": "7" }, { "text": "South", "value": "8" }, { "text": "", "value": "9" }, { "text": "SW", "value": "10" }, { "text": "", "value": "11" }, { "text": "West", "value": "12" }, { "text": "", "value": "13" }, { "text": "NW", "value": "14" }, { "text": "", "value": "15" }, { "text": "", "value": 0 } ], "transparent": true, "unitFormats": [ { "submenu": [ { "click": "menuItemSelected(0,0)", "text": "none", "value": "none" }, { "click": "menuItemSelected(0,1)", "text": "short", "value": "short" }, { "click": "menuItemSelected(0,2)", "text": "percent (0-100)", "value": "percent" }, { "click": "menuItemSelected(0,3)", "text": "percent (0.0-1.0)", "value": "percentunit" }, { "click": "menuItemSelected(0,4)", "text": "Humidity (%H)", "value": "humidity" }, { "click": "menuItemSelected(0,5)", "text": "decibel", "value": "dB" }, { "click": "menuItemSelected(0,6)", "text": "hexadecimal (0x)", "value": "hex0x" }, { "click": "menuItemSelected(0,7)", "text": "hexadecimal", "value": "hex" }, { "click": "menuItemSelected(0,8)", "text": "scientific notation", "value": "sci" }, { "click": "menuItemSelected(0,9)", "text": "locale format", "value": "locale" } ], "text": "none" }, { "submenu": [ { "click": "menuItemSelected(1,0)", "text": "Dollars ($)", "value": "currencyUSD" }, { "click": "menuItemSelected(1,1)", "text": "Pounds (£)", "value": "currencyGBP" }, { "click": "menuItemSelected(1,2)", "text": "Euro (€)", "value": "currencyEUR" }, { "click": "menuItemSelected(1,3)", "text": "Yen (¥)", "value": "currencyJPY" }, { "click": "menuItemSelected(1,4)", "text": "Rubles (₽)", "value": "currencyRUB" }, { "click": "menuItemSelected(1,5)", "text": "Hryvnias (₴)", "value": "currencyUAH" }, { "click": "menuItemSelected(1,6)", "text": "Real (R$)", "value": "currencyBRL" }, { "click": "menuItemSelected(1,7)", "text": "Danish Krone (kr)", "value": "currencyDKK" }, { "click": "menuItemSelected(1,8)", "text": "Icelandic Króna (kr)", "value": "currencyISK" }, { "click": "menuItemSelected(1,9)", "text": "Norwegian Krone (kr)", "value": "currencyNOK" }, { "click": "menuItemSelected(1,10)", "text": "Swedish Krona (kr)", "value": "currencySEK" }, { "click": "menuItemSelected(1,11)", "text": "Czech koruna (czk)", "value": "currencyCZK" } ], "text": "currency" }, { "submenu": [ { "click": "menuItemSelected(2,0)", "text": "Hertz (1/s)", "value": "hertz" }, { "click": "menuItemSelected(2,1)", "text": "nanoseconds (ns)", "value": "ns" }, { "click": "menuItemSelected(2,2)", "text": "microseconds (µs)", "value": "µs" }, { "click": "menuItemSelected(2,3)", "text": "milliseconds (ms)", "value": "ms" }, { "click": "menuItemSelected(2,4)", "text": "seconds (s)", "value": "s" }, { "click": "menuItemSelected(2,5)", "text": "minutes (m)", "value": "m" }, { "click": "menuItemSelected(2,6)", "text": "hours (h)", "value": "h" }, { "click": "menuItemSelected(2,7)", "text": "days (d)", "value": "d" }, { "click": "menuItemSelected(2,8)", "text": "duration (ms)", "value": "dtdurationms" }, { "click": "menuItemSelected(2,9)", "text": "duration (s)", "value": "dtdurations" }, { "click": "menuItemSelected(2,10)", "text": "duration (hh:mm:ss)", "value": "dthms" }, { "click": "menuItemSelected(2,11)", "text": "Timeticks (s/100)", "value": "timeticks" } ], "text": "time" }, { "submenu": [ { "click": "menuItemSelected(3,0)", "text": "YYYY-MM-DD HH:mm:ss", "value": "dateTimeAsIso" }, { "click": "menuItemSelected(3,1)", "text": "DD/MM/YYYY h:mm:ss a", "value": "dateTimeAsUS" }, { "click": "menuItemSelected(3,2)", "text": "From Now", "value": "dateTimeFromNow" } ], "text": "date & time" }, { "submenu": [ { "click": "menuItemSelected(4,0)", "text": "bits", "value": "bits" }, { "click": "menuItemSelected(4,1)", "text": "bytes", "value": "bytes" }, { "click": "menuItemSelected(4,2)", "text": "kibibytes", "value": "kbytes" }, { "click": "menuItemSelected(4,3)", "text": "mebibytes", "value": "mbytes" }, { "click": "menuItemSelected(4,4)", "text": "gibibytes", "value": "gbytes" } ], "text": "data (IEC)" }, { "submenu": [ { "click": "menuItemSelected(5,0)", "text": "bits", "value": "decbits" }, { "click": "menuItemSelected(5,1)", "text": "bytes", "value": "decbytes" }, { "click": "menuItemSelected(5,2)", "text": "kilobytes", "value": "deckbytes" }, { "click": "menuItemSelected(5,3)", "text": "megabytes", "value": "decmbytes" }, { "click": "menuItemSelected(5,4)", "text": "gigabytes", "value": "decgbytes" } ], "text": "data (Metric)" }, { "submenu": [ { "click": "menuItemSelected(6,0)", "text": "packets/sec", "value": "pps" }, { "click": "menuItemSelected(6,1)", "text": "bits/sec", "value": "bps" }, { "click": "menuItemSelected(6,2)", "text": "bytes/sec", "value": "Bps" }, { "click": "menuItemSelected(6,3)", "text": "kilobits/sec", "value": "Kbits" }, { "click": "menuItemSelected(6,4)", "text": "kilobytes/sec", "value": "KBs" }, { "click": "menuItemSelected(6,5)", "text": "megabits/sec", "value": "Mbits" }, { "click": "menuItemSelected(6,6)", "text": "megabytes/sec", "value": "MBs" }, { "click": "menuItemSelected(6,7)", "text": "gigabytes/sec", "value": "GBs" }, { "click": "menuItemSelected(6,8)", "text": "gigabits/sec", "value": "Gbits" } ], "text": "data rate" }, { "submenu": [ { "click": "menuItemSelected(7,0)", "text": "hashes/sec", "value": "Hs" }, { "click": "menuItemSelected(7,1)", "text": "kilohashes/sec", "value": "KHs" }, { "click": "menuItemSelected(7,2)", "text": "megahashes/sec", "value": "MHs" }, { "click": "menuItemSelected(7,3)", "text": "gigahashes/sec", "value": "GHs" }, { "click": "menuItemSelected(7,4)", "text": "terahashes/sec", "value": "THs" }, { "click": "menuItemSelected(7,5)", "text": "petahashes/sec", "value": "PHs" }, { "click": "menuItemSelected(7,6)", "text": "exahashes/sec", "value": "EHs" } ], "text": "hash rate" }, { "submenu": [ { "click": "menuItemSelected(8,0)", "text": "ops/sec (ops)", "value": "ops" }, { "click": "menuItemSelected(8,1)", "text": "reads/sec (rps)", "value": "rps" }, { "click": "menuItemSelected(8,2)", "text": "writes/sec (wps)", "value": "wps" }, { "click": "menuItemSelected(8,3)", "text": "I/O ops/sec (iops)", "value": "iops" }, { "click": "menuItemSelected(8,4)", "text": "ops/min (opm)", "value": "opm" }, { "click": "menuItemSelected(8,5)", "text": "reads/min (rpm)", "value": "rpm" }, { "click": "menuItemSelected(8,6)", "text": "writes/min (wpm)", "value": "wpm" } ], "text": "throughput" }, { "submenu": [ { "click": "menuItemSelected(9,0)", "text": "millimetre (mm)", "value": "lengthmm" }, { "click": "menuItemSelected(9,1)", "text": "meter (m)", "value": "lengthm" }, { "click": "menuItemSelected(9,2)", "text": "feet (ft)", "value": "lengthft" }, { "click": "menuItemSelected(9,3)", "text": "kilometer (km)", "value": "lengthkm" }, { "click": "menuItemSelected(9,4)", "text": "mile (mi)", "value": "lengthmi" } ], "text": "length" }, { "submenu": [ { "click": "menuItemSelected(10,0)", "text": "Square Meters (m²)", "value": "areaM2" }, { "click": "menuItemSelected(10,1)", "text": "Square Feet (ft²)", "value": "areaF2" }, { "click": "menuItemSelected(10,2)", "text": "Square Miles (mi²)", "value": "areaMI2" } ], "text": "area" }, { "submenu": [ { "click": "menuItemSelected(11,0)", "text": "milligram (mg)", "value": "massmg" }, { "click": "menuItemSelected(11,1)", "text": "gram (g)", "value": "massg" }, { "click": "menuItemSelected(11,2)", "text": "kilogram (kg)", "value": "masskg" }, { "click": "menuItemSelected(11,3)", "text": "metric ton (t)", "value": "masst" } ], "text": "mass" }, { "submenu": [ { "click": "menuItemSelected(12,0)", "text": "m/s", "value": "velocityms" }, { "click": "menuItemSelected(12,1)", "text": "km/h", "value": "velocitykmh" }, { "click": "menuItemSelected(12,2)", "text": "mph", "value": "velocitymph" }, { "click": "menuItemSelected(12,3)", "text": "knot (kn)", "value": "velocityknot" } ], "text": "velocity" }, { "submenu": [ { "click": "menuItemSelected(13,0)", "text": "millilitre", "value": "mlitre" }, { "click": "menuItemSelected(13,1)", "text": "litre", "value": "litre" }, { "click": "menuItemSelected(13,2)", "text": "cubic metre", "value": "m3" }, { "click": "menuItemSelected(13,3)", "text": "Normal cubic metre", "value": "Nm3" }, { "click": "menuItemSelected(13,4)", "text": "cubic decimetre", "value": "dm3" }, { "click": "menuItemSelected(13,5)", "text": "gallons", "value": "gallons" } ], "text": "volume" }, { "submenu": [ { "click": "menuItemSelected(14,0)", "text": "Watt (W)", "value": "watt" }, { "click": "menuItemSelected(14,1)", "text": "Kilowatt (kW)", "value": "kwatt" }, { "click": "menuItemSelected(14,2)", "text": "Milliwatt (mW)", "value": "mwatt" }, { "click": "menuItemSelected(14,3)", "text": "Volt-ampere (VA)", "value": "voltamp" }, { "click": "menuItemSelected(14,4)", "text": "Kilovolt-ampere (kVA)", "value": "kvoltamp" }, { "click": "menuItemSelected(14,5)", "text": "Volt-ampere reactive (var)", "value": "voltampreact" }, { "click": "menuItemSelected(14,6)", "text": "Kilovolt-ampere reactive (kvar)", "value": "kvoltampreact" }, { "click": "menuItemSelected(14,7)", "text": "Watt-hour (Wh)", "value": "watth" }, { "click": "menuItemSelected(14,8)", "text": "Kilowatt-hour (kWh)", "value": "kwatth" }, { "click": "menuItemSelected(14,9)", "text": "Kilowatt-min (kWm)", "value": "kwattm" }, { "click": "menuItemSelected(14,10)", "text": "Joule (J)", "value": "joule" }, { "click": "menuItemSelected(14,11)", "text": "Electron volt (eV)", "value": "ev" }, { "click": "menuItemSelected(14,12)", "text": "Ampere (A)", "value": "amp" }, { "click": "menuItemSelected(14,13)", "text": "Kiloampere (kA)", "value": "kamp" }, { "click": "menuItemSelected(14,14)", "text": "Milliampere (mA)", "value": "mamp" }, { "click": "menuItemSelected(14,15)", "text": "Volt (V)", "value": "volt" }, { "click": "menuItemSelected(14,16)", "text": "Kilovolt (kV)", "value": "kvolt" }, { "click": "menuItemSelected(14,17)", "text": "Millivolt (mV)", "value": "mvolt" }, { "click": "menuItemSelected(14,18)", "text": "Decibel-milliwatt (dBm)", "value": "dBm" }, { "click": "menuItemSelected(14,19)", "text": "Ohm (Ω)", "value": "ohm" }, { "click": "menuItemSelected(14,20)", "text": "Lumens (Lm)", "value": "lumens" } ], "text": "energy" }, { "submenu": [ { "click": "menuItemSelected(15,0)", "text": "Celsius (°C)", "value": "celsius" }, { "click": "menuItemSelected(15,1)", "text": "Farenheit (°F)", "value": "farenheit" }, { "click": "menuItemSelected(15,2)", "text": "Kelvin (K)", "value": "kelvin" } ], "text": "temperature" }, { "submenu": [ { "click": "menuItemSelected(16,0)", "text": "Millibars", "value": "pressurembar" }, { "click": "menuItemSelected(16,1)", "text": "Bars", "value": "pressurebar" }, { "click": "menuItemSelected(16,2)", "text": "Kilobars", "value": "pressurekbar" }, { "click": "menuItemSelected(16,3)", "text": "Hectopascals", "value": "pressurehpa" }, { "click": "menuItemSelected(16,4)", "text": "Inches of mercury", "value": "pressurehg" }, { "click": "menuItemSelected(16,5)", "text": "PSI", "value": "pressurepsi" } ], "text": "pressure" }, { "submenu": [ { "click": "menuItemSelected(17,0)", "text": "Newton-meters (Nm)", "value": "forceNm" }, { "click": "menuItemSelected(17,1)", "text": "Kilonewton-meters (kNm)", "value": "forcekNm" }, { "click": "menuItemSelected(17,2)", "text": "Newtons (N)", "value": "forceN" }, { "click": "menuItemSelected(17,3)", "text": "Kilonewtons (kN)", "value": "forcekN" } ], "text": "force" }, { "submenu": [ { "click": "menuItemSelected(18,0)", "text": "Gallons/min (gpm)", "value": "flowgpm" }, { "click": "menuItemSelected(18,1)", "text": "Cubic meters/sec (cms)", "value": "flowcms" }, { "click": "menuItemSelected(18,2)", "text": "Cubic feet/sec (cfs)", "value": "flowcfs" }, { "click": "menuItemSelected(18,3)", "text": "Cubic feet/min (cfm)", "value": "flowcfm" } ], "text": "flow" }, { "submenu": [ { "click": "menuItemSelected(19,0)", "text": "Degrees (°)", "value": "degree" }, { "click": "menuItemSelected(19,1)", "text": "Radians", "value": "radian" }, { "click": "menuItemSelected(19,2)", "text": "Gradian", "value": "grad" } ], "text": "angle" }, { "submenu": [ { "click": "menuItemSelected(20,0)", "text": "Meters/sec²", "value": "accMS2" }, { "click": "menuItemSelected(20,1)", "text": "Feet/sec²", "value": "accFS2" }, { "click": "menuItemSelected(20,2)", "text": "G unit", "value": "accG" } ], "text": "acceleration" }, { "submenu": [ { "click": "menuItemSelected(21,0)", "text": "Becquerel (Bq)", "value": "radbq" }, { "click": "menuItemSelected(21,1)", "text": "curie (Ci)", "value": "radci" }, { "click": "menuItemSelected(21,2)", "text": "Gray (Gy)", "value": "radgy" }, { "click": "menuItemSelected(21,3)", "text": "rad", "value": "radrad" }, { "click": "menuItemSelected(21,4)", "text": "Sievert (Sv)", "value": "radsv" }, { "click": "menuItemSelected(21,5)", "text": "rem", "value": "radrem" }, { "click": "menuItemSelected(21,6)", "text": "Exposure (C/kg)", "value": "radexpckg" }, { "click": "menuItemSelected(21,7)", "text": "roentgen (R)", "value": "radr" }, { "click": "menuItemSelected(21,8)", "text": "Sievert/hour (Sv/h)", "value": "radsvh" } ], "text": "radiation" }, { "submenu": [ { "click": "menuItemSelected(22,0)", "text": "parts-per-million (ppm)", "value": "ppm" }, { "click": "menuItemSelected(22,1)", "text": "parts-per-billion (ppb)", "value": "conppb" }, { "click": "menuItemSelected(22,2)", "text": "nanogram per cubic metre (ng/m3)", "value": "conngm3" }, { "click": "menuItemSelected(22,3)", "text": "nanogram per normal cubic metre (ng/Nm3)", "value": "conngNm3" }, { "click": "menuItemSelected(22,4)", "text": "microgram per cubic metre (μg/m3)", "value": "conμgm3" }, { "click": "menuItemSelected(22,5)", "text": "microgram per normal cubic metre (μg/Nm3)", "value": "conμgNm3" }, { "click": "menuItemSelected(22,6)", "text": "milligram per cubic metre (mg/m3)", "value": "conmgm3" }, { "click": "menuItemSelected(22,7)", "text": "milligram per normal cubic metre (mg/Nm3)", "value": "conmgNm3" }, { "click": "menuItemSelected(22,8)", "text": "gram per cubic metre (g/m3)", "value": "congm3" }, { "click": "menuItemSelected(22,9)", "text": "gram per normal cubic metre (g/Nm3)", "value": "congNm3" } ], "text": "concentration" } ], "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" }, { "op": "=", "text": "", "value": "0" }, { "op": "=", "text": "", "value": "1" }, { "op": "=", "text": "", "value": "2" }, { "op": "=", "text": "", "value": "3" }, { "op": "=", "text": "", "value": "4" }, { "op": "=", "text": "", "value": "5" }, { "op": "=", "text": "", "value": "6" }, { "op": "=", "text": "", "value": "7" }, { "op": "=", "text": "", "value": "8" }, { "op": "=", "text": "", "value": "9" }, { "op": "=", "text": "", "value": "10" }, { "op": "=", "text": "", "value": "11" }, { "op": "=", "text": "", "value": "12" }, { "op": "=", "text": "", "value": "13" }, { "op": "=", "text": "", "value": "14" }, { "op": "=", "text": "", "value": "15" }, { "op": "=", "text": "", "value": "16" } ] }

zeroy99 commented 2 years ago

Thanks, its better but indication still off, my values are from 0 > 360 degrees, really dont understand how the tick and zero tick thing works! image

m4rky-m4rk commented 2 years ago

Change the gauge tick mapping to reflect the 0 - 360 values you have

zeroy99 commented 2 years ago

Thanks, I fixed it now image image