cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rutuja_Kasar4
New Member

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
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.