svelte-plots-basic 2.1.0 → 2.1.1

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.1.0",
4
+ "version": "2.1.1",
5
5
  "author": "Sergey Kucheryavskiy",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -30,7 +30,7 @@
30
30
 
31
31
  /* sanity check of input parameters */
32
32
  if (typeof(marker) !== "number" || marker < 1 || marker > markers.length) {
33
- throw(`ScatterSeries: parameter 'marker' must be a number from 1 to ${markers.length}."`);
33
+ throw(`Points: parameter 'marker' must be a number from 1 to ${markers.length}."`);
34
34
  }
35
35
 
36
36
  // reactive variables for coordinates of data points in pixels (and line style)
package/src/Colors.js CHANGED
@@ -10,6 +10,7 @@ export const Colors = {
10
10
  "LEGEND": "#303030",
11
11
 
12
12
  "PRIMARY": "#2679B2",
13
+ "PRIMARY_LIGHT": "#66A9F2",
13
14
  "PRIMARY_TEXT": "#333",
14
15
  }
15
16
 
package/src/Utils.js CHANGED
@@ -110,8 +110,8 @@ export function val2p(x, y, tX, tY, axes) {
110
110
 
111
111
  if (x === undefined || y === undefined) return undefined;
112
112
 
113
- const px = axes.transform(checkCoords(x), tX.coords);
114
- const py = axes.transform(checkCoords(y), tY.coords);
113
+ const px = axes.transform(checkCoords(x, 'val2p'), tX.coords);
114
+ const py = axes.transform(checkCoords(y, 'val2p'), tY.coords);
115
115
 
116
116
  if (px.length != py.length) {
117
117
  throw Error('PlotSeries: parameters "xValues" and "yValues" must be numeric vectors of the same length.');