Closed carlhiggs closed 1 month ago
This is resolved, e.g.
The data story JSON code to define the above is,
"legend": [
{"upper":"≤20%"},
{"upper":"20%", "lower":"to 40%"},
{"upper":"40%", "lower":"to 60%"},
{"upper":"60%", "lower":"to 80%"},
{"upper":"80%", "lower":"to 100%",
"label": "Target threshold",
"title": "80% or greater (policy target)"
}
],
This should work for basic equal bin size legends with discrete/continuous values
Currently the legend is fixed with four bins labeled 1 to 4, regardless of the scenario:
For example, that scenario would be better labelled with perhaps 5 bins (0-20 %, 20-40 %, 40-60 %, 60-80 %, 80-100 %), where the last meets the target threshold.
This should be defined within a data story, without a user having to supply html code. e.g. just supply values and optionally corresponding labels. The number of values supplied indicates number of bins (e.g. 4 for LTS, or 5 for 20mnMelbourne).