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
//Open Console Please
2
anychart.onDocumentReady(function () {
3
4
const bullet = anychart.bullet(
5
[
6
{
7
x: "Forecasted",
8
value: 50,
9
type: "column",
10
gap: 0.3,
11
fill: { color: "#347911" },
12
stroke: "2 #E47911 0.9",
13
},
14
{
15
x: "Actual",
16
value: 40,
17
type: "column",
18
gap: 0.3,
19
fill: { color: "#E47911" },
20
stroke: null,
21
},
22
{
23
x: "Budgeted",
24
value: 60,
25
type: "line",
26
gap: 0.2,
27
stroke: { thickness: 2, color: "black" },
28
},
29
]);
30
31
//Point Mouse Move do not registering
32
33
bullet.listen("pointMouseMove", function(e) {
34
console.log("Point Mosuse Move")
35
})
36
37
bullet.listenOnce("pointMouseMove", function(e) {
38
console.log("Point Mouse Move")
39
})
40
41
bullet.listenOnce("mouseMove", function(e) {
42
console.log("Mouse Move Once")
43
})
44
bullet.listen("mouseOut", function(e){
45
console.log("Mouse Out")
46
})
47
48
// Set chart container
49
bullet.container("container");
50
51
// Initiate chart drawing
52
bullet.draw();
53
54
});