Created
July 22, 2024 09:16
-
-
Save PBI-DataVizzle/6e409541fd72e6b3df06740144a7dda1 to your computer and use it in GitHub Desktop.
gradient_line_zero_scale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"width": 600, | |
"data": { | |
"values": [ | |
{ | |
"__row__": 0, | |
"calendar_month_year": "Dec-23", | |
"concentration_risk_monthly": 0.51 | |
}, | |
{ | |
"__row__": 1, | |
"calendar_month_year": "Jan-24", | |
"concentration_risk_monthly": 0.5 | |
}, | |
{ | |
"__row__": 2, | |
"calendar_month_year": "Feb-24", | |
"concentration_risk_monthly": 0.27 | |
}, | |
{ | |
"__row__": 3, | |
"calendar_month_year": "Mar-24", | |
"concentration_risk_monthly": 0.22 | |
}, | |
{ | |
"__row__": 4, | |
"calendar_month_year": "Apr-24", | |
"concentration_risk_monthly": 0.25 | |
}, | |
{ | |
"__row__": 5, | |
"calendar_month_year": "May-24", | |
"concentration_risk_monthly": 0.22 | |
} | |
] | |
}, | |
"mark": { | |
"type": "area", | |
"point": {"size": 70}, | |
"color": { | |
"x1": 1, | |
"y1": 1, | |
"x2": 1, | |
"y2": 0, | |
"gradient": "linear", | |
"stops": [ | |
{"offset": 0, "color": "#00800166"}, | |
{"offset": 0.26, "color": "#F7B50066"}, | |
{"offset": 0.57, "color": "#A9281F66"}, | |
{"offset": 1, "color": "#A9281F66"} | |
] | |
} | |
}, | |
"encoding": { | |
"x": { | |
"field": "calendar_month_year", | |
"type": "ordinal", | |
"sort": {"field": "__row__"}, | |
"axis": {"title": null}, | |
"scale": {"padding": 0} | |
}, | |
"y": { | |
"field": "concentration_risk_monthly", | |
"type": "quantitative", | |
"axis": {"title": null} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment