JqPlot combining bubble chart and line chart

Is it possible to combine a bubble chart and a line chart in the same chart using jqPlot?

Based on the discussion in the combined line and w / jqplot bar , I created a jsfiddle that contains the plot and bar graph: http://jsfiddle.net/85K6K/6/

I can’t convert the line chart to a line chart. How to do it?

I tried (changed, deleted) the render, but the plot goes hayway

This is how I set up the series:

var plot2 = $.jqplot('chart', [ p, arr], { series: [ { renderer: $.jqplot.BarRenderer, rendererOptions: { barMargin: 10 }, pointLabels: { show: true, } //showMarker:false }, { renderer: $.jqplot.BubbleRenderer, rendererOptions: { bubbleAlpha: 0.6, highlightAlpha: 0.8 }, shadow: true, shadowAlpha: 0.05 }], axesDefaults: { tickRenderer: $.jqplot.CanvasAxisTickRenderer, }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer }, yaxis: { autoscale: true } } }); 

What am i missing

Thanks in advance...

+4
source share
1 answer

As a result of trial and error, I discovered that you need to set the forceTickAt0 property to true for the y axis.

http://jsfiddle.net/85K6K/14/

Here's the relevant part:

 yaxis: { autoscale: true, renderer: $.jqplot.LinearAxisRenderer, rendererOptions: { forceTickAt0: true } } 

I think you should consider the bug. There are other problems that open up in their Y axis database with the NaN error, which is apparently related; but I think your question is worth publishing yourself. With this question and JSFiddle, it should be well documented enough for developers to solve :)

EDIT . I don’t know enough about your graph data to find out if this is suitable, but maybe you want to use the sortMergedLabels property of CategoryAxisRenderer to make your graph look like this ?

 rendererOptions: { sortMergedLabels: true } 
+2
source

All Articles