jqplot

Jqplot DateAxis rendering is not proper

我与影子孤独终老i 提交于 2019-12-12 08:16:20
问题 I tried to plot data useage per day using jqPlot along with its DateAxisRenderer , the data was static to test the graph, but I found that the points on graph are not corresponding to the exact date on the grid. Is there a better tool out there to do this more accurately? I need to render light and interactive graphs on browser using JavaScript . 回答1: I can fix this problem. You can use tickInterval:'1 day' after you set min:'yyyy-mm-dd' and max:'yyyy-mm-dd' of xais. This is my example (use

How to catch the click event from the axis ticks jqplot, highcharts,flot

雨燕双飞 提交于 2019-12-12 07:38:47
问题 I want to be able to catch the clicked event that is hooked to all the axis ticks. here is what i have done so far. http://jsfiddle.net/grVFk/5074/ If anyone knows how to do that with any of the charting plugins can kindly share. thanks 回答1: the plot isn't plain HTML. So there is no a tag. And the plot itself do not provide you with an api to catch the click event on an axis tick. What you can do is to select the axis tick manually with jQuery and add a click event: $('.highcharts-axis tspan'

jq plot - getting linear x axis ticks

人盡茶涼 提交于 2019-12-12 04:57:52
问题 I have a jqPlot chart which is rendered as in the image below. Iam using LinearAxisRenderer for the x-axis. But the x-axis values are coming as 0 ,1,1,2,2, etc.. Is there a way to get the values as 0, 1,2,3 etc.. Thanks in advance. Code : $.jqplot(ctrlId, [graphPt], { title: chartTitle, seriesDefaults: { renderer: $.jqplot.BarRenderer, pointLabels: { show: true, location: 'e', edgeTolerance: -15, formatString: '%s' }, shadow: false, rendererOptions: { barDirection: 'horizontal', barMargin: 2

jqplot - Want to restrict y axis ticks

孤街浪徒 提交于 2019-12-12 04:32:24
问题 In below code y axis values are not readable, I guess its overlapping. How to set suitable y axis tick range: $(document).ready(function(){ var line1 = [82,82]; var line2 = [22,22]; var line3 = [0,0]; var ticks = [1,2];$.jqplot('line', [line1, line2, line3], { animate: true, axesDefaults:{min:0,tickInterval: 1}, seriesDefaults: { rendererOptions: { smooth: true } }, series: [{lineWidth: 1.5, label: 'Passed'}, {lineWidth: 1.5, label: 'Failed'}, {lineWidth: 1.5, label: 'Skipped'}], axes: {

jqPlot animate data change without reloading graph

只谈情不闲聊 提交于 2019-12-12 03:13:58
问题 I want to have a button that users can press so that the data on the graph changes in an animation without the bars starting from the bottom of the graph again. Here's an example of how I would like my jqPlot to behave: http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_eff_animate. I'm not married to using jqPlot if there's another plugin that will let me do this. Thanks! My current code is as follows: function myReplot() { var newdata = [[1,3],[2,6],[3,8],[4,11]]; plot1.series[0]

jqplot conflict with jquerymobile

天大地大妈咪最大 提交于 2019-12-12 03:06:01
问题 in a same html page i need to use jquerymobile (www.jquerymobile.com) and plot a simple chart with the jqplot js library (www.jqplot.com). I think i have a conflict issue between jqplot and jquerymobile, because the chart isn't displayed. But if i comment the jquerymobile script the chart became visible. This is the part of my html code: [...head...] <link rel="stylesheet" type="text/css" href="jquery.jqplot.1.0.0b2_r792/dist/jquery.jqplot.css" /> <script type="text/javascript" src="jquery-1

Convert a jqplot figure into data url and send as part of html form

可紊 提交于 2019-12-12 00:01:35
问题 I have a dynamic figure which is generated by jqplot. Now I need to pass this plot to another webpage in the PNG format. My solution is Convert this jqplot as data url in a variable var imgData = $('#chart1').jqplotToImageStr({}); Send this variable as part of html form to the next page $('<tr style="display:none"><td><input type="hidden" name="extract1"></td></tr>') .appendTo('.getpdf') .find('input') .data(imgData); I also tried to use .val(imgData) , which also failed Print it and check.

Label and legend issue in jqplotToImageStr

主宰稳场 提交于 2019-12-11 23:25:12
问题 I am trying to pass a few jqplots to a server and generate pdf. The plots looks good when they are first generated. But when I used jqplotToImageStr to digitize them, they were not properly scaled, and so did the generated pdf. So my question is how to set the plot size/dimension when I digitize these plots. Commend I used to digitize var imgData = []; imgData.push($('#chart1').jqplotToImageStr({})); Before digitize After After adding options 回答1: You can adjust your margins for your axis

Is there a way I can color my ticks in my jqplot graph

扶醉桌前 提交于 2019-12-11 21:24:46
问题 I have a stacked bar graph and I want to color my ticks on my graph. In the graph below I'd like to color the customers in red or green based on their status: So I would want to color Aava green maybe and Acer red. Is there a way to color each label? I know I'm able to color all of them a color but can I select a specific one? My first attempts have been to select the label using jquery and apply my own css like this: $("div:contains('Aava')" ).css( "color", "red" ); However, this doesn't

jqPlot - time values on Y axis

[亡魂溺海] 提交于 2019-12-11 19:29:09
问题 I need to create graph with dates on X axis and times on Y axis. My JS code is: jQuery(document).ready(function ($) { var data = [["2013-04-25","00:11.557"],["2013-04-25","00:15.569"],["2013-04-25","00:11.733"],["2013-04-25","00:13.023"],["2014-04-26","00:22.333"]]; var plot1 = $.jqplot('chartdiv', [data], { title:'Default Date Axis', axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer}}, series:[{lineWidth:4, markerOptions:{style:'square'}}] }); }); The dates are showing correctly on the X axis,