Hello! I am working with data analysis on Power BI. Since recently the platform removed the Histogram Chart I am trying to work with Deneb, a custom visual based on Vega-lite. I would like to build a histogram, with mean, lower specification limit (LSL) and upper specification limit (USL). My results are dynamic , since there are many products I am working with. Each product has analysis like pH, weight, concentration, etc, and each analysis has its own LSL and USL (ex: pH 7.0 to 8.5, concentration 1,3 to 2,9 % and weight 120 to 300 mg, all for product A).
I watched the video https://www.youtube.com/watch?v=67ucnNrMHgY, which really helped me! But I still am not able to add LSL and USL, because I am new in Vega-lite world.
{
"description": "Histogram",
"data": {"name": "dataset"},
"layer": [
{
"mark": {
"type": "bar",
"color": "#377eb8",
"tooltip": true
},
"encoding": {
"x": {
"field": "RESULTS",
"bin": {"maxbins": 10
},
"title": "RESULTS"
},
"y": {
"aggregate": "count",
"title": "ABSOLUTE FREQUENCE"
}
}
},
{
"mark": "rule",
"encoding": {
"x": {
"aggregate": "mean",
"field": "RESULTS"
},
"color": {"value": "red"},
"size": {"value": 3}
}
}
]
}
How can I add vertical lines with my limits? They are measures on Power BI. I can't fix a value, because the value change according with analyasis.
How to add vertical Rule with constant value to Vega Lite chart? This question is similar to mine, but didn't helped me, unfortunatelly.