@progress/kendo-charts
Version:
Kendo UI platform-independent Charts library
41 lines (32 loc) • 1.38 kB
JavaScript
import PiePlotArea from './pie-plotarea';
import DonutChart from '../donut-chart/donut-chart';
var DonutPlotArea = (function (PiePlotArea) {
function DonutPlotArea () {
PiePlotArea.apply(this, arguments);
}
if ( PiePlotArea ) DonutPlotArea.__proto__ = PiePlotArea;
DonutPlotArea.prototype = Object.create( PiePlotArea && PiePlotArea.prototype );
DonutPlotArea.prototype.constructor = DonutPlotArea;
DonutPlotArea.prototype.render = function render () {
this.createDonutChart(this.series);
};
DonutPlotArea.prototype.createDonutChart = function createDonutChart (series) {
var firstSeries = series[0];
var donutChart = new DonutChart(this, {
series: series,
padding: firstSeries.padding,
connectors: firstSeries.connectors,
legend: this.options.legend
});
this.appendChart(donutChart);
};
// These were overriden in the Pie, so revert to original behavior
DonutPlotArea.prototype.getPointBelow = function getPointBelow (point) {
return this._getNextPoint(point, this._pointsByVertical, -1);
};
DonutPlotArea.prototype.getPointAbove = function getPointAbove (point) {
return this._getNextPoint(point, this._pointsByVertical, 1);
};
return DonutPlotArea;
}(PiePlotArea));
export default DonutPlotArea;