jQuery UI Widgets › Forums › Chart › Tracking dot in chart
Tagged: chart, charting, jqxChart, line chart, line graph
This topic contains 2 replies, has 2 voices, and was last updated by sushanth009 12 years, 7 months ago.
-
AuthorTracking dot in chart Posts
-
Hello Peter,
I am using jQwidgets to populate the graph and for some reason I am not able to see the tracking dot in the chart. Can you help me out if I am missing something in the chart settings.. Here is the code that i have used to populate the graph..
The json object used for this method is var result = [ { "Cos":"5163.81", "Mon":"9/2011" }, { "Cos":"3854.58", "Mon":"10/2011" }, { "Cos":"3794.45", "Mon":"11/2011" }, { "Cos":"3892.87", "Mon":"12/2011" }, { "Cos":"3759.38", "Mon":"1/2012" }, { "Cos":"3842.94", "Mon":"2/2012" }, { "Cos":"3462.44", "Mon":"3/2012" }, { "Cos":"3564.41", "Mon":"4/2012" }, { "Cos":"3593.97", "Mon":"5/2012" }, { "Cos":"4752.73", "Mon":"6/2012" }, { "Cos":"4484.10", "Mon":"7/2012" }, { "Cos":"4984.44", "Mon":"8/2012" }]And the Code that is used to populate the Graph is..drawCharts = function(result) { try { var source = { datafields: [{ name: 'Mon' }, { name: 'Cos' }, { name: 'Usg'}], localdata: result, datatype: 'array' }; var cMaxValue = 0; var cMinValue = 0; var uMinValue = 0 for (var i = 0; i < result.length; i++) { if (parseFloat(result[i].Cos) > cMaxValue) { cMaxValue = parseFloat(result[i].Cos); } if (parseFloat(result[i].Cos) < cMinValue) { cMinValue = parseFloat(result[i].Cos); } } if (cMaxValue != 0) { cGraphInterval = Math.round((cMaxValue + 1) / 10); } else { cGraphInterval = 1000; } $('#cost').jqxChart(chartSettings(source, 'Cost', 'Cos', cGraphInterval, cMinValue, cMaxValue)); } catch (e) { alert('drawCharts !! ' + e); }};chartSettings = function(source, txt, dtField, graphInterval, minValue, maxValue) { var dataAdapter = new $.jqx.dataAdapter(source); var settings = {}; settings = { title: txt + " - Last 12 months", showLegend: true, source: dataAdapter, enableAnimations: true, padding: { left: 30, top: 20, right: 15, bottom: 30 }, titlePadding: { left: 30, top: 0, right: 0, bottom: 10 }, categoryAxis: { text: 'Category Axis', dataField: 'Mon', showGridLines: true, textRotationAngle: -87, axisSize: 'auto', textInsideIntervals: true }, colorScheme: 'scheme01', seriesGroups: [ { type: 'line', valueAxis: { unitInterval: graphInterval, minValue: minValue, maxValue: maxValue + 1, displayValueAxis: true, description: txt }, series: [ { dataField: dtField, displayText: txt } ] } ] }; return settings;}
Hi sushanth009,
We can’t reproduce the reported behavior with the latest version. Here’s an online demo: http://jsfiddle.net/jqwidgets/Qd4X6/1/. When the mouse cursor is moved over the Line, I am able to see the dot on the line.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHey Peter,
I have downloaded the latest version and the tracking is working as expected. thanks for your feedback.
Thanks
Sushanth -
AuthorPosts
You must be logged in to reply to this topic.