(el: NormalBoxPath, data: SeriesData, dataIndex: number, isSimpleBox?: boolean)
| 297 | } |
| 298 | |
| 299 | function setBoxCommon(el: NormalBoxPath, data: SeriesData, dataIndex: number, isSimpleBox?: boolean) { |
| 300 | const itemModel = data.getItemModel(dataIndex) as Model<CandlestickDataItemOption>; |
| 301 | |
| 302 | el.useStyle(data.getItemVisual(dataIndex, 'style')); |
| 303 | el.style.strokeNoScale = true; |
| 304 | |
| 305 | const cursorStyle = itemModel.getShallow('cursor'); |
| 306 | cursorStyle && el.attr('cursor', cursorStyle); |
| 307 | |
| 308 | el.__simpleBox = isSimpleBox; |
| 309 | |
| 310 | setStatesStylesFromModel(el, itemModel); |
| 311 | |
| 312 | const sign = data.getItemLayout(dataIndex).sign; |
| 313 | zrUtil.each(el.states, (state, stateName) => { |
| 314 | const stateModel = itemModel.getModel(stateName as any); |
| 315 | const color = getColor(sign, stateModel); |
| 316 | const borderColor = getBorderColor(sign, stateModel) || color; |
| 317 | const stateStyle = state.style || (state.style = {}); |
| 318 | color && (stateStyle.fill = color); |
| 319 | borderColor && (stateStyle.stroke = borderColor); |
| 320 | }); |
| 321 | |
| 322 | const emphasisModel = itemModel.getModel('emphasis'); |
| 323 | toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled')); |
| 324 | } |
| 325 | |
| 326 | function transInit(points: number[][], dim: number, itemLayout: CandlestickItemLayout) { |
| 327 | return zrUtil.map(points, function (point) { |
no test coverage detected
searching dependent graphs…