-
Notifications
You must be signed in to change notification settings - Fork 0
row
import { Row } from 'vizart-basic';
import 'vizart-basic/dist/vizart-basic.css';
const options = {
chart: {
height: 420,
margin: { left: 30, right: 30, top: 10, bottom: 30 }
},
data: {
x: { accessor: 'age', type: 'number', name: 'Age' },
y: [ { accessor: 'income', type: 'number', name: 'Monthly Income' } ]
},
};
const fakeData = [
{ age: 19, income: 9 }
]
const _chart = new Row('#chart', options);
_chart.render(fakeData);
Default options:
const CoronaOptions = {
chart: {
type: 'corona',
margin: {
top: 10,
bottom: 10,
left: 10,
right: 10,
},
},
plots: {
levels: 0, //How many levels or inner circles should there be drawn
levelColor: '#CDCDCD',
levelLabelColor: '#737373',
levelLabelPosition: 'top', //'top', 'bottom', 'right'
levelLabel: null,
axisLabel: null,
axisLabelColor: '#737373',
axisLabelOffset: 15, //How much farther than the radius of the outer circle should the labels be placed
highlightStrokeColor: '#000000',
highlightNodeColor: '#F03E1E',
highlightLabelColor: '#000000',
strokeOpacity: 0,
strokeWidth: 4, //The width of the stroke around each blob
areaOpacity: 0.35, //The opacity of the area of the blob,
gradientArea: true,
drawBoundary: true,
boundaryOffset: 10,
boundaryOpacity: 0.5,
boundaryGradient: ['white', '#eb3ba6'],
innerRadiusRatio: 0.4,
outerRadiusMargin: 10,
stackLayout: false, // stack areas
stackMethod: Stacks.Zero,
isArea: true, //If true the area and stroke will follow a round path (cardinal-closed),
},
};
How many levels or inner circles should there be drawn
Level color
Colors of level labels
Position of level labels, could be: 'top', 'bottom', 'right'
Display level label?
display axis label?
axis label color
How much farther than the radius of the outer circle should the labels be placed
When user hovers a layer, layer's outer line gets highlighted
When user hovers a layer, layer's control nodes get highlighted
When user hovers a layer, layer's label nodes get highlighted
Stroke opacity
The width of the stroke around each blob
The opacity of the area of the blob,
Fill area with gradient colors
Draw boundary
boundary offset
boundary offset
Fill boundary with gradient colors ['white', '#eb3ba6']
inner radius ratio
outer radius margin
stack areas?
'zero' by default
If true the area and stroke will follow a round path (cardinal-closed),