File tree Expand file tree Collapse file tree 2 files changed +32
-27
lines changed Expand file tree Collapse file tree 2 files changed +32
-27
lines changed Original file line number Diff line number Diff line change 201
201
plot ,
202
202
' fill'
203
203
)}
204
- x ={titleAlign === ' right' ? plot .width : titleAlign === ' center' ? plot .width / 2 : 0 }
205
- y ={5 }
204
+ x ={plot .options .marginLeft +
205
+ plot .plotWidth * (titleAlign === ' right' ? 1 : titleAlign === ' center' ? 0.5 : 0 )}
206
+ y ={anchor === ' top' ? 13 : plot .height - 13 }
206
207
class =" axis-x-title"
207
- dominant-baseline =" hanging" >{useTitle }</text >
208
+ dominant-baseline ={ anchor === ' top ' ? ' auto ' : ' hanging' } >{useTitle }</text >
208
209
{/if }
209
210
{#if showAxis }
210
211
<BaseAxisX
212
+ {anchor }
213
+ {className }
214
+ {labelAnchor }
215
+ {options }
211
216
{plot }
217
+ {text }
218
+ {tickClass }
219
+ {tickFontSize }
220
+ {tickPadding }
221
+ {ticks }
222
+ {tickSize }
223
+ height ={plot .facetHeight }
224
+ marginTop ={plot .options .marginTop }
212
225
scaleFn ={plot .scales .x .fn }
213
226
scaleType ={plot .scales .x .type }
214
227
tickFormat ={useTickFormat }
215
- {ticks }
216
- marginTop ={plot .options .marginTop }
217
- height ={plot .facetHeight }
218
- {anchor }
219
- {tickSize }
220
- {tickPadding }
221
- {tickFontSize }
222
- {tickClass }
223
- {text }
224
- {labelAnchor }
225
- {className }
226
- {options } />
228
+ title ={useTitle } />
227
229
{/if }
228
230
</Mark >
229
231
Original file line number Diff line number Diff line change 66
66
data = Array .isArray (magicTicks ) ? magicTicks : [],
67
67
automatic = false ,
68
68
title,
69
- anchor,
69
+ anchor = ' left' ,
70
+ class : className,
70
71
facetAnchor = ' auto' ,
71
72
interval = typeof magicTicks === ' string' ? magicTicks : undefined ,
72
73
lineAnchor = ' center' ,
187
188
{/if }
188
189
{#if showAxis }
189
190
<BaseAxisY
191
+ {anchor }
192
+ {className }
193
+ {lineAnchor }
194
+ {options }
190
195
{plot }
196
+ {text }
197
+ {tickClass }
198
+ {tickFontSize }
199
+ {tickPadding }
200
+ {ticks }
201
+ {tickSize }
202
+ marginLeft ={plot .options .marginLeft }
191
203
scaleFn ={plot .scales .y .fn }
192
204
scaleType ={plot .scales .y .type }
193
205
tickFormat ={useTickFormat }
194
- {ticks }
195
- marginLeft ={plot .options .marginLeft }
196
- width ={plot .facetWidth }
197
- {anchor }
198
- {lineAnchor }
199
- {tickSize }
200
- {tickPadding }
201
- {tickFontSize }
202
- {tickClass }
203
- {text }
204
- {options } />
206
+ title ={useTitle }
207
+ width ={plot .facetWidth } />
205
208
{/if }
206
209
</Mark >
207
210
You can’t perform that action at this time.
0 commit comments