Ultimately I'm after a very minimal 1 dimensional chart like this:
Axes
- X-axis: 0 to 100, and invisible
- Y-axis: 0 to 0 (but -1 to 1 may be necessary to draw a three lines)
Data
- Points only. No lines.
- Two data sets need to be colored differently (red and green preferred).
- All data on x-axis (y=0)
- If shapes are possible, X's and O's would be perfect
Planes
Instead of a standard grid, I need three lines drawn at specific points on the x-axis.
Example:[[40,-1],[40,1]], [[50,-1],[50,1]], [[60,-1],[60,1]]
Here's what I've tried so far:
d1 = [[48,0],[16,0],[10,0],[40,0],[30,0],[37,0]];
d2 = [[43,0],[60,0],[74,0],[83,0]];
var options = {
points: { show: true, fill: true, radius: 5 },
lines: { show: false, fill: true },
xaxis: { show: false, min:0, max:100, ticks: false, tickColor: 'transparent' },
yaxis: { show: false, min:-1, max:1, ticks: false, tickColor: 'transparent' },
grid: { show:false }
};
var data = [
{ data: d1, points: { color: '#E07571', fillcolor: '#E07571' } },
{ data: d2, points: { color: '#FDEDB2', fillcolor: '#FDEDB2' } }
];
$.plot($('#placeholder'), data, options);
Problems:
- colors don't work
- can't figure out how to draw planes