d3fc-flexi-chart
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -33,5 +33,6 @@ // const flexi = fcFlexi.flexiChart(); | ||
var gridlinesSvg = fc.annotationSvgGridline(); | ||
var lineSvg = fc.seriesSvgLine(); | ||
var lineSvg = fc.seriesSvgLine().curve(d3.curveCatmullRom); | ||
var areaSvg = fc.seriesSvgArea() | ||
.mainValue(d => d.z); | ||
.mainValue(d => d.z) | ||
.curve(d3.curveCatmullRom); | ||
@@ -38,0 +39,0 @@ var multiSvg = fc.seriesSvgMulti() |
{ | ||
"name": "d3fc-flexi-chart", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A flexible alternative to the d3fc cartesian chart", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -5,2 +5,3 @@ import { rebindAll } from '@d3fc/d3fc-rebind'; | ||
export default (...args) => { | ||
const contextType = '2d'; | ||
const base = layer(...args); | ||
@@ -14,5 +15,13 @@ | ||
base.plotArea().context(canvas.getContext('2d'))(data); | ||
base.plotArea().context(canvas.getContext(contextType))(data); | ||
}; | ||
canvasLayer.contextType = (...args) => { | ||
if (!args.length) { | ||
return contextType; | ||
} | ||
contextType = args[0]; | ||
return canvasLayer; | ||
}; | ||
rebindAll(canvasLayer, base); | ||
@@ -19,0 +28,0 @@ canvasLayer.element = 'd3fc-canvas'; |
94665
20
505