Forum Discussion
Bar chart with design
- 4 years ago
Core visuals certainly dont support pattern fills, and there are a few custom ones that do. Visuals that adhere to the OBCS standard (such as ZebraBI have patern shading, but these are typically contextual for how patterns should be used in an IBCS scenario).
If you want a bit more control as the cost of having to do a bit more to set it up, Deneb provides support for a number of popular SVG patterns. Here's a quick mockup:
I've attached a sample workbook, but here's the Vega-Lite specification I used to produce:
{ "data": {"name": "dataset"}, "layer": [ { "mark": { "type": "bar", "stroke": "black" }, "encoding": { "fill": { "field": "Series", "legend": { "title": null, "orient": "top", "symbolType": "square", "symbolStrokeWidth": 1, "symbolSize": 200 }, "scale": { "range": [ "url(#diagonal-stripe-1)", "url(#circles-1)", "url(#houndstooth)" ] } } } }, { "mark": { "type": "text", "dy": -10 }, "encoding": { "text": {"field": "Value"} } } ], "encoding": { "x": { "field": "Category", "axis": {"labelAngle": 0} }, "xOffset": {"field": "Series"}, "y": { "field": "Value", "type": "quantitative" } } }Regards,
Daniel
Core visuals certainly dont support pattern fills, and there are a few custom ones that do. Visuals that adhere to the OBCS standard (such as ZebraBI have patern shading, but these are typically contextual for how patterns should be used in an IBCS scenario).
If you want a bit more control as the cost of having to do a bit more to set it up, Deneb provides support for a number of popular SVG patterns. Here's a quick mockup:
I've attached a sample workbook, but here's the Vega-Lite specification I used to produce:
{
"data": {"name": "dataset"},
"layer": [
{
"mark": {
"type": "bar",
"stroke": "black"
},
"encoding": {
"fill": {
"field": "Series",
"legend": {
"title": null,
"orient": "top",
"symbolType": "square",
"symbolStrokeWidth": 1,
"symbolSize": 200
},
"scale": {
"range": [
"url(#diagonal-stripe-1)",
"url(#circles-1)",
"url(#houndstooth)"
]
}
}
}
},
{
"mark": {
"type": "text",
"dy": -10
},
"encoding": {
"text": {"field": "Value"}
}
}
],
"encoding": {
"x": {
"field": "Category",
"axis": {"labelAngle": 0}
},
"xOffset": {"field": "Series"},
"y": {
"field": "Value",
"type": "quantitative"
}
}
}
Regards,
Daniel