| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/KPI monitor/node_modules/highcharts/es-modules/Core/Series/ |
Upload File : |
/* *
*
* (c) 2010-2026 Highsoft AS
* Author: Torstein Honsi
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*
*
* */
'use strict';
import H from '../Globals.js';
import D from '../Defaults.js';
const { defaultOptions } = D;
import Point from './Point.js';
import U from '../Utilities.js';
const { extend, extendClass, merge } = U;
/* *
*
* Namespace
*
* */
var SeriesRegistry;
(function (SeriesRegistry) {
/* *
*
* Properties
*
* */
/**
* @internal
* @todo Move `Globals.seriesTypes` code to her.
*/
SeriesRegistry.seriesTypes = H.seriesTypes;
/* *
*
* Functions
*
* */
/**
* Registers class pattern of a series.
*
* @internal
*/
function registerSeriesType(seriesType, SeriesClass) {
const defaultPlotOptions = defaultOptions.plotOptions || {}, seriesOptions = SeriesClass.defaultOptions, seriesProto = SeriesClass.prototype;
seriesProto.type = seriesType;
if (!seriesProto.pointClass) {
seriesProto.pointClass = Point;
}
if (SeriesRegistry.seriesTypes[seriesType]) {
return false;
}
if (seriesOptions) {
defaultPlotOptions[seriesType] = seriesOptions;
}
SeriesRegistry.seriesTypes[seriesType] = SeriesClass;
return true;
}
SeriesRegistry.registerSeriesType = registerSeriesType;
/**
* Old factory to create new series prototypes.
*
* @deprecated
* @function Highcharts.seriesType
*
* @param {string} type
* The series type name.
*
* @param {string} parent
* The parent series type name. Use `line` to inherit from the basic
* {@link Series} object.
*
* @param {Highcharts.SeriesOptionsType|Highcharts.Dictionary<*>} options
* The additional default options that are merged with the parent's options.
*
* @param {Highcharts.Dictionary<*>} [props]
* The properties (functions and primitives) to set on the new prototype.
*
* @param {Highcharts.Dictionary<*>} [pointProps]
* Members for a series-specific extension of the {@link Point} prototype if
* needed.
*
* @return {Highcharts.Series}
* The newly created prototype as extended from {@link Series} or its
* derivatives.
*/
function seriesType(type, parent, options, seriesProto, pointProto) {
const defaultPlotOptions = defaultOptions.plotOptions || {};
parent = parent || '';
// Merge the options
defaultPlotOptions[type] = merge(defaultPlotOptions[parent], options);
// Create the class
delete SeriesRegistry.seriesTypes[type];
const parentClass = (SeriesRegistry.seriesTypes[parent] ||
H.Series), childClass = extendClass(parentClass, seriesProto);
registerSeriesType(type, childClass);
SeriesRegistry.seriesTypes[type].prototype.type = type;
// Create the point class if needed
if (pointProto) {
class PointClass extends Point {
}
extend(PointClass.prototype, pointProto);
SeriesRegistry.seriesTypes[type].prototype.pointClass = PointClass;
}
return SeriesRegistry.seriesTypes[type];
}
SeriesRegistry.seriesType = seriesType;
})(SeriesRegistry || (SeriesRegistry = {}));
/* *
*
* Default Export
*
* */
export default SeriesRegistry;