lucid-ui
Version:
A UI component library from AppNexus.
29 lines • 1.46 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var create_react_class_1 = __importDefault(require("create-react-class"));
var index_1 = require("../../../index");
var data = [
{ x: new Date('2015-01-01T00:00:00-08:00'), bananas: 2, cherries: 8 },
{ x: new Date('2015-03-02T00:00:00-08:00'), bananas: 2, cherries: 5 },
{ x: new Date('2015-05-03T00:00:00-08:00'), bananas: 3, cherries: 5 },
{ x: new Date('2015-07-04T00:00:00-08:00'), bananas: 5, cherries: 6 },
];
var style = {
paddingTop: '5rem',
};
exports.default = create_react_class_1.default({
render: function () {
return (react_1.default.createElement("div", { style: style },
react_1.default.createElement(index_1.LineChart, { data: data, margin: {
right: 80,
}, width: 800, colorMap: {
bananas: index_1.chartConstants.COLOR_4,
cherries: index_1.chartConstants.COLOR_2,
}, yAxisFields: ['bananas'], yAxisTitle: 'Number of Bananas', yAxisTitleColor: index_1.chartConstants.COLOR_4, y2AxisFields: ['cherries'], y2AxisTitle: 'Number of Cherries', y2AxisTitleColor: index_1.chartConstants.COLOR_2 })));
},
});
//# sourceMappingURL=06.dual-axis.js.map