Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to make voronoi diagram in deneb using vega language

 
2 REPLIES 2
KerKol
Super User
Super User

You can start from here:

Voronoi Transform | Vega





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




{
"data": [{"name": "dataset"}],
"width": 500,
"height": 200,
"autosize": "none",
"scales": [
{
"name": "xscale",
"domain": [0, 100],
"range": "width"
},
{
"name": "yscale",
"domain": [0, 100],
"range": "height"
}
],
"marks": [
{
"name": "points",
"type": "symbol",
"zindex": 1,
"from": {"data": "dataset"},
"interactive": false,
"encode": {
"enter": {
"fill": {"value": "black"},
"size": {"value": 36},
"x": {
"scale": "xscale",
"field": "Latitude"
},
"y": {
"scale": "yscale",
"field": "Longitude"
}
}
}
},
{
"type": "path",
"from": {"data": "points"},
"encode": {
"enter": {
"stroke": {
"value": "firebrick"
},
"fill": {
"value": "transparent"
}
}
},
"transform": [
{
"type": "voronoi",
"x": "datum.x",
"y": "datum.y",
"size": [
{"signal": "width"},
{"signal": "height"}
]
}
]
}
]
}

 

KerKol_0-1684144556841.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors