- Chart Gallery
- Range Charts
- Diverging Bar Chart
Diverging Bar Chart
{
"chart": {
"zIndex": 0,
"enabled": true,
"type": "bar",
"title": {
"zIndex": 80,
"enabled": true,
"maxLength": null,
"fontSize": 16,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#7c868e",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "center",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": true,
"width": null,
"height": null,
"align": "center",
"text": "Diverging Chart<br/><span style=\"color:#212121; font-size: 13px;\">(According to survey 1000 in ACME corp.)</span>",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 10,
"right": 0
},
"background": {
"zIndex": 0,
"enabled": false
}
},
"background": {
"zIndex": 0.5,
"enabled": true
},
"tooltip": {
"enabled": true,
"fontSize": 12,
"useHtml": true,
"title": {
"zIndex": 1,
"enabled": true,
"maxLength": null,
"fontSize": 14,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#ffffff",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "left",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "left",
"orientation": "top",
"rotation": 0,
"text": "",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"background": {
"enabled": false
}
},
"separator": {
"zIndex": 1,
"enabled": true,
"fill": {
"color": "#CECECE",
"opacity": 0.3
},
"stroke": "none",
"width": "100%",
"height": 1,
"orientation": "top",
"margin": {
"left": 0,
"top": 5,
"bottom": 5,
"right": 0
}
},
"background": {
"zIndex": 0,
"enabled": true
}
},
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 10,
"top": 10,
"bottom": 15,
"right": 20
},
"a11y": {
"enabled": true,
"mode": "chart-elements"
},
"autoRedraw": true,
"bounds": {},
"contextMenu": {
"enabled": true
},
"credits": {
"text": "AnyChart",
"url": "https://www.anychart.com/?utm_source=registered",
"alt": "AnyChart - JavaScript Charts designed to be embedded and integrated{{anychart-version}}",
"imgAlt": "AnyChart - JavaScript Charts",
"logoSrc": "https://static.anychart.com/logo.png",
"enabled": false
},
"selectRectangleMarqueeFill": {
"color": "#d3d3d3",
"opacity": 0.4
},
"selectRectangleMarqueeStroke": "#d3d3d3",
"legend": {
"zIndex": 200,
"enabled": true,
"fontSize": 12,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#7c868e",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "bottom",
"hAlign": "start",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "...",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"inverted": false,
"itemsLayout": "horizontal",
"iconSize": 15,
"width": null,
"height": null,
"maxWidth": null,
"maxHeight": null,
"position": "top",
"positionMode": "outside",
"drag": false,
"itemsFormat": null,
"titleFormat": null,
"itemsHAlign": "left",
"itemsSpacing": 15,
"itemsSourceMode": "default",
"hoverCursor": "pointer",
"iconTextSpacing": 5,
"align": "center",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 20,
"bottom": 10,
"right": 0
},
"background": {
"enabled": false
},
"title": {
"enabled": false,
"maxLength": null,
"fontSize": 15,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#7c868e",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "center",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "center",
"text": "Title text",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"background": {
"enabled": false
}
},
"titleSeparator": {
"zIndex": 1,
"enabled": false,
"fill": {
"color": "#CECECE",
"opacity": 0.3
},
"stroke": "none",
"width": "100%",
"height": 1,
"orientation": "top",
"margin": {
"left": 0,
"top": 5,
"bottom": 5,
"right": 0
}
},
"paginator": {
"zIndex": 30,
"enabled": true,
"fontSize": 12,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#545f69",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "start",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"orientation": "right",
"layout": "horizontal",
"background": {
"enabled": false
},
"padding": {
"left": 5,
"top": 0,
"bottom": 0,
"right": 0
},
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
}
},
"tooltip": {
"enabled": false,
"title": {
"zIndex": 1,
"enabled": false,
"maxLength": null,
"fontSize": 14,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#ffffff",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "left",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "left",
"orientation": "top",
"rotation": 0,
"text": "",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"background": {
"enabled": false
}
},
"separator": {
"zIndex": 1,
"enabled": false,
"fill": {
"color": "#CECECE",
"opacity": 0.3
},
"stroke": "none",
"width": "100%",
"height": 1,
"orientation": "top",
"margin": {
"left": 0,
"top": 5,
"bottom": 5,
"right": 0
}
},
"background": {
"zIndex": 0,
"enabled": true
}
}
},
"interactivity": {
"spotRadius": 2,
"multiSelectOnClick": false,
"unselectOnClickOutOfPoint": true,
"hoverMode": "single",
"selectionMode": "multi-select"
},
"defaultSeriesType": "bar",
"maxBubbleSize": "20%",
"minBubbleSize": "5%",
"maxPointWidth": "100%",
"minPointLength": 0,
"baseline": 0,
"palette": {
"type": "distinct",
"items": [
"#ef6c00",
"#ffa000",
"#96a6a6",
"#42a5f5",
"#1976d2"
]
},
"markerPalette": {
"items": [
"circle",
"diamond",
"square",
"triangle-down",
"triangle-up",
"diagonal-cross",
"pentagon",
"cross",
"v-line",
"star5",
"star4",
"trapezium",
"star7",
"star6",
"star10"
]
},
"hatchFillPalette": {
"items": [
{
"type": "backward-diagonal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "forward-diagonal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "horizontal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "vertical",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "dashed-backward-diagonal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "grid",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "dashed-forward-diagonal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "dashed-horizontal",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "dashed-vertical",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "diagonal-cross",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "diagonal-brick",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "divot",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "horizontal-brick",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "vertical-brick",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "checker-board",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "confetti",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "plaid",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "solid-diamond",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "zig-zag",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "weave",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-05",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-10",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-20",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-25",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-30",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-40",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-50",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-60",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-70",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-75",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-80",
"color": "black 0.5",
"thickness": 1,
"size": 10
},
{
"type": "percent-90",
"color": "black 0.5",
"thickness": 1,
"size": 10
}
]
},
"normal": {
"labels": {
"enabled": false
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
}
},
"hovered": {
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
}
},
"selected": {
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
}
},
"barGroupsPadding": 0.8,
"barsPadding": 0.4,
"xScale": 0,
"yScale": 1,
"series": [
{
"enabled": true,
"seriesType": "range-bar",
"clip": true,
"meta": {},
"name": "Disagree",
"tooltip": {
"title": {
"fontSize": 12,
"useHtml": true
}
},
"legendItem": {
"enabled": true,
"iconStroke": "none"
},
"color": null,
"pointWidth": null,
"isVertical": true,
"normal": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": false,
"disablePointerEvents": false,
"position": "high",
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 4
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"hovered": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"selected": {
"fill": {
"color": "#333",
"opacity": 0.85
},
"negativeFill": {
"color": "#333",
"opacity": 0.85
},
"risingFill": {
"color": "#333",
"opacity": 0.85
},
"fallingFill": {
"color": "#333",
"opacity": 0.85
},
"stroke": {
"color": "#333",
"opacity": 0.85
},
"lowStroke": {
"color": "#333",
"opacity": 0.85
},
"highStroke": {
"color": "#333",
"opacity": 0.85
},
"lowFill": {
"color": "#333",
"opacity": 0.85
},
"highFill": {
"color": "#333",
"opacity": 0.85
},
"negativeStroke": {
"color": "#333",
"opacity": 0.85
},
"risingStroke": {
"color": "#333",
"opacity": 0.85
},
"fallingStroke": {
"color": "#333",
"opacity": 0.85
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"a11y": {
"enabled": false,
"titleFormat": "Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"
},
"xMode": "ordinal",
"data": [
{
"x": "Formation and evolution<br/>of the Solar System",
"low": -18.45,
"high": -25.45,
"value": 7
},
{
"x": "Giant impact hypothesis<br/>(Earth's Moon formation)",
"low": -31.5,
"high": -54.7,
"value": 23.2
},
{
"x": "Origin of water on Earth",
"low": -58.8,
"high": -70.8,
"value": 12
},
{
"x": "Conception of Darwinism",
"low": -35,
"high": -55.3,
"value": 20.3
},
{
"x": "Linnaean classification<br/>of organisms",
"low": -17.85,
"high": -28.85,
"value": 11
},
{
"x": "Historical materialism<br/>by Karl Marx",
"low": -46.650000000000006,
"high": -56.650000000000006,
"value": 10
}
],
"selectionMode": "none",
"xScale": 0,
"yScale": 1
},
{
"enabled": true,
"seriesType": "range-bar",
"clip": true,
"meta": {},
"name": "Not completely disagree",
"tooltip": {
"title": {
"fontSize": 12,
"useHtml": true
}
},
"legendItem": {
"enabled": true,
"iconStroke": "none"
},
"color": null,
"pointWidth": null,
"isVertical": true,
"normal": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": false,
"disablePointerEvents": false,
"position": "high",
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 4
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"hovered": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"selected": {
"fill": {
"color": "#333",
"opacity": 0.85
},
"negativeFill": {
"color": "#333",
"opacity": 0.85
},
"risingFill": {
"color": "#333",
"opacity": 0.85
},
"fallingFill": {
"color": "#333",
"opacity": 0.85
},
"stroke": {
"color": "#333",
"opacity": 0.85
},
"lowStroke": {
"color": "#333",
"opacity": 0.85
},
"highStroke": {
"color": "#333",
"opacity": 0.85
},
"lowFill": {
"color": "#333",
"opacity": 0.85
},
"highFill": {
"color": "#333",
"opacity": 0.85
},
"negativeStroke": {
"color": "#333",
"opacity": 0.85
},
"risingStroke": {
"color": "#333",
"opacity": 0.85
},
"fallingStroke": {
"color": "#333",
"opacity": 0.85
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"a11y": {
"enabled": false,
"titleFormat": "Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"
},
"xMode": "ordinal",
"data": [
{
"x": "Formation and evolution<br/>of the Solar System",
"low": -3.95,
"high": -18.45,
"value": 14.5
},
{
"x": "Giant impact hypothesis<br/>(Earth's Moon formation)",
"low": -1,
"high": -31.5,
"value": 30.5
},
{
"x": "Origin of water on Earth",
"low": -4.3,
"high": -58.8,
"value": 54.5
},
{
"x": "Conception of Darwinism",
"low": -4.6,
"high": -35,
"value": 30.4
},
{
"x": "Linnaean classification<br/>of organisms",
"low": -3.45,
"high": -17.85,
"value": 14.4
},
{
"x": "Historical materialism<br/>by Karl Marx",
"low": -1.95,
"high": -46.650000000000006,
"value": 44.7
}
],
"selectionMode": "none",
"xScale": 0,
"yScale": 1
},
{
"enabled": true,
"seriesType": "range-bar",
"clip": true,
"meta": {},
"name": "Don't care",
"tooltip": {
"title": {
"fontSize": 12,
"useHtml": true
}
},
"legendItem": {
"enabled": true,
"iconStroke": "none"
},
"color": null,
"pointWidth": null,
"isVertical": true,
"normal": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": false,
"disablePointerEvents": false,
"position": "high",
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 4
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"hovered": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"selected": {
"fill": {
"color": "#333",
"opacity": 0.85
},
"negativeFill": {
"color": "#333",
"opacity": 0.85
},
"risingFill": {
"color": "#333",
"opacity": 0.85
},
"fallingFill": {
"color": "#333",
"opacity": 0.85
},
"stroke": {
"color": "#333",
"opacity": 0.85
},
"lowStroke": {
"color": "#333",
"opacity": 0.85
},
"highStroke": {
"color": "#333",
"opacity": 0.85
},
"lowFill": {
"color": "#333",
"opacity": 0.85
},
"highFill": {
"color": "#333",
"opacity": 0.85
},
"negativeStroke": {
"color": "#333",
"opacity": 0.85
},
"risingStroke": {
"color": "#333",
"opacity": 0.85
},
"fallingStroke": {
"color": "#333",
"opacity": 0.85
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"a11y": {
"enabled": false,
"titleFormat": "Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"
},
"xMode": "ordinal",
"data": [
{
"x": "Formation and evolution<br/>of the Solar System",
"low": -3.95,
"high": 3.95,
"value": 7.9
},
{
"x": "Giant impact hypothesis<br/>(Earth's Moon formation)",
"low": -1,
"high": 1,
"value": 2
},
{
"x": "Origin of water on Earth",
"low": -4.3,
"high": 4.3,
"value": 8.6
},
{
"x": "Conception of Darwinism",
"low": -4.6,
"high": 4.6,
"value": 9.2
},
{
"x": "Linnaean classification<br/>of organisms",
"low": -3.45,
"high": 3.45,
"value": 6.9
},
{
"x": "Historical materialism<br/>by Karl Marx",
"low": -1.95,
"high": 1.95,
"value": 3.9
}
],
"selectionMode": "none",
"xScale": 0,
"yScale": 1
},
{
"enabled": true,
"seriesType": "range-bar",
"clip": true,
"meta": {},
"name": "Not completely agree",
"tooltip": {
"title": {
"fontSize": 12,
"useHtml": true
}
},
"legendItem": {
"enabled": true,
"iconStroke": "none"
},
"color": null,
"pointWidth": null,
"isVertical": true,
"normal": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": false,
"disablePointerEvents": false,
"position": "high",
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 4
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"hovered": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"selected": {
"fill": {
"color": "#333",
"opacity": 0.85
},
"negativeFill": {
"color": "#333",
"opacity": 0.85
},
"risingFill": {
"color": "#333",
"opacity": 0.85
},
"fallingFill": {
"color": "#333",
"opacity": 0.85
},
"stroke": {
"color": "#333",
"opacity": 0.85
},
"lowStroke": {
"color": "#333",
"opacity": 0.85
},
"highStroke": {
"color": "#333",
"opacity": 0.85
},
"lowFill": {
"color": "#333",
"opacity": 0.85
},
"highFill": {
"color": "#333",
"opacity": 0.85
},
"negativeStroke": {
"color": "#333",
"opacity": 0.85
},
"risingStroke": {
"color": "#333",
"opacity": 0.85
},
"fallingStroke": {
"color": "#333",
"opacity": 0.85
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"a11y": {
"enabled": false,
"titleFormat": "Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"
},
"xMode": "ordinal",
"data": [
{
"x": "Formation and evolution<br/>of the Solar System",
"low": 3.95,
"high": 45.550000000000004,
"value": 41.6
},
{
"x": "Giant impact hypothesis<br/>(Earth's Moon formation)",
"low": 1,
"high": 31.6,
"value": 30.6
},
{
"x": "Origin of water on Earth",
"low": 4.3,
"high": 19.9,
"value": 15.6
},
{
"x": "Conception of Darwinism",
"low": 4.6,
"high": 35.7,
"value": 31.1
},
{
"x": "Linnaean classification<br/>of organisms",
"low": 3.45,
"high": 35.550000000000004,
"value": 32.1
},
{
"x": "Historical materialism<br/>by Karl Marx",
"low": 1.95,
"high": 13.85,
"value": 11.9
}
],
"selectionMode": "none",
"xScale": 0,
"yScale": 1
},
{
"enabled": true,
"seriesType": "range-bar",
"clip": true,
"meta": {},
"name": "Agree",
"tooltip": {
"title": {
"fontSize": 12,
"useHtml": true
}
},
"legendItem": {
"enabled": true,
"iconStroke": "none"
},
"color": null,
"pointWidth": null,
"isVertical": true,
"normal": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": false,
"disablePointerEvents": false,
"position": "high",
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 4
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"hovered": {
"stroke": {
"color": "#fff",
"thickness": 3
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"selected": {
"fill": {
"color": "#333",
"opacity": 0.85
},
"negativeFill": {
"color": "#333",
"opacity": 0.85
},
"risingFill": {
"color": "#333",
"opacity": 0.85
},
"fallingFill": {
"color": "#333",
"opacity": 0.85
},
"stroke": {
"color": "#333",
"opacity": 0.85
},
"lowStroke": {
"color": "#333",
"opacity": 0.85
},
"highStroke": {
"color": "#333",
"opacity": 0.85
},
"lowFill": {
"color": "#333",
"opacity": 0.85
},
"highFill": {
"color": "#333",
"opacity": 0.85
},
"negativeStroke": {
"color": "#333",
"opacity": 0.85
},
"risingStroke": {
"color": "#333",
"opacity": 0.85
},
"fallingStroke": {
"color": "#333",
"opacity": 0.85
},
"hatchFill": "none",
"risingHatchFill": "none",
"fallingHatchFill": "none",
"labels": {
"enabled": null
},
"minLabels": {
"enabled": null
},
"maxLabels": {
"enabled": null
},
"markers": {
"enabled": null,
"size": 6
},
"outlierMarkers": {
"enabled": null,
"anchor": "center",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"size": 6
}
},
"a11y": {
"enabled": false,
"titleFormat": "Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"
},
"xMode": "ordinal",
"data": [
{
"x": "Formation and evolution<br/>of the Solar System",
"low": 45.550000000000004,
"high": 74.55000000000001,
"value": 29
},
{
"x": "Giant impact hypothesis<br/>(Earth's Moon formation)",
"low": 31.6,
"high": 45.3,
"value": 13.7
},
{
"x": "Origin of water on Earth",
"low": 19.9,
"high": 29.2,
"value": 9.3
},
{
"x": "Conception of Darwinism",
"low": 35.7,
"high": 44.7,
"value": 9
},
{
"x": "Linnaean classification<br/>of organisms",
"low": 35.550000000000004,
"high": 71.15,
"value": 35.6
},
{
"x": "Historical materialism<br/>by Karl Marx",
"low": 13.85,
"high": 43.35,
"value": 29.5
}
],
"selectionMode": "none",
"xScale": 0,
"yScale": 1
}
],
"isVertical": true,
"xAxes": [
{
"enabled": true,
"width": null,
"drawFirstLabel": true,
"drawLastLabel": true,
"overlapMode": "no-overlap",
"stroke": "#CECECE",
"staggerMode": false,
"staggerMaxLines": 2,
"staggerLines": null,
"orientation": "left",
"value": null,
"title": {
"zIndex": 35,
"enabled": true,
"maxLength": null,
"fontSize": 13,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#545f69",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "center",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "center",
"text": "Theories",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 10,
"right": 0
},
"background": {
"enabled": false
}
},
"labels": {
"zIndex": 35,
"enabled": true,
"padding": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 10
},
"fontSize": 11,
"fontColor": "#474747",
"hAlign": "right",
"useHtml": true
},
"minorLabels": {
"zIndex": 35,
"enabled": false
},
"ticks": {
"zIndex": 35,
"enabled": false,
"stroke": "#CECECE",
"length": 6,
"position": "outside"
},
"minorTicks": {
"zIndex": 35,
"enabled": false,
"stroke": "#EAEAEA",
"length": 4,
"position": "outside"
},
"scale": 0
}
],
"yAxes": [
{
"enabled": true,
"width": null,
"drawFirstLabel": true,
"drawLastLabel": true,
"overlapMode": "no-overlap",
"stroke": "#CECECE",
"staggerMode": false,
"staggerMaxLines": 2,
"staggerLines": null,
"orientation": "bottom",
"value": null,
"title": {
"zIndex": 35,
"enabled": false,
"maxLength": null,
"fontSize": 13,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#545f69",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "center",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "center",
"text": "Y-Axis",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 5,
"right": 0
},
"background": {
"enabled": false
}
},
"labels": {
"zIndex": 35,
"enabled": true
},
"minorLabels": {
"zIndex": 35,
"enabled": false
},
"ticks": {
"zIndex": 35,
"enabled": true,
"stroke": "#CECECE",
"length": 6,
"position": "outside"
},
"minorTicks": {
"zIndex": 35,
"enabled": false,
"stroke": "#EAEAEA",
"length": 4,
"position": "outside"
},
"scale": 1
},
{
"enabled": true,
"width": null,
"drawFirstLabel": true,
"drawLastLabel": true,
"overlapMode": "no-overlap",
"stroke": "#CECECE",
"staggerMode": false,
"staggerMaxLines": 2,
"staggerLines": null,
"orientation": "top",
"value": null,
"title": {
"zIndex": 35,
"enabled": false,
"maxLength": null,
"fontSize": 13,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#545f69",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": "normal",
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "center",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": false,
"useHtml": false,
"width": null,
"height": null,
"align": "center",
"text": "Y-Axis",
"margin": {
"left": 0,
"top": 0,
"bottom": 0,
"right": 0
},
"padding": {
"left": 0,
"top": 0,
"bottom": 5,
"right": 0
},
"background": {
"enabled": false
}
},
"labels": {
"zIndex": 35,
"enabled": true
},
"minorLabels": {
"zIndex": 35,
"enabled": false
},
"ticks": {
"zIndex": 35,
"enabled": true,
"stroke": "#CECECE",
"length": 6,
"position": "outside"
},
"minorTicks": {
"zIndex": 35,
"enabled": false,
"stroke": "#EAEAEA",
"length": 4,
"position": "outside"
},
"scale": 1
}
],
"lineAxesMarkers": [
{
"zIndex": 25.2,
"enabled": true,
"scaleRangeMode": "none",
"stroke": "#CECECE",
"value": 0
}
],
"crosshair": {
"zIndex": 41,
"enabled": false,
"xStroke": "#969EA5",
"yStroke": "#969EA5",
"displayMode": "float",
"xLabels": [
{
"enabled": true,
"fontSize": 12,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#ffffff",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": 400,
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "start",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": true,
"useHtml": false,
"text": "Label text",
"width": null,
"height": null,
"anchor": null,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"adjustFontSize": {
"width": false,
"height": false
},
"minFontSize": 8,
"maxFontSize": 16,
"background": {
"zIndex": 0,
"enabled": true
},
"padding": {
"left": 10,
"top": 5,
"bottom": 5,
"right": 10
},
"axisIndex": 0
}
],
"yLabels": [
{
"enabled": true,
"fontSize": 12,
"fontFamily": "Verdana, Helvetica, Arial, sans-serif",
"fontColor": "#ffffff",
"fontOpacity": 1,
"fontDecoration": "none",
"fontStyle": "normal",
"fontVariant": "normal",
"fontWeight": 400,
"letterSpacing": "normal",
"textDirection": "ltr",
"textShadow": "none",
"lineHeight": "normal",
"textIndent": 0,
"vAlign": "top",
"hAlign": "start",
"wordWrap": "normal",
"wordBreak": "normal",
"textOverflow": "",
"selectable": false,
"disablePointerEvents": true,
"useHtml": false,
"text": "Label text",
"width": null,
"height": null,
"anchor": null,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"adjustFontSize": {
"width": false,
"height": false
},
"minFontSize": 8,
"maxFontSize": 16,
"background": {
"zIndex": 0,
"enabled": true
},
"padding": {
"left": 10,
"top": 5,
"bottom": 5,
"right": 10
},
"axisIndex": 0
}
]
},
"scales": [
{
"type": "ordinal",
"inverted": true,
"ticks": {
"maxCount": 100
},
"mode": "discrete"
},
{
"type": "linear",
"inverted": false,
"maximum": null,
"minimum": null,
"minimumGap": 0.1,
"maximumGap": 0.1,
"softMinimum": null,
"softMaximum": null,
"alignMinimum": true,
"alignMaximum": true,
"maxTicksCount": 1000,
"ticks": {
"mode": "linear",
"base": 0,
"allowFractional": true,
"minCount": 4,
"maxCount": 6
},
"minorTicks": {
"mode": "linear",
"base": 0,
"allowFractional": true,
"count": 5
},
"stackMode": "value",
"stackDirection": "reverse",
"stickToZero": true,
"comparisonMode": "none"
}
],
"crossing": {
"stroke": "none"
},
"quarters": {},
"yCrossAxes": [
0,
0
],
"xCrossAxes": [
0
],
"xScroller": {
"zIndex": 35,
"enabled": false,
"height": 16,
"minHeight": null,
"maxHeight": null,
"orientation": "left",
"inverted": true,
"autoHide": false,
"fill": "#f7f7f7",
"selectedFill": "#ddd",
"outlineStroke": "none",
"allowRangeChange": true,
"thumbs": {
"normal": {
"fill": "#E9E9E9",
"stroke": "#7c868e"
},
"hovered": {
"fill": "#ffffff",
"stroke": "#757575"
},
"enabled": true,
"autoHide": false
},
"position": "after-axes"
},
"yScroller": {
"zIndex": 35,
"enabled": false,
"height": 16,
"minHeight": null,
"maxHeight": null,
"orientation": "bottom",
"inverted": false,
"autoHide": false,
"fill": "#f7f7f7",
"selectedFill": "#ddd",
"outlineStroke": "none",
"allowRangeChange": true,
"thumbs": {
"normal": {
"fill": "#E9E9E9",
"stroke": "#7c868e"
},
"hovered": {
"fill": "#ffffff",
"stroke": "#757575"
},
"enabled": true,
"autoHide": false
},
"position": "after-axes"
},
"xZoom": {
"startRatio": 0,
"endRatio": 1,
"continuous": true
},
"yZoom": {
"startRatio": 0,
"endRatio": 1,
"continuous": true
}
}
}
<html>
<head>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-base.min.js"></script>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-ui.min.js"></script>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-exports.min.js"></script>
<link href="https://cdn.anychart.com/releases/v8/css/anychart-ui.min.css" type="text/css" rel="stylesheet">
<link href="https://cdn.anychart.com/releases/v8/fonts/css/anychart-font.min.css" type="text/css" rel="stylesheet">
<style type="text/css">
html,
body,
#container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="container"></div>
<script>
anychart.onDocumentReady(function () {
// create column chart
var chart = anychart.bar();
// data for the sample (completely fiction)
var surveyData = [
[
'Formation and evolution<br/>of the Solar System',
70,
145,
79,
416,
290
],
[
'Giant impact hypothesis<br/>(Earth\'s Moon formation)',
232,
305,
20,
306,
137
],
['Origin of water on Earth', 120, 545, 86, 156, 93],
['Conception of Darwinism', 203, 304, 92, 311, 90],
['Linnaean classification<br/>of organisms', 110, 144, 69, 321, 356],
['Historical materialism<br/>by Karl Marx', 100, 447, 39, 119, 295]
];
// helper function to create series and customize them
var createSeries = function (columnNumber, name) {
var data = [];
for (var i = 0; i < surveyData.length; i++) {
var value = surveyData[i][columnNumber] / 10;
var center = surveyData[i][3] / 10 / 2;
if (name === 'Don\'t care') {
data.push({
x: surveyData[i][0],
low: -value / 2,
high: value / 2,
value: value
});
} else if (name === 'Not completely agree') {
data.push({
x: surveyData[i][0],
low: center,
high: center + value,
value: value
});
} else if (name === 'Agree') {
data.push({
x: surveyData[i][0],
low: center + surveyData[i][4] / 10,
high: center + surveyData[i][4] / 10 + value,
value: value
});
} else if (name === 'Not completely disagree') {
data.push({
x: surveyData[i][0],
low: -center,
high: -center - value,
value: value
});
} else if (name === 'Disagree') {
data.push({
x: surveyData[i][0],
low: -center - surveyData[i][2] / 10,
high: -center - surveyData[i][2] / 10 - value,
value: value
});
}
}
var series = chart.rangeBar(data);
series.name(name).stroke('3 #fff 1').selectionMode('none');
series.hovered().stroke('3 #fff 1');
series.tooltip().title().useHtml(true).fontSize(12);
};
// creates series
createSeries(1, 'Disagree');
createSeries(2, 'Not completely disagree');
createSeries(3, 'Don\'t care');
createSeries(4, 'Not completely agree');
createSeries(5, 'Agree');
// sets title for map chart and customizes it
chart
.title()
.enabled(true)
.useHtml(true)
.padding([0, 0, 10, 0])
.text(
'Diverging Chart<br/>' +
'<span style="color:#212121; font-size: 13px;">(According to survey 1000 in ACME corp.)</span>'
);
// changes palette for this sample
chart.palette(
anychart.palettes
.distinctColors()
.items(['#ef6c00', '#ffa000', '#96a6a6', '#42a5f5', '#1976d2'])
);
chart
.legend()
.enabled(true)
.padding([20, 0, 10, 0])
.position('center-bottom');
// creates stack bar chart from multi series chart
chart.yScale().stackMode('value');
// changes settings for axis
chart.xAxis().ticks(false);
chart
.xAxis()
.title()
.enabled(true)
.text('Theories')
.padding([0, 0, 10, 0]);
chart
.xAxis()
.labels()
.useHtml(true)
.hAlign('right')
.fontSize(11)
.fontColor('#474747')
.padding([0, 10, 0, 0]);
chart.yAxis(1).orientation('top');
chart
.yAxis(0)
.labels()
.format(function () {
return Math.abs(this.value) + '%';
});
chart
.tooltip()
.useHtml(true)
.fontSize(12)
.titleFormat(function () {
return (
this.getData('value') * 10 +
' people ' +
'<span style="font-size: 13px; color: #cbcbcb">(' +
this.getData('value') +
'%)</span>'
);
})
.format(function () {
if (this.seriesName === 'Don\'t care') {
return (
this.seriesName +
' about <br/><span style="color: #cbcbcb">' +
this.getData('x') +
'</span>'
);
}
return (
this.seriesName +
' with <br/><span style="color: #cbcbcb">' +
this.getData('x') +
'</span>'
);
});
// creates line marker at 0
chart.lineMarker().value(0).stroke('#CECECE');
// set container id for the chart
chart.container('container');
// initiate chart drawing
chart.draw();
});
</script>
</body>
</html>
Range charts are usually used when it is necessary to show how a range of some value changes in time or due to another variable. Bar charts are alike Column charts, but their axes are inverted so the X-Axis is vertical and the Y-Axis holding the categories is horizontal.
This chart is a demonstration of the results of a questionnaire about six world theories held by the ACME Corp. A thousand people were asked of opinion about six most popular theories in the world: a theory of the Solar System formation, Giant impact hypothesis (Earth's Moon formation), a theory about origin of water on Earth, Darwin's Conception, linnaean classification of organisms and the Historical materialism theory created by Karl Marx. There are 5 series representing the options of answers: "disagree", "not completely disagree", "don't care", "not completely agree", "agree"; six categories along the vertical X-Axis match the theories. Two Y-Axes stands for the percentage of people who chose each option and the value of answers: this chart has the 0% point as a center point of range bars, and while the percentage grows both sides, the negative values are shown to the left and the positive ("agree") ones are settled to the right from the zero point. Grid is disabled, but the legend is on so it is possible to switch on and off those series you need.