svelte-plots-basic 1.0.7 → 1.1.0

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/README.md CHANGED
@@ -44,9 +44,9 @@ Just create a new Svelte app following the [quick start guide](https://svelte.de
44
44
  showLabels="no"
45
45
  faceColor="#e0e0e0"
46
46
  edgeColor="#e0e0e0"
47
- labels="{years}"
48
- xValues="{years}"
49
- yValues="{amount}"
47
+ labels={years}
48
+ xValues={years}
49
+ yValues={amount}
50
50
  />
51
51
  </Axes>
52
52
  </div>
@@ -67,35 +67,36 @@ Example below shows how to create a plot with axis, box and grid as well as how
67
67
 
68
68
  <div class="plot">
69
69
  <Axes>
70
- // x and y axis with automatic ticks and grid lines
71
- <XAxis showGrid="{true}"></XAxis>
72
- <YAxis showGrid="{true}"></YAxis>
73
70
 
74
71
  // bar, line and marker series with the same data values
75
72
  <BarSeries
76
73
  showLabels="no"
77
74
  faceColor="#eee"
78
75
  edgeColor="#eee"
79
- xValues="{years}"
80
- yValues="{amount}"
76
+ xValues={years}
77
+ yValues={amount}
81
78
  />
82
79
  <LineSeries
83
80
  lineColor="blue"
84
- lineWidth="{2}"
85
- xValues="{years}"
86
- yValues="{amount}"
81
+ lineWidth={2}
82
+ xValues={years}
83
+ yValues={amount}
87
84
  />
88
85
  <ScatterSeries
89
86
  marker="✺"
90
87
  showLabels="hover"
91
88
  markerColor="blue"
92
- labels="{years}"
93
- xValues="{years}"
94
- yValues="{amount}"
89
+ labels={years}
90
+ xValues={years}
91
+ yValues={amount}
95
92
  />
96
93
 
94
+ // x and y axis with automatic ticks and grid lines
95
+ <XAxis showGrid={true} slot="xaxis" />
96
+ <YAxis showGrid={true} slot="yaxis" />
97
+
97
98
  // box around the axes
98
- <Box />
99
+ <Box slot="box" />
99
100
  </Axes>
100
101
  </div>
101
102
  ```
@@ -125,6 +126,7 @@ Each component is responsible for visualization of the corresponding axis. The a
125
126
  * `ticks` — vector with ticks
126
127
  * `tickLabels` — vector with values to be shown as labels beside each tick
127
128
  * `showGrid` — a logical parameter, which allows to show grid lines on the plot
129
+ * `slot` — name of the slot, `"xaxis"` or `"yaxis"`
128
130
 
129
131
  The components must be placed in a particular slot of the parent `Axes` component.
130
132