javascript - highcharts tooltip not moving next point -
i tried code tool-tip showing starting , end value. want showing tool-tip values.
how can show tool-tip values of high-chart? -"from first next other points when hovering"
this full code:
$(function() { $('#container').highcharts({ chart: { zoomtype: 'y' }, title: { text: 'fleximc' }, xaxis: { type: 'datetime', }, yaxis: { min: 0, //max: 90000, title: { text: 'exchange rate' } }, legend: { enabled: true }, tooltip: { valuedecimals: 2, valuesuffix: '', }, series: [{ type: 'line', name: 'current out', data: [ [date.utc(2014, 10, 12, 18, 33), 0], [date.utc(2014, 10, 12, 17, 42), 0], [date.utc(2014, 10, 12, 16, 40), 10.83], [date.utc(2014, 10, 12, 16, 21), 14.83], [date.utc(2014, 10, 12, 14, 43), 86.34], [date.utc(2014, 10, 12, 13, 46), 72.35], [date.utc(2014, 10, 12, 12, 40), 31.69], [date.utc(2014, 10, 12, 11, 42), 133.37] ], marker: { enabled: true, radius: 3 }, shadow: true, tooltip: { valuedecimals: 2, shared: true } }, { type: 'line', name: 'voltage', data: [ [date.utc(2014, 10, 12, 18, 33), 5.13], [date.utc(2014, 10, 12, 17, 42), 219], [date.utc(2014, 10, 12, 16, 40), 644], [date.utc(2014, 10, 12, 16, 21), 652], [date.utc(2014, 10, 12, 14, 43), 664], [date.utc(2014, 10, 12, 13, 46), 628], [date.utc(2014, 10, 12, 12, 40), 668], [date.utc(2014, 10, 12, 11, 42), 652], [date.utc(2014, 10, 12, 10, 46), 648] ], marker: { enabled: true, radius: 3 }, shadow: true, tooltip: { valuedecimals: 2, shared: true } }] }); });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
so, appears might getting hung in json formatting. that'd first guess, in fact. so, see you've started 1 of demo charts -- 1 weather , whatnot. example, in particular, close you're going for? if not, best start ~~here~~, lists of options, , set-up copied , pasted (at least roughly) after you've expanded of options you're interested in.
just keep json formatted well. quick way fix spacing issues assign object literal you're passing in variable , console.log(json.stringify(chartvar, null, 4))
should print out nicely. copy , paste there.
tl;dr start 1 of more basic examples have of want, put own data in, , working in simplest possible form... go crazy custom labels, colors, , such.
hope eyes tired. :p
Comments
Post a Comment