jqplot

PrimeFaces - customise Date Chart

风格不统一 提交于 2019-11-29 04:31:35
I am using PrimeFaces 3.4.1 to plot time chart (Date on x-axis, int value on y-axis). At the moment I have something like that: xhtml : <p:lineChart id="timeChart" value="#{myGraphBean.model}" legendPosition="e" title="Time Chart" minY="0" maxY="25" style="height:300px"/> Java bean : private final static int MAX_VALUE = 20; private final static int NUMBER_OF_POINTS = 20; private final static DateFormat dateFormat = new SimpleDateFormat("dd-MM-yy"); private void createLinearModel() { model = new CartesianChartModel(); Calendar day = Calendar.getInstance(); day.set(Calendar.HOUR_OF_DAY, 0); day

How to label Google Column Chart bars

柔情痞子 提交于 2019-11-29 02:01:31
I am using Google Chart API to create chart for values which goes from 1 to millions. Problem The bars which are representing smaller values (ex: less than 50 or so) are invisible on graph and no way I can see what values correspond to certain x-axis. This would be solved if I can somehow print y-axis values on top of bars.But, I couldn't find any mention in the API doc on how to do it. There is similar problem here, but it doesn't answers my question. put labels on top of inside bar in google interactive bar chart There are some other more than year old unanswered questions here, I am hoping

JqPlot As Image

China☆狼群 提交于 2019-11-28 19:43:00
In the latest JqPlot examples (see here , there are buttons underneath some charts that you can click, and a div slides down with the chart as an image, allowing you to right click and save as. I've checked the source and I just can't see myself where this is happening. I've seen various discussions about this (see here however my javascript is basic at best. This is however something I would like to implement in my current project. Is anyone aware of a complete tutorial as to how to do this, i.e. from the actual jquery code right down to implementation in html code. Here's the simplest

Programatically set the marker on a plot

☆樱花仙子☆ 提交于 2019-11-28 12:54:25
I would like to know if it is possible to programatically 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 find the relevant data grid row. But I'm stuck on the reverse. In my example I have replaced the datagrid

Date axis in linechart using primefaces and jqplot

China☆狼群 提交于 2019-11-28 12:40:33
问题 I've tried to show a linechart with primefaces and jqplot. But I don't get it. I have this code in my bean: CartesianChartModel graphic = new CartesianChartModel(); LineChartSeries series = new LineChartSeries(); DateFormat dateFormat = new SimpleDateFormat("mm/dd/yy"); String date1 = "01/10/13"; String date2= "01/15/13"; String date3= "02/20/13"; p=dateFormat.parse(date1); series.set(p.getTime(), 10); p=dateFormat.parse(date2); series.set(p.getTime(), 20); p=dateFormat.parse(date3); series

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

五迷三道 提交于 2019-11-28 00:18:18
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: true}], highlighter: { sizeAdjust: 10, show: true, tooltipLocation: 'n', useAxesFormatters: true },

How to refresh jqplot bar chart without redrawing the chart

会有一股神秘感。 提交于 2019-11-27 20:19:35
问题 I have a jqplot bar chart and I want the chart data to be changed when the user changes the value on a drop-down list. That works, but the problem is the bar chart redraws, one over another, each time the user changes the values. How can I update or reload the bars without drawing the whole thing again? Is there any property value to be set? Chart data changes according to an ajax call: $.ajax({ url: '/Home/ChartData', type: 'GET', data: { Id: Id }, dataType: 'json', success: function (data)

PrimeFaces - customise Date Chart

我的梦境 提交于 2019-11-27 18:20:41
问题 I am using PrimeFaces 3.4.1 to plot time chart (Date on x-axis, int value on y-axis). At the moment I have something like that: xhtml : <p:lineChart id="timeChart" value="#{myGraphBean.model}" legendPosition="e" title="Time Chart" minY="0" maxY="25" style="height:300px"/> Java bean : private final static int MAX_VALUE = 20; private final static int NUMBER_OF_POINTS = 20; private final static DateFormat dateFormat = new SimpleDateFormat("dd-MM-yy"); private void createLinearModel() { model =

jqPlot resizing

橙三吉。 提交于 2019-11-27 15:49:07
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.DateTickFormatter = function(format, val) { if (!format) { format = '%Y/%m/%d'; } if(format == '%Q') { mnth =

jqplot tooltip on bar chart

左心房为你撑大大i 提交于 2019-11-27 12:16:54
问题 I'm using the jquery plugin jqplot for plotting some bar charts. on hover, I'd like to display the tick for the bar and its value on a tooltip. I've tried highlighter: { show: true, showTooltip: true, // show a tooltip with data point values. tooltipLocation: 'nw', // location of tooltip: n, ne, e, se, s, sw, w, nw. tooltipAxes: 'both', // which axis values to display in the tooltip, x, y or both. lineWidthAdjust: 2.5 // pixels to add to the size line stroking the data point marker } but it