PHP Classes

File: vendors/echarts/src/chart/candlestick/CandlestickSeries.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/echarts/src/chart/candlestick/CandlestickSeries.js   Download  
File: vendors/echarts/src/chart/candlestick/CandlestickSeries.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 2,613 bytes
 

Contents

Class file image Download
define(function(require) { 'use strict'; var zrUtil = require('zrender/core/util'); var SeriesModel = require('../../model/Series'); var whiskerBoxCommon = require('../helper/whiskerBoxCommon'); var formatUtil = require('../../util/format'); var encodeHTML = formatUtil.encodeHTML; var addCommas = formatUtil.addCommas; var CandlestickSeries = SeriesModel.extend({ type: 'series.candlestick', dependencies: ['xAxis', 'yAxis', 'grid'], /** * @readOnly */ valueDimensions: ['open', 'close', 'lowest', 'highest'], /** * @type {Array.<string>} * @readOnly */ dimensions: null, /** * @override */ defaultOption: { zlevel: 0, // ???? z: 2, // ???? coordinateSystem: 'cartesian2d', legendHoverLink: true, hoverAnimation: true, xAxisIndex: 0, yAxisIndex: 0, layout: null, // 'horizontal' or 'vertical' itemStyle: { normal: { color: '#c23531', // ?? positive color0: '#314656', // ?? negative '#c23531', '#314656' borderWidth: 1, // FIXME // ec2?????lineStyle.color ? lineStyle.color0 borderColor: '#c23531', borderColor0: '#314656' }, emphasis: { borderWidth: 2 } }, animationUpdate: false, animationEasing: 'linear', animationDuration: 300 }, /** * Get dimension for shadow in dataZoom * @return {string} dimension name */ getShadowDim: function () { return 'open'; }, /** * @override */ formatTooltip: function (dataIndex, mutipleSeries) { // It rearly use mutiple candlestick series in one cartesian, // so only consider one series in this default tooltip. var valueHTMLArr = zrUtil.map(this.valueDimensions, function (dim) { return dim + ': ' + addCommas(this._data.get(dim, dataIndex)); }, this); return encodeHTML(this.name) + '<br />' + valueHTMLArr.join('<br />'); } }); zrUtil.mixin(CandlestickSeries, whiskerBoxCommon.seriesModelMixin, true); return CandlestickSeries; });