score:3

Accepted answer

the issue here isn't the composite axes, which you are using correctly. it's the series definition. the first parameter of the addseries either takes dimensions to disaggregate by or a field which is not in the data, which it uses as a label. the only limitation of this approach is that you cannot label your series by a dimension name in the data. in this case the first series for example (it applies to all), is disaggregated by "yes" which for the line series means it tries to draw a line for each value of "yes", meaning 1 line per row, hence all the single unconnected points. the fix is to just name your lines something different. for example:

mychart.addseries("y", dimple.plot.line, [dateaxis, yesaxis]);
mychart.addseries("n", dimple.plot.line, [dateaxis, noaxis]);
mychart.addseries("u", dimple.plot.line, [dateaxis, unsureaxis]);

here's your updated fiddle: http://jsfiddle.net/rawyw/2/

if you want the names to look like they match you can just add a trailing space to the series names:

mychart.addseries("yes ", dimple.plot.line, [dateaxis, yesaxis]);
mychart.addseries("no ", dimple.plot.line, [dateaxis, noaxis]);
mychart.addseries("unsure ", dimple.plot.line, [dateaxis, unsureaxis]);

this will also work


Related Query

More Query from same tag