jqplot

Primefaces charts crashing chrome when exporting as image

ⅰ亾dé卋堺 提交于 2019-12-11 19:06:54
问题 We are trying to export charts generated by primefaces(jqplot) through exportAsImage function: function exportChart() { try { imgPie = PF('graphicPie').exportAsImage(); // this is an instance of p:pieChart document.getElementById('frmReports:b64_gr0').value = imgPie.src; }catch(err){ } try { imgBar = PF('graphicBarEvent').exportAsImage(); // this is an instance of p:barChart, here is where the script crashes document.getElementById('frmReports:b64_gr1').value = imgBar.src; }catch(err){ } }

horizontalLine and verticalLine in JQPlot dynamically by canvasOverlay

别说谁变了你拦得住时间么 提交于 2019-12-11 18:13:30
问题 I am in the process of developing dynamically Slope & Flat Chart using JQplot for Bus Time Table. According to my requirement, apart from the plotted chart I want to plot some dotted lines on the graph. For this I am using horizontalLine, verticalLine and line of canvasOverlay statically. I want to draw these lines dynamically. The number of lines and all the required points will come from an xml file itself respectively. As per my understanding the canvasOverlay is taking horizontalLine,

Removing zero value point lables on a Jqplot stacked bar chart

非 Y 不嫁゛ 提交于 2019-12-11 13:35:35
问题 I am having trouble removing the zeros (point lables) in a Jqplot stacked bar chart. I tried 'hideZero', but it's not working at all. I tried different things; not sure what's wrong. I have imported the following packages: jqplot.barRenderer.min.js jqplot.canvasAxisLabelRenderer.min.js jqplot.canvasAxisTickRenderer.min.js jqplot.canvasTextRenderer.min.js jqplot.categoryAxisRenderer.min.js jqplot.pointLabels.min.js jquery-2.0.3.js jquery.jqplot.min.css jquery.jqplot.min.js Here is the

How should controls be set up for jqPlot and JSON data in MVC?

夙愿已清 提交于 2019-12-11 13:35:29
问题 I'm currently working with jqPlot for the first time and finding it difficult find any information on how to set up the control for a barchart. So far I have been able to set up the linegraph and pie chart examples but the barchart has stumped me. public ActionResult PieChart() { return View(); } public ActionResult PieChartJSON() { List<PieChartData> sampleData = new List<PieChartData>(); PieChartData test = new PieChartData(); PieChartData test2 = new PieChartData(); PieChartData test3 =

How to remove border from jqplot charts

别来无恙 提交于 2019-12-11 12:15:27
问题 It would be helpful if someone could tell me how to remove the top and right border from jqplot charts. I have tried the grid properties but it is an all or null option and individual border value cant be controlled. Is there any other property which can set the value for individual border line. 回答1: For bar charts and line charts, use the following options: grid: { drawGridlines: false, background: 'transparent', borderColor: 'transparent', shadow: false } For Donut charts, use : grid: {

jqPlot - How to change background colour when selecting range on graph

你离开我真会死。 提交于 2019-12-11 11:19:21
问题 I'm using jqPlot to render a graph with zooming enabled. For example: http://www.jqplot.com/tests/zooming.php In the example above, when you make a selection on the graph, the graph canvas is painted in grey (apart from the selection). Does anyone know how to customise this colour? I've been unable to find which jqPlot CSS option to tweak in jquery.jqplot.css. 回答1: I am afraid that no css is involved in this particular process of painting. Though there is one class which can point you in the

updating jqplot meter gauge after every 5 seconds

 ̄綄美尐妖づ 提交于 2019-12-11 10:58:33
问题 I am displaying jqplot meter gauge inside modal window and I want to update it after every 5 seconds. I wrote the following code but it is not working $(document).ready(function(){ s1 = [Math.floor(Math.random()*(401)+100)]; plot3 = $.jqplot('meter',[s1],{ seriesDefaults: { renderer: $.jqplot.MeterGaugeRenderer, rendererOptions: { min: 100, max: 500, intervals:[200, 300, 400, 500], intervalColors:['#66cc66', '#93b75f', '#E7E658', '#cc6666'], smooth: true, animation: { show: true } } } }); $(

IE 7 & 8 jqplot misalignment while printing

我怕爱的太早我们不能终老 提交于 2019-12-11 10:42:14
问题 I am having some trouble getting the graph created with jqplot to print with proper alignment in IE 7 & 8. It looks great on the screen, but once I click print preview it get's all messed up. Help me please Alignment in IE 9, Firefox and Chrome is perfect. Any help would be greatly appreciated 回答1: This worked for me. It's a javascript function that resets the absolute position of each canvas. 回答2: Added a class iterator to the canvases and then use browser hacks to perfectly alignment the

jqplot graph background seems to be black in ie8

不想你离开。 提交于 2019-12-11 09:49:16
问题 I'm using jqplot in my website using the following code $(document).ready(function(){ var xticks = [ '0', '1', '2', '3', '4','5', '6', '7', '8', '9', '10','11', '13','14','15','16','17','18','19','20','21','22','23']; var data1 = [2,4,6,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,2,6,3,1,2,2,0,0,0,0,0,0,2,5,6,6,7,6,6,6,5,7,7,6,1,0,0,0,0]; var plot2 = jQuery.jqplot ('chart1', [data1], { animate : true, // Will animate plot on calls to plot1.replot({resetAxes:true}) animateReplot : true, seriesDefaults : {

jqplot - Limiting point labels displayed to just 1 series

风流意气都作罢 提交于 2019-12-11 08:27:27
问题 using jqPlot, is it possible to limit the point labels to just one series? See screenshot below! What I would like displayed is just the values above the "Actual" bar. The "mean" and "Planned" should'nt display! Thanks! Here's my code <script type="text/javascript"> $(document).ready(function () { $.jqplot.config.enablePlugins = true; var trendline = [60000, 70000, 110000, 80000]; var planned = [70000, 90000, 120000, 100000,]; var actual = [80000, 80000, 150000, 120000]; var xAxis = ['Jan',