ARIA · table fallbackAccessibility
Canvas ARIA metadata is paired with a text summary and table fallback.
Graflume · Alpha
Encode direction and magnitude at each coordinate with arrow angle and length.
Chart family · Specialized families
Encode direction and magnitude at each coordinate with arrow angle and length.
vectorField()graflume/completevectorBasic implementation
Start with only the required data and family encoding. Expand the code to run the same example.
Encode direction and magnitude at each coordinate with arrow angle and length.
StatusLoading
minimal-implementationLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Common features
Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.
Add a chart title and supporting description inside the visualization.
StatusLoading
headerLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "Vector field chart uses runnable data and options to demonstrate direction and magnitude arrows; magnitude size and width.",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "Vector field chart uses runnable data and options to demonstrate direction and magnitude arrows; magnitude size and width.",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Reveal exact values from a mark or axis position. Authors can choose locale-aware date/time styles and a time zone with declarative options.
StatusLoading
tooltipLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field · Tooltip",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field · Tooltip",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Apply the current built-in theme from the selector and update every active example together.
StatusLoading
themeLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"theme": "graflume-light",
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"theme": "graflume-light",
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Explain the visual meaning of layers, categories, or continuous values.
StatusLoading
legendlegend · explicit · 1 channelsLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field · Legend",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field · Legend",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Emphasize a representative datum or spatial position to guide inspection.
StatusLoading
highlighthighlights[] · datum · directionLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
}
}
],
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
}
}
],
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Show an explanatory callout with automatic collision avoidance and multilingual wrapping.
StatusLoading
calloutannotations[] · datum · direction · callout · placement:autoLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
},
"text": "Point and range highlights · 0"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
}
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
},
"text": "Point and range highlights · 0"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
}
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Select and toggle data, then clear it from the background or Escape key.
StatusLoading
selectionselection · multiple · toggleLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "direction",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "direction",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Show or hide zoom, pan, reset, projection, fullscreen, and PNG export one menu at a time. Set controls: false to remove the entire toolbar.
StatusLoading
controlsLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Pair ARIA descriptions and keyboard guidance with a semantic data table.
StatusLoading
accessibilityLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · Accessibility example"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · Accessibility example"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Chart-specific features
These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.
Vector field chart uses runnable data and options to demonstrate direction and magnitude arrows; magnitude size and width.
StatusLoading
vectordirection and magnitude arrowsmagnitude size and widthnormalization and sampled gridLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field example"
},
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Vector field chart uses runnable data and options to demonstrate direction and magnitude arrows; magnitude size and width.",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field example"
},
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Vector field chart uses runnable data and options to demonstrate direction and magnitude arrows; magnitude size and width.",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Wind barb chart uses runnable data and options to demonstrate wind barbs; vector-to-magnitude transform.
StatusLoading
wind-barbwind barbsvector-to-magnitude transformstreamline seeding/integrationLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | speedquantitative | directionquantitative |
|---|---|---|---|
| -4 | -3 | 17.824 | 310.267 |
| -3 | -3 | 15.984 | 322.357 |
| -2 | -3 | 14.52 | 335.932 |
| -1 | -3 | 13.208 | 350.937 |
| 0 | -3 | 12.24 | 8.269000000000005 |
| 1 | -3 | 12.256 | 27.187000000000012 |
| 2 | -3 | 13.744 | 43.389999999999986 |
| 3 | -3 | 16.496 | 53.60000000000002 |
| 4 | -3 | 20.032 | 58.69999999999999 |
| -4 | -2 | 15.888 | 298.909 |
| -3 | -2 | 13.384 | 311.202 |
| -2 | -2 | 11.288 | 326.516 |
| -1 | -2 | 9.504 | 345.451 |
| 0 | -2 | 8.4 | 9.963000000000022 |
| 1 | -2 | 8.824 | 36.84699999999998 |
| 2 | -2 | 11.008 | 56.06 |
| 3 | -2 | 14.272 | 65.358 |
| 4 | -2 | 18.048 | 68.65899999999999 |
| -4 | -1 | 15.216 | 284.619 |
| -3 | -1 | 11.968 | 294.563 |
| -2 | -1 | 8.984 | 308.364 |
| -1 | -1 | 6.24 | 329.141 |
| 0 | -1 | 4.472 | 8.192999999999984 |
| 1 | -1 | 5.52 | 54.25799999999998 |
| 2 | -1 | 8.632 | 74.50400000000002 |
| 3 | -1 | 12.336 | 80.14999999999998 |
| 4 | -1 | 16.232 | 80.31900000000002 |
| -4 | 0 | 15.76 | 270 |
| -3 | 0 | 11.976 | 275.434 |
| -2 | 0 | 8.264 | 282.115 |
| -1 | 0 | 4.504 | 289.714 |
| 0 | 0 | 0.712 | 325.853 |
| 1 | 0 | 3.496 | 100.17399999999998 |
| 2 | 0 | 7.44 | 101.899 |
| 3 | 0 | 11.256 | 98.83800000000002 |
| 4 | 0 | 15 | 94.24700000000001 |
| -4 | 1 | 17.096 | 257.019 |
| -3 | 1 | 13.104 | 258.078 |
| -2 | 1 | 9.224 | 256.801 |
| -1 | 1 | 5.64 | 245.691 |
| 0 | 1 | 3.496 | 201.766 |
| 1 | 1 | 5.128 | 150.30200000000002 |
| 2 | 1 | 8.344 | 130.098 |
| 3 | 1 | 11.64 | 118.582 |
| 4 | 1 | 14.912 | 109.39600000000002 |
| -4 | 2 | 18.744 | 245.817 |
| -3 | 2 | 14.792 | 243.73 |
| -2 | 2 | 11.144 | 237.748 |
| -1 | 2 | 8.312 | 222.18 |
| 0 | 2 | 7.304 | 193.806 |
| 1 | 2 | 8.56 | 165.813 |
| 2 | 2 | 10.96 | 147.202 |
| 3 | 2 | 13.568 | 133.89999999999998 |
| 4 | 2 | 16.208 | 122.84500000000003 |
| -4 | 3 | 20.488 | 235.78 |
| -3 | 3 | 16.72 | 231.588 |
| -2 | 3 | 13.472 | 223.414 |
| -1 | 3 | 11.376 | 208.448 |
| 0 | 3 | 11.04 | 188.216 |
| 1 | 3 | 12.344 | 169.44399999999996 |
| 2 | 3 | 14.408 | 154.94799999999998 |
| 3 | 3 | 16.568 | 143.11700000000002 |
| 4 | 3 | 18.696 | 132.505 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"speed": 17.824,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"speed": 15.984,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"speed": 14.52,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"speed": 13.208,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"speed": 12.24,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"speed": 12.256,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"speed": 13.744,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"speed": 16.496,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"speed": 20.032,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"speed": 15.888,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"speed": 13.384,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"speed": 11.288,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"speed": 9.504,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"speed": 8.4,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"speed": 8.824,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"speed": 11.008,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"speed": 14.272,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"speed": 18.048,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"speed": 15.216,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"speed": 11.968,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"speed": 8.984,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"speed": 6.24,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"speed": 4.472,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"speed": 5.52,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"speed": 8.632,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"speed": 12.336,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"speed": 16.232,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"speed": 15.76,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"speed": 11.976,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"speed": 8.264,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"speed": 4.504,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"speed": 0.712,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"speed": 3.496,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"speed": 7.44,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"speed": 11.256,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"speed": 15,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"speed": 17.096,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"speed": 13.104,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"speed": 9.224,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"speed": 5.64,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"speed": 3.496,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"speed": 5.128,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"speed": 8.344,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"speed": 11.64,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"speed": 14.912,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"speed": 18.744,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"speed": 14.792,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"speed": 11.144,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"speed": 8.312,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"speed": 7.304,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"speed": 8.56,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"speed": 10.96,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"speed": 13.568,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"speed": 16.208,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"speed": 20.488,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"speed": 16.72,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"speed": 13.472,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"speed": 11.376,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"speed": 11.04,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"speed": 12.344,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"speed": 14.408,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"speed": 16.568,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"speed": 18.696,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · Wind barb chart example"
},
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "speed",
"format": "number",
"label": "Speed"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
}
],
"title": "Vector field · Wind barb chart",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"speed": "speed"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Wind barb chart uses runnable data and options to demonstrate wind barbs; vector-to-magnitude transform.",
"text": "Vector field · Wind barb chart"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.windBarb('#chart', data, options);Portable schema
{
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · Wind barb chart example"
},
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"height": 620,
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "speed",
"format": "number",
"label": "Speed"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
}
],
"title": "Vector field · Wind barb chart",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"speed": "speed"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Wind barb chart uses runnable data and options to demonstrate wind barbs; vector-to-magnitude transform.",
"text": "Vector field · Wind barb chart"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Edge cases
Exercise numeric range, sparse structure, and large inputs with valid data. Each tab materializes data only when needed and never silently repairs invalid values.
Mix zero, very small finite values, and very large finite values to verify automatic domains, precision, and stable geometry. NaN and Infinity remain intentionally invalid. It applies 2 data-integrity rules that preserve finite values and axis domains.
StatusLoading
extreme-rangeextreme-smallextreme-largezeromixed-signbudget:marks<=6Loading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative | valuequantitative | highquantitative |
|---|---|---|---|---|---|
| -4 | -3 | -360 | 1e-09 | -1e+12 | -1e-09 |
| -3 | -3 | 0 | 0 | -1e-09 | 0 |
| -2 | -3 | 360 | 1e+12 | 0 | 1e+12 |
| -1 | -3 | 720 | 1 | 1e+12 | 1e-09 |
| 0 | -3 | 90 | 1e+06 | 1e-09 | 1e+06 |
| 1 | -3 | 270 | 1e-06 | 1e+06 | -1e+12 |
Browser API
const data = [
{
"direction": -360,
"high": -1e-9,
"magnitude": 1e-9,
"value": -1000000000000,
"x": -4,
"y": -3
},
{
"direction": 0,
"high": 0,
"magnitude": 0,
"value": -1e-9,
"x": -3,
"y": -3
},
{
"direction": 360,
"high": 1000000000000,
"magnitude": 1000000000000,
"value": 0,
"x": -2,
"y": -3
},
{
"direction": 720,
"high": 1e-9,
"magnitude": 1,
"value": 1000000000000,
"x": -1,
"y": -3
},
{
"direction": 90,
"high": 1000000,
"magnitude": 1000000,
"value": 1e-9,
"x": 0,
"y": -3
},
{
"direction": 270,
"high": -1000000000000,
"magnitude": 0.000001,
"value": 1000000,
"x": 1,
"y": -3
}
];
const options = {
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "edge case · range",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vectorField('#chart', data, options);Portable schema
{
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "edge case · range",
"text": "Vector field"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Exercise only duplicate, missing, sparse, or out-of-order structures whose meaning is defined for this family. Broken references and malformed tuples are never disguised as successful examples. It applies 3 structural rules that preserve the meaning of missing, duplicate, and ordered values.
StatusLoading
irregular-structuresparseduplicate-pointangle-wrapzero-vectorbudget:marks<=7Loading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative | valuequantitative | highquantitative |
|---|---|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 | 1.44 | -1.7 |
| -3 | -3 | 322.357 | 1.998 | 1.582 | -1.22 |
| -4 | -3 | 310.267 | 2.228 | 1.44 | -1.7 |
| -2 | -3 | 335.932 | 1.815 | 1.657 | -0.74 |
| -1 | -3 | 350.937 | 1.651 | 1.63 | -0.26 |
| 0 | -3 | 8.269000000000005 | 1.53 | 1.514 | 0.22 |
| 1 | -3 | 27.187000000000012 | 1.532 | 1.363 | 0.7 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
}
];
const options = {
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field · Sparse and irregular structure"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "edge case · structure",
"text": "Vector field · Sparse and irregular structure"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vectorField('#chart', data, options);Portable schema
{
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field · Sparse and irregular structure"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"title": {
"subtitle": "edge case · structure",
"text": "Vector field · Sparse and irregular structure"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Materialize a deterministic compact recipe only when this tab opens. Graflume's performance profile bounds mark count, hit testing, and animation work for the input size. It applies 6 high-volume rules for deterministic generation and bounded output. This family materializes 60,000 logical rows and bounds rendered point marks at 20,000.
StatusLoading
high-row-cardinalityall-input-rows-generatedall-input-rows-processeddeterministic-generationbounded-renderinginput:60000zoom-pan-resetbudget:point-marks<=20000legend · explicit · 1 channelshighlights[] · datum · xannotations[] · datum · x · callout · placement:autoLoading
Browser API
const recipe = {
"cardinality": {
"axes": {},
"sourceRows": 60000,
"unit": "rows"
},
"expectedInvariants": [
"finite-json",
"magnitude-nonnegative"
],
"id": "spatial-vector",
"initialView": {
"kind": "domain",
"zoom": 1
},
"outputBudget": {
"maximum": 20000,
"resource": "point-marks"
},
"parameters": {
"family": "vector-field",
"nullableFields": [],
"positiveFields": [
"magnitude"
],
"scenario": "volume",
"valueFields": [
"value",
"high"
],
"valuePolicy": "vector"
},
"preview": {
"maximumRows": 12,
"method": "spatial-slice"
},
"reduction": {
"method": "vector-grid-level-of-detail",
"stage": "level-of-detail"
},
"seed": 839683241,
"shape": "rows",
"version": 2
};
const { data, previewRows, plan } = Graflume.materializeDemoRecipe(recipe);
const options = {
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · High data volume"
},
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "x",
"type": "datum",
"value": -1.2623
},
"text": "Point and range highlights · -1.2623"
}
],
"create": {
"adaptive": {
"environment": {
"rowCount": 60000
},
"largeDataNavigation": true,
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": -1.2623
}
}
],
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
},
{
"field": "value",
"format": "number",
"label": "Value"
},
{
"field": "high",
"format": "number",
"label": "High"
}
],
"title": "Vector field · High data volume",
"trigger": "mark"
}
},
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field · High data volume",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"performance": "auto",
"theme": "graflume-light",
"title": {
"subtitle": "A balanced vortex keeps direction, magnitude, and the calm center visible · 60,000 logical rows, screen-aware detail",
"text": "Vector field · High data volume"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vectorField('#chart', data, options);Portable schema
{
"accessibility": {
"description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
"label": "Vector field · High data volume"
},
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "x",
"type": "datum",
"value": -1.2623
},
"text": "Point and range highlights · -1.2623"
}
],
"create": {
"adaptive": {
"environment": {
"rowCount": 60000
},
"largeDataNavigation": true,
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": -1.2623
}
}
],
"interaction": {
"controls": {
"annotations": false,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
},
{
"field": "value",
"format": "number",
"label": "Value"
},
{
"field": "high",
"format": "number",
"label": "High"
}
],
"title": "Vector field · High data volume",
"trigger": "mark"
}
},
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field · High data volume",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"performance": "auto",
"theme": "graflume-light",
"title": {
"subtitle": "A balanced vortex keeps direction, magnitude, and the calm center visible · 60,000 logical rows, screen-aware detail",
"text": "Vector field · High data volume"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Extreme environments
Combine container size, input method, display capability, and user preference instead of guessing a device name. Compare mobile, watch, e-paper, monochrome, dot-matrix, and standards-based extreme environments on the same chart.
Reflow axes, legends, descriptions, and controls from the available container size.
960×540 · adaptive.profiles=responsive-fluidzoom-reflowshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialPrioritize 44px touch targets, tap tooltips, and collapsed secondary information on a narrow portrait screen.
390×844 · adaptive.profiles=mobile-touchzoom-reflowcoarse-touchvirtual-keyboardshape-rectangledisplay-colorinput-coarsemotion-fullrenderer-canvas-spatialKeep essential marks, values, and stepped controls on a tiny or round screen, with the remaining detail reflowed below.
184×224 · adaptive.profiles=smartwatchzoom-reflowreduced-effectscoarse-touchlow-resourcecutout-roundshape-rounddisplay-colorinput-coarsemotion-reducedrenderer-canvas-spatialviewport-tinyPrefer stable frames, strong contrast, and the data table for low-refresh e-paper displays.
758×1024 · adaptive.profiles=ebook-paperprint-pagedreduced-effectslow-resourceshape-pageddisplay-e-inkinput-keyboardmotion-staticrenderer-canvas-spatialUse strokes, markers, patterns, labels, and the table so color is never the only distinction.
640×400 · adaptive.profiles=monochromereduced-effectsshape-rectangledisplay-monochromeinput-finemotion-reducedrenderer-canvas-spatialReduce decoration and mark density while using strong strokes, integer labels, and stepped zoom on a low-resolution display.
320×240 · adaptive.profiles=dot-matrixzoom-reflowreduced-effectskeyboard-switchlow-resourceshape-rectangledisplay-gridinput-keyboardmotion-staticrenderer-canvas-spatialviewport-tinyReflow prose to one dimension at the 320 CSS px equivalent while retaining chart-local zoom and pan.
320×480 · adaptive.profiles=zoom-reflowzoom-reflowshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialKeep the chart and explanation in independent viewport segments without crossing the hinge.
720×640 · adaptive.profiles=foldable-dualfoldable-dualshape-dualdisplay-colorinput-finemotion-fullrenderer-canvas-spatialProvide strong focus indication and D-pad, Enter, and Escape operation on a hoverless distance display.
1920×1080 · adaptive.profiles=tv-remotetv-remoteshape-rectangledisplay-colorinput-remotemotion-fullrenderer-canvas-spatialPair a static chart with its description and table, hide controls, and avoid page breaks through the figure.
794×1123 · adaptive.profiles=print-pagedprint-pagedshape-pageddisplay-colorinput-finemotion-staticrenderer-canvas-spatialHonor system colors and borders while retaining patterns, markers, and text as redundant cues.
640×400 · adaptive.profiles=forced-colorsforced-colorsshape-rectangledisplay-high-contrastinput-finemotion-fullrenderer-canvas-spatialComplete transitions immediately and use opaque surfaces and deferred work to reduce motion and transparency load.
640×400 · adaptive.profiles=reduced-effectsreduced-effectsshape-rectangledisplay-colorinput-finemotion-reducedrenderer-canvas-spatialInspect values by tap without hover, keep targets at least 44px, and expose explicit zoom buttons.
390×844 · adaptive.profiles=coarse-touchcoarse-touchshape-rectangledisplay-colorinput-coarsemotion-fullrenderer-canvas-spatialReach every operation with Tab, arrows, Enter, Space, and Escape, with no drag-only action.
640×400 · adaptive.profiles=keyboard-switchkeyboard-switchshape-rectangledisplay-colorinput-keyboardmotion-fullrenderer-canvas-spatialPrefer progressive rendering, sampling, cancellable work, and a static fallback under constrained memory or connectivity.
640×400 · adaptive.profiles=low-resourcelow-resourceshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialFollow RTL logical flow for prose and tabs while keeping axes, code, and data identifiers in technical LTR order.
640×400 · adaptive.profiles=rtlrtlshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialReflow vertical prose while keeping the chart and technical surfaces in an independent horizontal panel.
640×400 · adaptive.profiles=vertical-writingvertical-writingshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialCap chart width instead of stretching indefinitely, using panelization and readable labels on ultrawide or projected surfaces.
1920×720 · adaptive.profiles=ultrawide-projectionultrawide-projectionshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialProvide short and long descriptions, a semantic table, and status so Canvas or color is never the sole information path.
640×400 · adaptive.profiles=screenreader-braillescreenreader-brailleshape-nonvisualdisplay-colorinput-nonvisualmotion-fullrenderer-canvas-spatialA verified static preview, description, and collapsible row-data table preserve the essential information when scripting is unavailable.
640×400 · adaptive.profiles=no-scriptno-scriptshape-nonvisualdisplay-colorinput-finemotion-staticrenderer-static-fallbackFall back safely to the ordinary 2D or WebGL panel when XR APIs are absent, duplicating depth cues in text and the table.
640×400 · adaptive.profiles=spatial-xrspatial-xrshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialInset titles, marks, and controls around safe areas and round display bounds so they are not clipped.
184×224 · adaptive.profiles=cutout-roundcutout-roundshape-rounddisplay-colorinput-finemotion-fullrenderer-canvas-spatialviewport-tinyReflow focus controls, the chart, and the active explanation when a virtual keyboard reduces the visual viewport.
390×560 · adaptive.profiles=virtual-keyboardvirtual-keyboardshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatialChoose a profile above to preserve the same data and ChartSpec while reconfiguring the chart for display size, input method, display capability, and user preference.
StatusLoading
adaptivecapability-drivenno-user-agent-branchinglegend · explicit · 1 channelshighlights[] · datum · directionannotations[] · datum · direction · callout · placement:autoselection · multiple · toggleLoading
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | directionquantitative | magnitudequantitative |
|---|---|---|---|
| -4 | -3 | 310.267 | 2.228 |
| -3 | -3 | 322.357 | 1.998 |
| -2 | -3 | 335.932 | 1.815 |
| -1 | -3 | 350.937 | 1.651 |
| 0 | -3 | 8.269000000000005 | 1.53 |
| 1 | -3 | 27.187000000000012 | 1.532 |
| 2 | -3 | 43.389999999999986 | 1.718 |
| 3 | -3 | 53.60000000000002 | 2.062 |
| 4 | -3 | 58.69999999999999 | 2.504 |
| -4 | -2 | 298.909 | 1.986 |
| -3 | -2 | 311.202 | 1.673 |
| -2 | -2 | 326.516 | 1.411 |
| -1 | -2 | 345.451 | 1.188 |
| 0 | -2 | 9.963000000000022 | 1.05 |
| 1 | -2 | 36.84699999999998 | 1.103 |
| 2 | -2 | 56.06 | 1.376 |
| 3 | -2 | 65.358 | 1.784 |
| 4 | -2 | 68.65899999999999 | 2.256 |
| -4 | -1 | 284.619 | 1.902 |
| -3 | -1 | 294.563 | 1.496 |
| -2 | -1 | 308.364 | 1.123 |
| -1 | -1 | 329.141 | 0.78 |
| 0 | -1 | 8.192999999999984 | 0.559 |
| 1 | -1 | 54.25799999999998 | 0.69 |
| 2 | -1 | 74.50400000000002 | 1.079 |
| 3 | -1 | 80.14999999999998 | 1.542 |
| 4 | -1 | 80.31900000000002 | 2.029 |
| -4 | 0 | 270 | 1.97 |
| -3 | 0 | 275.434 | 1.497 |
| -2 | 0 | 282.115 | 1.033 |
| -1 | 0 | 289.714 | 0.563 |
| 0 | 0 | 325.853 | 0.089 |
| 1 | 0 | 100.17399999999998 | 0.437 |
| 2 | 0 | 101.899 | 0.93 |
| 3 | 0 | 98.83800000000002 | 1.407 |
| 4 | 0 | 94.24700000000001 | 1.875 |
| -4 | 1 | 257.019 | 2.137 |
| -3 | 1 | 258.078 | 1.638 |
| -2 | 1 | 256.801 | 1.153 |
| -1 | 1 | 245.691 | 0.705 |
| 0 | 1 | 201.766 | 0.437 |
| 1 | 1 | 150.30200000000002 | 0.641 |
| 2 | 1 | 130.098 | 1.043 |
| 3 | 1 | 118.582 | 1.455 |
| 4 | 1 | 109.39600000000002 | 1.864 |
| -4 | 2 | 245.817 | 2.343 |
| -3 | 2 | 243.73 | 1.849 |
| -2 | 2 | 237.748 | 1.393 |
| -1 | 2 | 222.18 | 1.039 |
| 0 | 2 | 193.806 | 0.913 |
| 1 | 2 | 165.813 | 1.07 |
| 2 | 2 | 147.202 | 1.37 |
| 3 | 2 | 133.89999999999998 | 1.696 |
| 4 | 2 | 122.84500000000003 | 2.026 |
| -4 | 3 | 235.78 | 2.561 |
| -3 | 3 | 231.588 | 2.09 |
| -2 | 3 | 223.414 | 1.684 |
| -1 | 3 | 208.448 | 1.422 |
| 0 | 3 | 188.216 | 1.38 |
| 1 | 3 | 169.44399999999996 | 1.543 |
| 2 | 3 | 154.94799999999998 | 1.801 |
| 3 | 3 | 143.11700000000002 | 2.071 |
| 4 | 3 | 132.505 | 2.337 |
Browser API
const data = [
{
"direction": 310.267,
"high": -1.7,
"magnitude": 2.228,
"value": 1.44,
"x": -4,
"y": -3
},
{
"direction": 322.357,
"high": -1.22,
"magnitude": 1.998,
"value": 1.582,
"x": -3,
"y": -3
},
{
"direction": 335.932,
"high": -0.74,
"magnitude": 1.815,
"value": 1.657,
"x": -2,
"y": -3
},
{
"direction": 350.937,
"high": -0.26,
"magnitude": 1.651,
"value": 1.63,
"x": -1,
"y": -3
},
{
"direction": 8.269000000000005,
"high": 0.22,
"magnitude": 1.53,
"value": 1.514,
"x": 0,
"y": -3
},
{
"direction": 27.187000000000012,
"high": 0.7,
"magnitude": 1.532,
"value": 1.363,
"x": 1,
"y": -3
},
{
"direction": 43.389999999999986,
"high": 1.18,
"magnitude": 1.718,
"value": 1.248,
"x": 2,
"y": -3
},
{
"direction": 53.60000000000002,
"high": 1.66,
"magnitude": 2.062,
"value": 1.224,
"x": 3,
"y": -3
},
{
"direction": 58.69999999999999,
"high": 2.14,
"magnitude": 2.504,
"value": 1.301,
"x": 4,
"y": -3
},
{
"direction": 298.909,
"high": -1.738,
"magnitude": 1.986,
"value": 0.96,
"x": -4,
"y": -2
},
{
"direction": 311.202,
"high": -1.258,
"magnitude": 1.673,
"value": 1.102,
"x": -3,
"y": -2
},
{
"direction": 326.516,
"high": -0.778,
"magnitude": 1.411,
"value": 1.177,
"x": -2,
"y": -2
},
{
"direction": 345.451,
"high": -0.298,
"magnitude": 1.188,
"value": 1.15,
"x": -1,
"y": -2
},
{
"direction": 9.963000000000022,
"high": 0.182,
"magnitude": 1.05,
"value": 1.034,
"x": 0,
"y": -2
},
{
"direction": 36.84699999999998,
"high": 0.662,
"magnitude": 1.103,
"value": 0.883,
"x": 1,
"y": -2
},
{
"direction": 56.06,
"high": 1.142,
"magnitude": 1.376,
"value": 0.768,
"x": 2,
"y": -2
},
{
"direction": 65.358,
"high": 1.622,
"magnitude": 1.784,
"value": 0.744,
"x": 3,
"y": -2
},
{
"direction": 68.65899999999999,
"high": 2.102,
"magnitude": 2.256,
"value": 0.821,
"x": 4,
"y": -2
},
{
"direction": 284.619,
"high": -1.84,
"magnitude": 1.902,
"value": 0.48,
"x": -4,
"y": -1
},
{
"direction": 294.563,
"high": -1.36,
"magnitude": 1.496,
"value": 0.622,
"x": -3,
"y": -1
},
{
"direction": 308.364,
"high": -0.88,
"magnitude": 1.123,
"value": 0.697,
"x": -2,
"y": -1
},
{
"direction": 329.141,
"high": -0.4,
"magnitude": 0.78,
"value": 0.67,
"x": -1,
"y": -1
},
{
"direction": 8.192999999999984,
"high": 0.08,
"magnitude": 0.559,
"value": 0.554,
"x": 0,
"y": -1
},
{
"direction": 54.25799999999998,
"high": 0.56,
"magnitude": 0.69,
"value": 0.403,
"x": 1,
"y": -1
},
{
"direction": 74.50400000000002,
"high": 1.04,
"magnitude": 1.079,
"value": 0.288,
"x": 2,
"y": -1
},
{
"direction": 80.14999999999998,
"high": 1.52,
"magnitude": 1.542,
"value": 0.264,
"x": 3,
"y": -1
},
{
"direction": 80.31900000000002,
"high": 2,
"magnitude": 2.029,
"value": 0.341,
"x": 4,
"y": -1
},
{
"direction": 270,
"high": -1.97,
"magnitude": 1.97,
"value": 0,
"x": -4,
"y": 0
},
{
"direction": 275.434,
"high": -1.49,
"magnitude": 1.497,
"value": 0.142,
"x": -3,
"y": 0
},
{
"direction": 282.115,
"high": -1.01,
"magnitude": 1.033,
"value": 0.217,
"x": -2,
"y": 0
},
{
"direction": 289.714,
"high": -0.53,
"magnitude": 0.563,
"value": 0.19,
"x": -1,
"y": 0
},
{
"direction": 325.853,
"high": -0.05,
"magnitude": 0.089,
"value": 0.074,
"x": 0,
"y": 0
},
{
"direction": 100.17399999999998,
"high": 0.43,
"magnitude": 0.437,
"value": -0.077,
"x": 1,
"y": 0
},
{
"direction": 101.899,
"high": 0.91,
"magnitude": 0.93,
"value": -0.192,
"x": 2,
"y": 0
},
{
"direction": 98.83800000000002,
"high": 1.39,
"magnitude": 1.407,
"value": -0.216,
"x": 3,
"y": 0
},
{
"direction": 94.24700000000001,
"high": 1.87,
"magnitude": 1.875,
"value": -0.139,
"x": 4,
"y": 0
},
{
"direction": 257.019,
"high": -2.082,
"magnitude": 2.137,
"value": -0.48,
"x": -4,
"y": 1
},
{
"direction": 258.078,
"high": -1.602,
"magnitude": 1.638,
"value": -0.338,
"x": -3,
"y": 1
},
{
"direction": 256.801,
"high": -1.122,
"magnitude": 1.153,
"value": -0.263,
"x": -2,
"y": 1
},
{
"direction": 245.691,
"high": -0.642,
"magnitude": 0.705,
"value": -0.29,
"x": -1,
"y": 1
},
{
"direction": 201.766,
"high": -0.162,
"magnitude": 0.437,
"value": -0.406,
"x": 0,
"y": 1
},
{
"direction": 150.30200000000002,
"high": 0.318,
"magnitude": 0.641,
"value": -0.557,
"x": 1,
"y": 1
},
{
"direction": 130.098,
"high": 0.798,
"magnitude": 1.043,
"value": -0.672,
"x": 2,
"y": 1
},
{
"direction": 118.582,
"high": 1.278,
"magnitude": 1.455,
"value": -0.696,
"x": 3,
"y": 1
},
{
"direction": 109.39600000000002,
"high": 1.758,
"magnitude": 1.864,
"value": -0.619,
"x": 4,
"y": 1
},
{
"direction": 245.817,
"high": -2.138,
"magnitude": 2.343,
"value": -0.96,
"x": -4,
"y": 2
},
{
"direction": 243.73,
"high": -1.658,
"magnitude": 1.849,
"value": -0.818,
"x": -3,
"y": 2
},
{
"direction": 237.748,
"high": -1.178,
"magnitude": 1.393,
"value": -0.743,
"x": -2,
"y": 2
},
{
"direction": 222.18,
"high": -0.698,
"magnitude": 1.039,
"value": -0.77,
"x": -1,
"y": 2
},
{
"direction": 193.806,
"high": -0.218,
"magnitude": 0.913,
"value": -0.886,
"x": 0,
"y": 2
},
{
"direction": 165.813,
"high": 0.262,
"magnitude": 1.07,
"value": -1.037,
"x": 1,
"y": 2
},
{
"direction": 147.202,
"high": 0.742,
"magnitude": 1.37,
"value": -1.152,
"x": 2,
"y": 2
},
{
"direction": 133.89999999999998,
"high": 1.222,
"magnitude": 1.696,
"value": -1.176,
"x": 3,
"y": 2
},
{
"direction": 122.84500000000003,
"high": 1.702,
"magnitude": 2.026,
"value": -1.099,
"x": 4,
"y": 2
},
{
"direction": 235.78,
"high": -2.117,
"magnitude": 2.561,
"value": -1.44,
"x": -4,
"y": 3
},
{
"direction": 231.588,
"high": -1.637,
"magnitude": 2.09,
"value": -1.298,
"x": -3,
"y": 3
},
{
"direction": 223.414,
"high": -1.157,
"magnitude": 1.684,
"value": -1.223,
"x": -2,
"y": 3
},
{
"direction": 208.448,
"high": -0.677,
"magnitude": 1.422,
"value": -1.25,
"x": -1,
"y": 3
},
{
"direction": 188.216,
"high": -0.197,
"magnitude": 1.38,
"value": -1.366,
"x": 0,
"y": 3
},
{
"direction": 169.44399999999996,
"high": 0.283,
"magnitude": 1.543,
"value": -1.517,
"x": 1,
"y": 3
},
{
"direction": 154.94799999999998,
"high": 0.763,
"magnitude": 1.801,
"value": -1.632,
"x": 2,
"y": 3
},
{
"direction": 143.11700000000002,
"high": 1.243,
"magnitude": 2.071,
"value": -1.656,
"x": 3,
"y": 3
},
{
"direction": 132.505,
"high": 1.723,
"magnitude": 2.337,
"value": -1.579,
"x": 4,
"y": 3
}
];
const options = {
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field chart: A balanced vortex keeps direction, magnitude, and the calm center visible"
},
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
},
"text": "Point and range highlights · 0"
}
],
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"create": {
"adaptive": {
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
}
}
],
"interaction": {
"controls": {
"annotations": true,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "direction",
"mode": "multiple",
"toggle": true
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field",
"trigger": "mark"
}
},
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "A balanced vortex keeps direction, magnitude, and the calm center visible",
"text": "Vector field chart"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
};
Graflume.vector('#chart', data, options);Portable schema
{
"accessibility": {
"description": "A balanced vortex keeps direction, magnitude, and the calm center visible. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Vector field chart: A balanced vortex keeps direction, magnitude, and the calm center visible"
},
"annotations": [
{
"connector": {
"visible": true
},
"detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
"id": "manual-callout",
"placement": "auto",
"style": {
"maxWidth": 220,
"padding": 8
},
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
},
"text": "Point and range highlights · 0"
}
],
"axes": {
"x": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "East–west distance"
}
},
"y": {
"format": {
"fractionDigits": 0,
"suffix": " km",
"type": "number"
},
"ticks": {
"count": 5
},
"title": {
"text": "North–south distance"
}
}
},
"create": {
"adaptive": {
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "direction",
"type": "datum",
"value": 325.853
}
}
],
"interaction": {
"controls": {
"annotations": true,
"export": true,
"fullscreen": true,
"labels": {
"controls": "Chart controls",
"enterFullscreen": "Enter fullscreen",
"exitFullscreen": "Exit fullscreen",
"exportPng": "Download PNG",
"hideAnnotations": "Hide callouts",
"loop": "Loop playback",
"nextFrame": "Next frame",
"pause": "Pause",
"play": "Play",
"previousFrame": "Previous frame",
"reset": "Reset view",
"seek": "Playback position",
"showAnnotations": "Show callouts",
"speed": "Playback speed",
"zoomIn": "Zoom in",
"zoomOut": "Zoom out"
},
"playback": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "direction",
"mode": "multiple",
"toggle": true
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "direction",
"format": "number",
"fractionDigits": 0,
"label": "Direction",
"suffix": "°"
},
{
"field": "magnitude",
"format": "number",
"label": "Magnitude"
}
],
"title": "Vector field",
"trigger": "mark"
}
},
"legend": {
"interactive": false,
"items": [
{
"id": "semantic-0",
"label": "Magnitude · length"
}
],
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "layers",
"orientation": "horizontal",
"position": "bottom",
"title": "Vector field",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"direction": "direction",
"magnitude": "magnitude"
}
},
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "A balanced vortex keeps direction, magnitude, and the calm center visible",
"text": "Vector field chart"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal position",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical position",
"type": "quantitative"
}
}Catalog
The source-controlled catalog maps callable modes in this family and compatibility identifiers to their canonical modes. This table contains executable entries only.
2 modes · 2 compatibility identifiers
| ID | Name | Quick API | mode | mark | renderer |
|---|---|---|---|---|---|
vector | Vector field chart | vector() | vector | vector | canvas |
wind-barb | Wind barb chart | windBarb() | wind-barb | wind-barb | canvas |
| Identifier | Canonical mode ID |
|---|---|
vector | vector |
windbarb | wind-barb |
Manual
ARIA · table fallbackCanvas ARIA metadata is paired with a text summary and table fallback.
standard · large · ultraStandard, large, and ultra profiles bound rendering work.