File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,14 @@ export class Chart extends EventEmitter.EventEmitter {
80
80
static cache : Record < string , Chart > = { }
81
81
82
82
private readonly id : string
83
+
83
84
readonly markerId : string
84
- public options : FunctionPlotOptions
85
+
85
86
public meta : ChartMeta
87
+ /**
88
+ * options are the input options sent to function plot.
89
+ */
90
+ public options : FunctionPlotOptions
86
91
87
92
/**
88
93
* Array of function-plot instances linked to the events of this instance,
@@ -628,7 +633,7 @@ export class Chart extends EventEmitter.EventEmitter {
628
633
const canvas = instance . canvas . merge ( instance . canvas . enter )
629
634
630
635
// Draw the x-axis
631
- canvas . select ( '.x.axis' ) . call ( instance . meta . xAxis )
636
+ canvas . select ( '.x.axis' ) . attr ( 'transform' , `translate(0, ${ this . meta . height } )` ) . call ( instance . meta . xAxis )
632
637
633
638
if ( this . options . x . position === 'sticky' ) {
634
639
const yMin = this . meta . yScale . domain ( ) [ 0 ]
@@ -648,7 +653,7 @@ export class Chart extends EventEmitter.EventEmitter {
648
653
}
649
654
650
655
// Draw the y-axis
651
- canvas . select ( '.y.axis' ) . call ( instance . meta . yAxis )
656
+ canvas . select ( '.y.axis' ) . attr ( 'transform' , `translate(0, 0)` ) . call ( instance . meta . yAxis )
652
657
653
658
if ( this . options . y . position === 'sticky' ) {
654
659
const xMin = this . meta . xScale . domain ( ) [ 0 ]
You can’t perform that action at this time.
0 commit comments