svelte-plots-basic 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-plots-basic",
3
3
  "description": "Svelte components for creating simple plots",
4
- "version": "2.2.1",
4
+ "version": "2.2.3",
5
5
  "author": "Sergey Kucheryavskiy",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -318,17 +318,17 @@
318
318
  style={`font-family: Arial, Helvetica, sans-serif;font-size:${fontSize}px`}>
319
319
 
320
320
  <g style={lblStyleStr}>
321
- <!-- x-axis label -->
322
- {#if xLabel && xLabel !== ''}
323
- <text x={0} y={(height + top) /2} dx={0} dy={0} transform={`rotate(-90, 10, ${height/2})`} style="font-size:1.1em;">{@html yLabel}</text>
324
- {/if}
325
321
  <!-- y-axis label -->
326
322
  {#if yLabel && yLabel !== ''}
327
- <text x={left + width/2 } y={height + top} dx={0} dy={5} style="font-size:1.1em;">{@html xLabel}</text>
323
+ <text x={0} y={(height + top) /2} dx={0} dy={0} dominant-baseline="top" transform={`rotate(-90, 10, ${height/2})`} style="font-size:1.1em;">{@html yLabel}</text>
324
+ {/if}
325
+ <!-- x-axis label -->
326
+ {#if xLabel && xLabel !== ''}
327
+ <text x={left + width/2 } y={height + top} dx={0} dy={5} dominant-baseline="middle" style="font-size:1.1em;">{@html xLabel}</text>
328
328
  {/if}
329
329
  <!-- plot title -->
330
330
  {#if title && title !== ''}
331
- <text x={left + width/2 } y={0} dx={0} dy={10} alignment-baseline="hanging" style="font-size:1.2em;">{@html title}</text>
331
+ <text x={left + width/2 } y={0} dx={0} dy={10} dominant-baseline="hanging" style="font-size:1.2em;">{@html title}</text>
332
332
  {/if}
333
333
  </g>
334
334