jqplot

How to dynamically change jqplot renderer?

…衆ロ難τιáo~ 提交于 2019-12-04 12:47:00
问题 Basically, I want the user to be able to change the type of the graph by clicking a drop down menu: BarRenderer, PieRenderer, etc. The data is the same. I know I can call $.jqplot() again on the same element, but then I'll have to pass all the setting again. And my page have a variable number of graphs, which makes that option a very bad choice. I found a link about this: http://groups.google.com/group/jqplot-users/browse_thread/thread/efe6511cd9496f16/5c625baf78d3b0ae but it seems I still

jqPlot - Pie legend too tall when there are many legend items

南楼画角 提交于 2019-12-04 07:05:42
I'm using jqPlot to create a pie chart with a legend. Part of my jqPlot pie options look as follows: seriesDefaults: { renderer: $.jqplot.PieRenderer, rendererOptions: { padding: 10, showDataLabels: true, dataLabelFormatString: '%.2f%%', sliceMargin: 2, startAngle: -90 } }, legend: { show: true, location: 'e', placement: 'outside', xoffset: 1, fontSize: '11px', rowSpacing: '10px', textColor: '#222222', fontFamily: 'Lucida Grande, Lucida Sans, Arial, sans-serif' } Recently I've come across a case where there are many legend items (e.g., 21), which makes my legend box too tall. I'm wondering if

Using jqPlot plugins in PrimeFaces charts to draw lines on chart

你。 提交于 2019-12-04 06:34:02
I would like to draw some extra lines on my PrimeFaces (v5.3) chart, in particular on a linechart. Looking at the jqPlot example (PrimeFaces uses jqPlot to draw the charts), this example shows what I want to do. I have used the approach described in this answer . By setting an extender I am able to run my own javascript function, which allows me to change different types of configuration. Java when creating the mode: private LineChartModel initLinearModel() { LineChartModel model = new LineChartModel(); model.setExtender("chartExtender"); LineChartSeries series1 = new LineChartSeries();

Having problems with jqPlot bar chart

自闭症网瘾萝莉.ら 提交于 2019-12-04 01:47:02
I'm using jqPlot to create a bar graph, but I ran into a few problems. Problem 1: The first and last bars on the graph are cut off. Only half of it is displaying Problem 2: I don't want my data points to span the entire x-axis. Is there to not have the data span the entire x-axis? ex: This is what is does right now. This is the data I am passing into it var chartData = [["19-Jan-2012",2.61],["20-Jan-2012",5.00],["21-Jan-2012",6.00]] This is the jquery I am using. // Plot chart function PlotChart(chartData, numberOfTicks) { $.jqplot.config.enablePlugins = true; var plot2 = $.jqplot('chart1',

Jqplot DateAxis rendering is not proper

混江龙づ霸主 提交于 2019-12-03 17:10:45
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 . 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 tickInterval:'7 day'): xaxis:{ min:'2010-12-14', max:'2011-01-06', renderer:$.jqplot.DateAxisRenderer,

jqPlot: how to live update a chart

可紊 提交于 2019-12-03 11:40:35
I'm unable to figure out myself or find a proper example on how to perform live updates in jqPlot in a similar way as shown in this highcharts example . Fracu Based on this , I prepared the following example: $(document).ready(function() { var plot1 = $.jqplot('chart1', [new Array(1)], { title: 'Live Random Data', series: [ { yaxis: 'y2axis', label: '', showMarker: false, fill: false, neighborThreshold: 3, lineWidth: 2.2, color: '#0571B6', fillAndStroke: true} ], axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer, tickOptions: { formatString: '%H:%M:%S' }, numberTicks: 10 }, y2axis: { min:

jQPlot - remove vertical grid lines

余生颓废 提交于 2019-12-03 10:25:58
I am using jqPlot as my charting framework and have numerous charts in my application, primarily line and stacked bar charts. I now have a requirement to only show the horizonal grid lines on these charts and do not see any options in jqPlot to do this. There is a showGridline option but that disables the grid lines entirely. Is it possible to remove only the vertical grid lines in jqPlot and continue to show the horizontal ones? nolt2232 I figured it out. You can apply showGridline to a single axis by doing the following: axes:{ xaxis: { tickOptions:{ showGridline: false } } } Varun Naharia

jqplot Background Color Zones?

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I would like to be able to have several different "zones" indicated by the background on my jqplot bar chart. I have looked through the documentation, but have been unable to easily identify a way to do this. Is there a simple "fill" function or parameter that would allow me to set the background in several bands of horizontal color (various heights)? Thanks in advance. FG 回答1: I would use a similar approach as I suggest in the answer to a different question here. A direct link to the code sample. You would then set the sizes of

How to associate an event with only one object? jqplot

倖福魔咒の 提交于 2019-12-03 10:04:32
问题 Im using jqplot to draw some charts. It is a great tool, but it lacks a simple clickhandler option for each chart. Its plugins like highlighter, draggable and cursor register their interest in capturing click/mouse-events from the jqplot canvas by adding themselves to jqplot.eventListenerHooks (eventListenerHooks.push(['jqplotClick', callback]); for example. or 'jqplotMouseDown' or such are also available. After making my plot with the usual $.jqplot(target, data, options); then I do this $

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

时光毁灭记忆、已成空白 提交于 2019-12-03 09:54:09
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 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').each(function(){ var label = $(this), value = label.text(); if(categoryLinks[value]) { label.click