1.8.1 • Published 2 years ago
@msrvida/sanddance-specs v1.8.1
@msrvida/sanddance-specs
Vega specifications for unit visualizations.
Usage
You will need an array of data objects, so that columns types can be inferred.
import { inferTypes } from 'vega';
const data = [
//your data objects
];
const insight = {
"colorBin": "quantize",
"columns": {
"x": "Gender",
"color": "Survived",
"sort": "Survived",
"facet": "Age"
},
"scheme": "set1", //see https://vega.github.io/vega/docs/schemes/#reference
"facetStyle": "wrap",
"size": {
"height": 600,
"width": 800
},
"chart": "barchartV"
};
const columns = getColumnsFromData(inferTypes, data);
const specColumns = getSpecColumns(insight, columns);
const specViewOptions = {
colors: {
defaultCube: "steelblue",
axisLine: "#000",
axisText: "#000"
},
language: {
count: "Count"
},
maxLegends: 20,
tickSize: 10
};
const context = { specColumns, insight, specViewOptions };
const specResult = build(context, data);
if (specResult.errors) {
console.log(specResult.errors);
} else {
console.log(specResult.vegaSpec);
}
Versions
1.5.0 Changes
- Added background image
1.4.0 Changes
- Show z-axis scale
1.3.0 Changes
- Fix for last bin of quantitative band scale
For more information
Please visit the SandDance website.
1.8.1
2 years ago
1.7.1
2 years ago
1.7.0
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.0
3 years ago
1.4.4
3 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago