Combined HTML/Canvas rendering
Closed this issue · 6 comments
It would be great if you could use a combined mode, in which the x axis uses html and the y axis uses canvas if CSS transforms are unavailable
Good idea. I'm first working on replacing the CSS positioning with translations when transforms are available. I suppose I should have 3 options: canvas, HTML with CSS translations, and plain HTML.
I think graceful degradation is the way to go, and instead of html or css or canvas options, make the only option
yaxis: {
axisLabelAngle = horizontal
}
defaulting to vertical
I wonder, though, if it would be more pain than it's worth to have a mix of canvas and HTML, given that the default fonts are quite different, and I'm not sure how much value there is to having half the axes' labels selectable and the other half not. I want to keep the ability to force specific types of rendering too. Maybe I will implement both the simple horizontal/vertical option and the forcing of specific renderers.
Anyway for now I have pushed support for graceful fallback. All the latest major browsers default to CSS transforms, a few go back to canvas, and IE 8 goes back to the DXImageTransform for rotation and CSS positioning for translation ('cause Matrix is awful and I don't care to learn it). I haven't tried it, but I assume very old browsers would go back to HTML.
I like "Maybe I will implement both the simple horizontal/vertical option and the forcing of specific renderers." that method
Sorry haven't gotten back to this... not much time to concentrate on this plugin for a while. Feel free to submit a patch if you want. :)
With axis-label support going into flot core in 0.9, I don't think it's worthwhile to further complicate this plugin, so I'm going to close this.