package.es-modules.Series.HollowCandlestick.HollowCandlestickPoint.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of highcharts Show documentation
Show all versions of highcharts Show documentation
JavaScript charting framework
The newest version!
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
/* *
*
* Imports
*
* */
import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
const { seriesTypes: { candlestick: CandlestickSeries } } = SeriesRegistry;
/* *
*
* Class
*
* */
class HollowCandlestickPoint extends CandlestickSeries.prototype.pointClass {
/* *
*
* Functions
*
* */
/* eslint-disable valid-jsdoc */
/**
* Update class name if needed.
* @private
* @function Highcharts.seriesTypes.hollowcandlestick#getClassName
*/
getClassName() {
let className = super.getClassName.apply(this);
const point = this, index = point.index, currentPoint = point.series.hollowCandlestickData[index];
if (!currentPoint.isBullish && currentPoint.trendDirection === 'up') {
className += '-bearish-up';
}
return className;
}
}
/* *
*
* Class Namespace
*
* */
/* *
*
* Default Export
*
* */
export default HollowCandlestickPoint;