anychart.onDocumentReady(function () {
var stage = anychart.graphics.create("container");
var chart = anychart.bullet([{value: current_value}, {value:target, stroke:'black', fill:'black'}]);
chart.range().from(0).to(100);
chart.range(1).from(100).to(150);
chart.range(2).from(150).to(200);
chart.range(3).from(200).to(250);
chart.range(4).from(250).to(300);
var tooltip = document.getElementById('custom-tooltip');
chart.listen("mouseMove", function(e) {
var clientX = e['offsetX'];
var clientY = e['offsetY'];
tooltip.style.left = clientX + 20+"px";
tooltip.style.top = clientY + 10+"px";
tooltip.innerHTML = name;
tooltip.insertAdjacentHTML( 'beforeend', '<br />target: '+target);
tooltip.insertAdjacentHTML( 'beforeend', '<br />actual: '+current_value );
chart.listen("mouseOver", function() {
tooltip.style.display = "block";
chart.bounds(0, 0, "100%", 125);
var legend = anychart.standalones.legend();
{index: 0, text: 'Current value', iconFill: '#4db4f9'},
{index: 1, text: 'Very bad', iconFill: '#828282'},
{index: 2, text: 'Bad', iconFill: '#a9a9a9'},
{index: 3, text: 'Normal', iconFill: '#c3c4c4'},
{index: 4, text: 'Good', iconFill: '#d5d5d5'},
{index: 5, text: 'Great', iconFill: '#e2e2e2'}
legend.parentBounds(anychart.math.rect(50, 150, 500, 60));