HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function() {
2
3
// chart type
4
var chart = anychart.bar();
5
6
// set title
7
chart.title().text("Bar Chart With A Point View Defined From Data Set");
8
9
// set axes titles
10
chart.xAxis().title().text("Retail Channel");
11
chart.yAxis().title().text("Sales");
12
13
// set data
14
chart.bar([
15
["Discount Stores", 721630],
16
{x: "Department Stores", value: 737166, fill:{color: "red", opacity: ".7"}, hatchFill:{hatchType:"diagonalbrick",color: "gray"}, marker:{type:"star5", fill:"gold", size: 12, enabled: true}, hoverMarker: {size: 22}},
17
["Juvenile Specialty Stores", 78662],
18
["All other outlets", 90000]
19
]);
20
21
// draw
22
chart.container("container").draw();
23
});