jqplot

What is the alternative for the chart extender attribute in PrimeFaces 5.2 and newer

二次信任 提交于 2019-11-27 09:35:20
I'm using primefaces 5.2 latest version and tried for line chart, it's working fine. Am trying to change the line chart axes color,background,border, etc. but extender attribute is not working in latest primefaces version. My XHTML: <p:chart type="line" model="#{chartViewLine.lineModel1}" styleClass="legendpos" extender="chartExtender" style="height:300px; width:570px;"/> JAVASCRIPT: function chartExtender() { this.cfg.grid = { background: 'transparent', gridLineColor: '#303030', drawBorder: false, }; Is any alternative for 'extender' attribute OR my code have any wrong syntax? You should now

Customize primefaces chart

自古美人都是妖i 提交于 2019-11-27 09:21:14
I using of primefaces's chart on my project. I know be primefaces's chart use of jqplot . on jqplot's site exist example of customizing jqplot chart. how to use of example codes for customizing primefaces chart ? sample code for customizing jqplot chart is following : $(document).ready(function () { $.jqplot._noToImageButton = true; var plot1 = $.jqplot("chart1", [prevYear, currYear], { seriesColors: ["rgba(78, 135, 194, 0.7)", "rgb(211, 235, 59)"], title: 'Monthly TurnKey Revenue', highlighter: { show: true, sizeAdjust: 1, tooltipOffset: 9 }, grid: { background: 'rgba(57,57,57,0.0)',

jqPlot DateAxis tickInterval not working

[亡魂溺海] 提交于 2019-11-27 09:05:38
I'm trying to draw a chart with a single datapoint each month. I'm sending this through to jqPlot as a single point on the first of each month: $.jqplot('actualChart', [[['2011-10-01',0.296],['2011-11-01',0.682]]], { title: programSelection.options[programSelection.selectedIndex].text, axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer, rendererOptions: { tickRenderer: $.jqplot.CanvasAxisTickRenderer }, tickOptions: { formatString: '%b' } } } } I'm loading the chart data using Ajax. Some datasets have more points of data than others - in the example above with only 2 points, the x-axis ticks

jqPlot : how to color parts of background / grid with several different colors

◇◆丶佛笑我妖孽 提交于 2019-11-27 07:53:16
问题 I am using the excellent jqPlot plug-in, and the only feature that I didn't find in the documentation is "how to color parts of background / grid with several different colors" The x-axis units of my graphs are dates. I would like to highlight the weekend part (only) of the grid by changing the background grid color if it is possible. Or anyone would have another idea? Thanks EDIT WITH FINAL ANSWER Based on the Boro's suggestion, I developed a better way to highlight a part of the background

Custom highlight to jqPlot stacked bar chart

谁都会走 提交于 2019-11-27 03:41:00
问题 When adding a custom highlight to the jqPlot chart, I simply use $('#chart').bind('jqplotDataHighlight', function (ev, sIndex, pIndex, data) { var chart_top = $('#chart').offset().top, y = plot1.axes.yaxis.u2p(data[1]); // convert y axis units to pixels $('#tooltip').css({ top: chart_top + y }); } as seen in the last example here. This works great on my simple bar chart. I then try the same on a stacked bar chart, and the x-values are off. Does anyone know how I can get these values or what I

JSON for jqPlot

我只是一个虾纸丫 提交于 2019-11-27 03:40:57
问题 I would like to use jqPlot usinge data from server side coming in JSON, like described in this example: http://www.jqplot.com/tests/data-renderers.php My code is nearly the same like the example: function myGraph(jsonurl) { var ajaxDataRenderer = function(url, plot, options) { var ret = null; $.ajax({ // have to use synchronous here, else the function // will return before the data is fetched async: false, url: url, dataType:"json", success: function(data) { ret=data; console.warn(data); } })

jqPlot - How to change opacity or z-index of canvasOverlay?

南笙酒味 提交于 2019-11-26 23:23:44
问题 I would like to show 3 color zones on my graph on the background according to y axis value, as I understand, I cannot control the background color by different colors. My idea is to draw 3 horizontal lines with canvasOverlay - that is working. The problem is I want to place this lines behind my graph curve, now it seen on the front and it overlays my points line. Can I change the property of z-index or the opacity? Maybe some other ideas? $.jqplot( 'ChartDIV', [data], { series: [{ showMarker:

JQPlot auto refresh chart with dynamic ajax data

ぐ巨炮叔叔 提交于 2019-11-26 23:11:58
问题 I want to update the chart drawn by jqPlot sequentially in time intervals. My use case is such that the AJAX call returns only a single value. For e.g.: 1st AJAX call: 20 2nd AJAX call: 30 3rd AJAX call: 40 4th AJAX call: 32 So i want to make plot the graph like: First: only 20 Second: 20,30 Third: 20,30,40 Fourth: 20,30,40,32 Can we extract already plotted data in JQPlot and then append this new data set and redraw the graph?? Can any one help please?? 回答1: You will need to store the data in

jqPlot resizing

那年仲夏 提交于 2019-11-26 17:21:53
问题 Tell me if anyone encountered this problem: I show on my page plot using jqPlot <script language="javascript" type="text/javascript"> $(document).ready(function () { $.jqplot.config.enablePlugins = true; var chLines = [[['09/30/2010 00:00:00',24.13],['12/31/2010 00:00:00',28.26],['03/31/2011 00:00:00',24.00],['06/30/2011 00:00:00',25.35],['09/30/2011 00:00:00',26.26],['12/31/2011 00:00:00',29.71]]]; var chSeries = [{ color: '#436277', label: 'label' }]; var mnth; var quarter; $.jqplot

What is the alternative for the chart extender attribute in PrimeFaces 5.2 and newer

时光怂恿深爱的人放手 提交于 2019-11-26 14:49:06
问题 I'm using primefaces 5.2 latest version and tried for line chart, it's working fine. Am trying to change the line chart axes color,background,border, etc. but extender attribute is not working in latest primefaces version. My XHTML: <p:chart type="line" model="#{chartViewLine.lineModel1}" styleClass="legendpos" extender="chartExtender" style="height:300px; width:570px;"/> JAVASCRIPT: function chartExtender() { this.cfg.grid = { background: 'transparent', gridLineColor: '#303030', drawBorder: