Rank: Member
Groups: jQueryChart, Registered Joined: 6/3/2013(UTC) Posts: 13
Thanks: 1 times Was thanked: 0 time(s) in 0 post(s)
|
When a marker was displayed on the chart(even if marker size is 0) and a mouse cursor was moved slightly, the data of the next plot was displayed on a tooltip. The problem occurs only when the interval of the plot is narrow, and if a marker is not displayed, it is not occur. Is this a bug? Is there a way for me to avoid this problem? Thanks, Code: <script lang="javascript" type="text/javascript"> var _JQCHARTDATA = null;
function generateChartData() { var firstDate = new Date(2013, 0, 1, 00, 00); firstDate.setHours(0, 0, 0, 0);
_JQCHARTDATA = new Array(2);
for (var i = 0; i < 2; i++) { _JQCHARTDATA[i] = new Array(100);
for (var j = 0; j < 100; j++) { var newDate = new Date(firstDate); newDate.setDate(newDate.getDate() + j); var value = (15 * i) + (Math.random() * 10) - 5; _JQCHARTDATA[i][j] = [newDate, value]; } } }
function createJqChart() { $('#_jqchart').jqChart({ selectionRect: { fillStyle: 'rgba(255,0,0,0.25)', strokeStyle: 'red', lineWidth: 0 }, axes: [ { location: 'bottom', type: 'dateTime', zoomEnabled: true }, { location: 'left' } ], tooltips: { type: 'shared' }, crosshairs: { enabled: true, hLine: false, vLine: { strokeStyle: '#cc0a0c' } }, legend: { location: 'bottom' }, series: [ { title: 'Value1', type: 'line', data: _JQCHARTDATA[0], lineWidth : 1, markers: { size: 0 } //markers: null }, { title: 'Value2', type: 'line', data: _JQCHARTDATA[1], lineWidth : 1, markers: { size: 0 } //markers: null } ] }); }
jQuery(function () { generateChartData(); createJqChart(); $('#_jqchart').resizable();
}); </script>
</head> <body> <div id="_jqchart" style="width:300px; height:300px; background-color:#FFFFFF"></div> </body> </html>
|