jqplot

Draggind data points and submitting values

纵然是瞬间 提交于 2020-01-02 08:35:25
问题 On page jqPlot there is an example of dragging data point on jqPlot chart. How can I submit (e.g. with jQuery ajax) to server changed values? Are changed (current) values stored somewhere in jqplot object? 回答1: The hardest thing here is knowing when the user drags a point, not getting the data afterward. I recommend you use a postDrawSeries hook like so: $(document).ready(function () { // set up plot $.jqplot.config.enablePlugins = true; s1 = [['23-May-08',1],['24-May-08',4],['25-May-08',2],[

Charting library that does not cause memory leak when updating chart

爷,独闯天下 提交于 2020-01-01 10:16:50
问题 I want to build a page with interactively refreshing charts based on the data that is being fetched from the server asynchronously using AJAX. I really like jqPlot, but when trying to update the graph periodically (by calling replot() , without page refresh), it causes a huge browser memory leak. It seems to be a well known issue occurring on all major browsers. I haven't tried Flot and protovis, but quick googling reveals that they seem to have the same problems. Are you aware of any

JQuery-mobile : Load JQPlot graph through AJAX request

拟墨画扇 提交于 2019-12-31 07:10:14
问题 I am new on JQuery Mobile and I am trying to display a page with a JqPlot graphic depending on the user choice. I read and experimented this morning that by design the javascript code of a page displayed/loaded by clicking on a link is not executed. To taking into account JS script of a page to load, the data attribute data-ajax of the link must be set to false. But in this case, the browser reload all the page and the is no smooth transition for the user. <p><a href="myUrl.php" data-ajax=

How can I hide the points that are displayed on the plot chart?

北战南征 提交于 2019-12-30 20:53:05
问题 I have the following jqPlot chart: $(document).ready(function () { var line1 = new Array(); @foreach (var item in Model) { <text>line1.push(["@item.VisitDate.Value.ToString("dd-MMM-yyyy")", @item.count]);</text> } var plot1 = $.jqplot('chart1', [line1], { title: '<span style="Color: Green " >Number Of Visits</span>', axesDefaults: { pad: 1.2 }, axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer, tickOptions: { formatString: '%d/%b/%Y' } }, yaxis: { tickOptions: { formatString: '%.2f'} } },

jqPlot - How to programmatically find under which jQuery UI tab plot exists

孤街浪徒 提交于 2019-12-30 12:34:13
问题 Please take a look at the following example: http://www.jqplot.com/deploy/dist/examples/hiddenPlotsInTabs.html In the first example, the hidden graphs are plotted by catching the "tabshow" event and finding which tab was selected: $('#tabs').bind('tabsshow', function (event, ui) { if (ui.index === 1 && plot1._drawCount === 0) { plot1.replot(); } else if (ui.index === 2 && plot2._drawCount === 0) { plot2.replot(); } }); This works fine but if you added more tabs and moved your plots to other

Loading Json data into jqPlot [closed]

时间秒杀一切 提交于 2019-12-30 09:55:11
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I've problem with JSON and jqPlot. jQuery script: var line = [ ]; $(function(){ $.getJSON('bin/gielda.php', function(data) { $.each(data, function (index

Padding values on inverted axis in jqplot

久未见 提交于 2019-12-29 09:04:49
问题 i would like to know how to set the correct padding values to a jqplot axis so that points aren't rendered on the borders. this is the code i have yaxis:{ max: 1, min: 200, numberTicks: 5, tickOptions:{ formatString:'%i' } } this displays an inverted axis going from 200 on the bottom to 1 on the top. values vary also from 1 to 200. i have tried with maxPad, minPad and even setting the ticks manually with ( ticks: ['200','150','100','50','1'] ) but no luck so far. thanks in advance :) 回答1:

combined line and bar w/ jqplot

时光总嘲笑我的痴心妄想 提交于 2019-12-29 07:39:30
问题 Is it possible w/ jqplot to display a line chart that 'overlays' a bar chart? I have added a series to a stacked barchart and changed the renderer to $.jqplot.LineRender. This displays as a line but it is getting added to the stacked amounts. 回答1: Yes it can be done with jqPlot . A sample showing how a bar chart can be presented on a single plot together with a line chart is presented here, see the 3rd plot from the top. Here I made a sample to show line and stacked bar charts on a single

Programmatically set the marker on a plot

懵懂的女人 提交于 2019-12-29 01:23:50
问题 I would like to know if it is possible to programmatically highlight the marker on a plot. I have a line graph and a separate data grid. Clicking a marker within the line chart will highlight the relevant row in the data grid, and clicking a row in the data grid will highlight the relevant marker in the line chart. In the example below I can do the first requirement. $('#chartdiv').bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) returns the data point which I can use to

How to display tooltips on jqplot pie chart

半腔热情 提交于 2019-12-28 06:45:12
问题 I have a jqplot pie chart with a legend and I would like to get the legend text to appear as a tooltip when the mouse hovers on the pies. I'm not sure how to do that. Does anyone have any experience doing similar? example code: $(document).ready(function(){ var data = [['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14],['Out of home', 16],['Commuting', 7], ['Orientation', 9]]; var plot1 = jQuery.jqplot ('chart1', [data], { seriesDefaults: { renderer: jQuery.jqplot.PieRenderer,