@@ -223,6 +223,14 @@ export default class ChartBootstrap {
223
223
this . canvasModels ,
224
224
elements . chartResizer ,
225
225
) ;
226
+ const yAxisDescriptionsCanvasModel = createCanvasModel (
227
+ eventBus ,
228
+ elements . yAxisDescriptionsCanvas ,
229
+ config ,
230
+ drawingManager ,
231
+ this . canvasModels ,
232
+ elements . chartResizer ,
233
+ ) ;
226
234
const canvasBoundsContainer = new CanvasBoundsContainer (
227
235
config ,
228
236
eventBus ,
@@ -457,7 +465,7 @@ export default class ChartBootstrap {
457
465
) ;
458
466
this . chartComponents . push ( highLowComponent ) ;
459
467
460
- this . initYAxisDrawer ( yAxisLabelsCanvasModel ) ;
468
+ this . initYAxisDrawer ( yAxisLabelsCanvasModel , yAxisDescriptionsCanvasModel ) ;
461
469
462
470
this . yAxisComponent = mainPane . mainExtent . yAxis ;
463
471
// default labels provider
@@ -558,24 +566,27 @@ export default class ChartBootstrap {
558
566
this . clearer = clearerSafe ( this . components ) ;
559
567
}
560
568
561
- private initYAxisDrawer ( yAxisLabelsCanvasModel : CanvasModel ) {
569
+ private initYAxisDrawer ( yAxisLabelsCanvasModel : CanvasModel , yAxisDescriptionsCanvasModel : CanvasModel ) {
562
570
const yAxisCompositeDrawer = new CompositeDrawer ( ) ;
563
571
const clearYAxis = new ClearCanvasDrawer ( yAxisLabelsCanvasModel ) ;
572
+ const clearYAxisDescriptions = new ClearCanvasDrawer ( yAxisDescriptionsCanvasModel ) ;
564
573
yAxisCompositeDrawer . addDrawer ( clearYAxis , 'YAXIS_CLEAR' ) ;
574
+ yAxisCompositeDrawer . addDrawer ( clearYAxisDescriptions , 'Y_AXIS_DESCRIPTIONS_CLEAR' ) ;
565
575
566
576
this . drawingManager . addDrawer ( yAxisCompositeDrawer , 'Y_AXIS' ) ;
567
577
568
578
const yAxisDrawer = new YAxisDrawer ( this . config , yAxisLabelsCanvasModel , this . paneManager ) ;
569
579
yAxisCompositeDrawer . addDrawer ( yAxisDrawer ) ;
570
580
571
- const yAxisLabelsDrawer = new YAxisPriceLabelsDrawer (
581
+ const yAxisPriceLabelsDrawer = new YAxisPriceLabelsDrawer (
572
582
yAxisLabelsCanvasModel ,
583
+ yAxisDescriptionsCanvasModel ,
573
584
this . backgroundCanvasModel ,
574
585
this . canvasBoundsContainer ,
575
586
this . config ,
576
587
this . paneManager ,
577
588
) ;
578
- yAxisCompositeDrawer . addDrawer ( yAxisLabelsDrawer ) ;
589
+ this . drawingManager . addDrawer ( yAxisPriceLabelsDrawer , 'Y_AXIS_PRICE_LABELS' ) ;
579
590
}
580
591
581
592
// TODO remove chartModel dependency, put period to global config somewhere
0 commit comments