@carbon/charts
Version:
Carbon charting components
55 lines • 2.5 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
// Internal Imports
import { AxisChart } from '../axis-chart';
import * as Configuration from '../configuration';
import { Skeletons } from '../interfaces/index';
import { Tools } from '../tools';
// Components
import { Grid, StackedArea, StackedRuler, TwoDimensionalAxes, Line, StackedScatter, Skeleton, } from '../components/index';
var StackedAreaChart = /** @class */ (function (_super) {
__extends(StackedAreaChart, _super);
function StackedAreaChart(holder, chartConfigs) {
var _this = _super.call(this, holder, chartConfigs) || this;
// Merge the default options for this chart
// With the user provided options
_this.model.setOptions(Tools.mergeDefaultChartOptions(Configuration.options.stackedAreaChart, chartConfigs.options));
// Initialize data, services, components etc.
_this.init(holder, chartConfigs);
return _this;
}
StackedAreaChart.prototype.getComponents = function () {
// Specify what to render inside the graph-frame
var graphFrameComponents = [
new TwoDimensionalAxes(this.model, this.services),
new Grid(this.model, this.services),
new StackedRuler(this.model, this.services),
new StackedArea(this.model, this.services),
new Line(this.model, this.services, { stacked: true }),
new StackedScatter(this.model, this.services, {
fadeInOnChartHolderMouseover: true,
handleThresholds: true,
stacked: true,
}),
new Skeleton(this.model, this.services, {
skeleton: Skeletons.GRID,
}),
];
var components = this.getAxisChartComponents(graphFrameComponents);
return components;
};
return StackedAreaChart;
}(AxisChart));
export { StackedAreaChart };
//# sourceMappingURL=../../src/charts/area-stacked.js.map