svelte-plots-basic 1.1.1 → 1.1.2

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Description
4
4
 
5
- `svelte-plots-basic` is a [Svelte](https://svelte.dev) component library for creating very simple 2D plots/charts. It is currently under active development and breaking changes may occur. In its current state (v. 1.1.1) it allows to create bar, scatter, area and line charts as well as any combination of the four. The charts are created using [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) and are re-scalable.
5
+ `svelte-plots-basic` is a [Svelte](https://svelte.dev) component library for creating very simple 2D plots/charts. It is currently under active development and breaking changes may occur. In its current state (v. 1.1.2) it allows to create bar, scatter, area and line charts as well as any combination of the four. The charts are created using [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) and are re-scalable.
6
6
 
7
7
  The description is not complete yet and will be updated during February-March of 2022.
8
8
 
package/dist/index.js CHANGED
@@ -108,6 +108,7 @@
108
108
  }
109
109
  function append_stylesheet(node, style) {
110
110
  append(node.head || node, style);
111
+ return style.sheet;
111
112
  }
112
113
  function insert(target, node, anchor) {
113
114
  target.insertBefore(node, anchor || null);
@@ -324,6 +325,9 @@
324
325
  });
325
326
  block.o(local);
326
327
  }
328
+ else if (callback) {
329
+ callback();
330
+ }
327
331
  }
328
332
  function create_component(block) {
329
333
  block && block.c();
@@ -502,10 +506,10 @@
502
506
  return { set, update, subscribe };
503
507
  }
504
508
 
505
- /* src/Axes.svelte generated by Svelte v3.48.0 */
509
+ /* src/Axes.svelte generated by Svelte v3.50.1 */
506
510
 
507
511
  function add_css$3(target) {
508
- append_styles(target, "svelte-n80kcc", ".plot{font-family:Arial, Helvetica, sans-serif;display:grid;grid-template-columns:min-content 1fr;grid-template-rows:auto 1fr auto;grid-template-areas:\". title\"\n \"ylab axes\"\n \". xlab\";box-sizing:border-box;background:#fefefe;min-width:100px;min-height:50px;width:100%;height:100%;padding:0;margin:0}.plot_small{font-size:11px}.plot_medium{font-size:13px}.plot_large{font-size:16px}.plot_error{display:flex}.plot_error > .axes-wrapper{display:none}.message_error{font-size:1.2em;color:crimson;padding:20px;text-align:center}.axes-wrapper.svelte-n80kcc{grid-area:axes;position:relative;box-sizing:border-box;display:flex;width:100%;height:100%;padding:0;margin:0}.axes{display:block;box-sizing:border-box;position:absolute;padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes__xlabel{grid-area:xlab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center}.axes__ylabel{grid-area:ylab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center;vertical-align:middle;display:flex}.axes__ylabel > span{width:1.5em;line-height:1.5em;display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}.axes__title{background:transparent;grid-area:title;font-size:1.3em;font-weight:bold;line-height:1.2em;padding:0.5em 0;text-align:center}.axis-labels{fill:#303030;font-size:0.95em}.labels{fill:#606060;font-size:0.90em}.labels{visibility:hidden;transition:visibility 0.25s linear, opacity 0.25s linear;opacity:0}");
512
+ append_styles(target, "svelte-11hqgob", ".plot{font-family:Arial, Helvetica, sans-serif;display:grid;grid-template-columns:min-content 1fr;grid-template-rows:auto 1fr auto;grid-template-areas:\". title\"\n \"ylab axes\"\n \". xlab\";box-sizing:border-box;background:#fefefe;min-width:100px;min-height:50px;width:100%;height:100%;padding:0;margin:0}.plot_small{font-size:11px}.plot_medium{font-size:13px}.plot_large{font-size:16px}.plot_error{display:flex}.plot_error > .axes-wrapper{display:none}.message_error{font-size:1.2em;color:crimson;padding:20px;text-align:center}.axes-wrapper.svelte-11hqgob{grid-area:axes;position:relative;box-sizing:border-box;display:flex;width:100%;height:100%;padding:0;margin:0}.axes{display:block;box-sizing:border-box;position:absolute;padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes-content{padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes__xlabel{grid-area:xlab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center}.axes__ylabel{grid-area:ylab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center;vertical-align:middle;display:flex}.axes__ylabel > span{width:1.5em;line-height:1.5em;display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}.axes__title{background:transparent;grid-area:title;font-size:1.3em;font-weight:bold;line-height:1.2em;padding:0.5em 0;text-align:center}.axis-labels{fill:#303030;font-size:0.95em}.labels{fill:#606060;font-size:0.90em}.labels{visibility:hidden;transition:visibility 0.25s linear, opacity 0.25s linear;opacity:0}");
509
513
  }
510
514
 
511
515
  const get_box_slot_changes = dirty => ({});
@@ -666,11 +670,12 @@
666
670
  attr(rect, "width", rect_width_value = /*cpx*/ ctx[8][1] - /*cpx*/ ctx[8][0]);
667
671
  attr(rect, "height", rect_height_value = /*cpy*/ ctx[7][0] - /*cpy*/ ctx[7][1]);
668
672
  attr(clipPath, "id", /*clipPathID*/ ctx[9]);
673
+ attr(g, "class", "axes-content");
669
674
  attr(g, "clip-path", "url(#" + /*clipPathID*/ ctx[9] + ")");
670
675
  attr(svg, "preserveAspectRatio", "none");
671
676
  attr(svg, "class", "axes");
672
- attr(div0, "class", "axes-wrapper svelte-n80kcc");
673
- attr(div1, "class", div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-n80kcc");
677
+ attr(div0, "class", "axes-wrapper svelte-11hqgob");
678
+ attr(div1, "class", div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-11hqgob");
674
679
  toggle_class(div1, "plot_error", !/*$isOk*/ ctx[3]);
675
680
  },
676
681
  m(target, anchor) {
@@ -843,11 +848,11 @@
843
848
  if_block3 = null;
844
849
  }
845
850
 
846
- if (!current || dirty[0] & /*$scale*/ 16 && div1_class_value !== (div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-n80kcc")) {
851
+ if (!current || dirty[0] & /*$scale*/ 16 && div1_class_value !== (div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-11hqgob")) {
847
852
  attr(div1, "class", div1_class_value);
848
853
  }
849
854
 
850
- if (dirty[0] & /*$scale, $isOk*/ 24) {
855
+ if (!current || dirty[0] & /*$scale, $isOk*/ 24) {
851
856
  toggle_class(div1, "plot_error", !/*$isOk*/ ctx[3]);
852
857
  }
853
858
  },
@@ -1299,7 +1304,7 @@
1299
1304
  "PRIMARY_TEXT": "#333",
1300
1305
  };
1301
1306
 
1302
- /* src/XAxis.svelte generated by Svelte v3.48.0 */
1307
+ /* src/XAxis.svelte generated by Svelte v3.50.1 */
1303
1308
 
1304
1309
  function get_each_context$5(ctx, list, i) {
1305
1310
  const child_ctx = ctx.slice();
@@ -1679,7 +1684,7 @@
1679
1684
  }
1680
1685
  }
1681
1686
 
1682
- /* src/YAxis.svelte generated by Svelte v3.48.0 */
1687
+ /* src/YAxis.svelte generated by Svelte v3.50.1 */
1683
1688
 
1684
1689
  function get_each_context$4(ctx, list, i) {
1685
1690
  const child_ctx = ctx.slice();
@@ -1792,7 +1797,6 @@
1792
1797
  let t;
1793
1798
  let text_1_x_value;
1794
1799
  let text_1_y_value;
1795
- let text_1_dy_value;
1796
1800
 
1797
1801
  return {
1798
1802
  c() {
@@ -1813,7 +1817,7 @@
1813
1817
  attr(text_1, "x", text_1_x_value = /*ticksX*/ ctx[3][0]);
1814
1818
  attr(text_1, "y", text_1_y_value = /*ty*/ ctx[26]);
1815
1819
  attr(text_1, "dx", /*dx*/ ctx[2]);
1816
- attr(text_1, "dy", text_1_dy_value = 0);
1820
+ attr(text_1, "dy", 0);
1817
1821
  attr(text_1, "transform", /*transform*/ ctx[6]);
1818
1822
  set_style(text_1, "background", "red");
1819
1823
  attr(text_1, "class", "mdaplot__axis-labels");
@@ -2065,7 +2069,7 @@
2065
2069
  }
2066
2070
  }
2067
2071
 
2068
- /* src/Rectangles.svelte generated by Svelte v3.48.0 */
2072
+ /* src/Rectangles.svelte generated by Svelte v3.50.1 */
2069
2073
 
2070
2074
  function get_each_context$3(ctx, list, i) {
2071
2075
  const child_ctx = ctx.slice();
@@ -2361,7 +2365,7 @@
2361
2365
  }
2362
2366
  }
2363
2367
 
2364
- /* src/Box.svelte generated by Svelte v3.48.0 */
2368
+ /* src/Box.svelte generated by Svelte v3.50.1 */
2365
2369
 
2366
2370
  function create_if_block$5(ctx) {
2367
2371
  let g;
@@ -2528,7 +2532,7 @@
2528
2532
  }
2529
2533
  }
2530
2534
 
2531
- /* src/Segments.svelte generated by Svelte v3.48.0 */
2535
+ /* src/Segments.svelte generated by Svelte v3.50.1 */
2532
2536
 
2533
2537
  function get_each_context$2(ctx, list, i) {
2534
2538
  const child_ctx = ctx.slice();
@@ -2795,7 +2799,7 @@
2795
2799
  }
2796
2800
  }
2797
2801
 
2798
- /* src/TextLabels.svelte generated by Svelte v3.48.0 */
2802
+ /* src/TextLabels.svelte generated by Svelte v3.50.1 */
2799
2803
 
2800
2804
  function add_css$2(target) {
2801
2805
  append_styles(target, "svelte-1xvrp9d", "text.svelte-1xvrp9d,text.svelte-1xvrp9d>tspan{dominant-baseline:middle}");
@@ -2885,14 +2889,13 @@
2885
2889
  function create_each_block$1(ctx) {
2886
2890
  let text_1;
2887
2891
  let raw_value = /*labels*/ ctx[0][/*i*/ ctx[29]] + "";
2888
- let text_1_data_id_value;
2889
2892
  let text_1_x_value;
2890
2893
  let text_1_y_value;
2891
2894
 
2892
2895
  return {
2893
2896
  c() {
2894
2897
  text_1 = svg_element("text");
2895
- attr(text_1, "data-id", text_1_data_id_value = /*i*/ ctx[29]);
2898
+ attr(text_1, "data-id", /*i*/ ctx[29]);
2896
2899
  attr(text_1, "x", text_1_x_value = /*x*/ ctx[7][/*i*/ ctx[29]]);
2897
2900
  attr(text_1, "y", text_1_y_value = /*y*/ ctx[6][/*i*/ ctx[29]]);
2898
2901
  attr(text_1, "dx", /*dx*/ ctx[5]);
@@ -3118,7 +3121,7 @@
3118
3121
  }
3119
3122
  }
3120
3123
 
3121
- /* src/TextLegend.svelte generated by Svelte v3.48.0 */
3124
+ /* src/TextLegend.svelte generated by Svelte v3.50.1 */
3122
3125
 
3123
3126
  function get_each_context(ctx, list, i) {
3124
3127
  const child_ctx = ctx.slice();
@@ -3442,7 +3445,7 @@
3442
3445
  return x.slice(1).map( (y, i) => (y - x[i]));
3443
3446
  }
3444
3447
 
3445
- /* src/BarSeries.svelte generated by Svelte v3.48.0 */
3448
+ /* src/BarSeries.svelte generated by Svelte v3.50.1 */
3446
3449
 
3447
3450
  function add_css$1(target) {
3448
3451
  append_styles(target, "svelte-kw726w", ".series_bar > rect{stroke-width:1px}.series_bar > rect:hover{opacity:90%}");
@@ -3610,7 +3613,7 @@
3610
3613
  }
3611
3614
  }
3612
3615
 
3613
- /* src/ScatterSeries.svelte generated by Svelte v3.48.0 */
3616
+ /* src/ScatterSeries.svelte generated by Svelte v3.50.1 */
3614
3617
 
3615
3618
  function add_css(target) {
3616
3619
  append_styles(target, "svelte-byxua3", ".series_scatter > text{font-size:1em;cursor:default}.series_scatter > text:hover{opacity:90%}.series_scatter > *:hover + .labels_hover{visibility:visible;opacity:1}");
@@ -3777,7 +3780,7 @@
3777
3780
  }
3778
3781
  }
3779
3782
 
3780
- /* src/LineSeries.svelte generated by Svelte v3.48.0 */
3783
+ /* src/LineSeries.svelte generated by Svelte v3.50.1 */
3781
3784
 
3782
3785
  function create_if_block$1(ctx) {
3783
3786
  let g;
@@ -3968,7 +3971,7 @@
3968
3971
  }
3969
3972
  }
3970
3973
 
3971
- /* src/AreaSeries.svelte generated by Svelte v3.48.0 */
3974
+ /* src/AreaSeries.svelte generated by Svelte v3.50.1 */
3972
3975
 
3973
3976
  function create_if_block(ctx) {
3974
3977
  let g;
package/dist/index.mjs CHANGED
@@ -102,6 +102,7 @@ function get_root_for_style(node) {
102
102
  }
103
103
  function append_stylesheet(node, style) {
104
104
  append(node.head || node, style);
105
+ return style.sheet;
105
106
  }
106
107
  function insert(target, node, anchor) {
107
108
  target.insertBefore(node, anchor || null);
@@ -318,6 +319,9 @@ function transition_out(block, local, detach, callback) {
318
319
  });
319
320
  block.o(local);
320
321
  }
322
+ else if (callback) {
323
+ callback();
324
+ }
321
325
  }
322
326
  function create_component(block) {
323
327
  block && block.c();
@@ -496,10 +500,10 @@ function writable(value, start = noop) {
496
500
  return { set, update, subscribe };
497
501
  }
498
502
 
499
- /* src/Axes.svelte generated by Svelte v3.48.0 */
503
+ /* src/Axes.svelte generated by Svelte v3.50.1 */
500
504
 
501
505
  function add_css$3(target) {
502
- append_styles(target, "svelte-n80kcc", ".plot{font-family:Arial, Helvetica, sans-serif;display:grid;grid-template-columns:min-content 1fr;grid-template-rows:auto 1fr auto;grid-template-areas:\". title\"\n \"ylab axes\"\n \". xlab\";box-sizing:border-box;background:#fefefe;min-width:100px;min-height:50px;width:100%;height:100%;padding:0;margin:0}.plot_small{font-size:11px}.plot_medium{font-size:13px}.plot_large{font-size:16px}.plot_error{display:flex}.plot_error > .axes-wrapper{display:none}.message_error{font-size:1.2em;color:crimson;padding:20px;text-align:center}.axes-wrapper.svelte-n80kcc{grid-area:axes;position:relative;box-sizing:border-box;display:flex;width:100%;height:100%;padding:0;margin:0}.axes{display:block;box-sizing:border-box;position:absolute;padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes__xlabel{grid-area:xlab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center}.axes__ylabel{grid-area:ylab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center;vertical-align:middle;display:flex}.axes__ylabel > span{width:1.5em;line-height:1.5em;display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}.axes__title{background:transparent;grid-area:title;font-size:1.3em;font-weight:bold;line-height:1.2em;padding:0.5em 0;text-align:center}.axis-labels{fill:#303030;font-size:0.95em}.labels{fill:#606060;font-size:0.90em}.labels{visibility:hidden;transition:visibility 0.25s linear, opacity 0.25s linear;opacity:0}");
506
+ append_styles(target, "svelte-11hqgob", ".plot{font-family:Arial, Helvetica, sans-serif;display:grid;grid-template-columns:min-content 1fr;grid-template-rows:auto 1fr auto;grid-template-areas:\". title\"\n \"ylab axes\"\n \". xlab\";box-sizing:border-box;background:#fefefe;min-width:100px;min-height:50px;width:100%;height:100%;padding:0;margin:0}.plot_small{font-size:11px}.plot_medium{font-size:13px}.plot_large{font-size:16px}.plot_error{display:flex}.plot_error > .axes-wrapper{display:none}.message_error{font-size:1.2em;color:crimson;padding:20px;text-align:center}.axes-wrapper.svelte-11hqgob{grid-area:axes;position:relative;box-sizing:border-box;display:flex;width:100%;height:100%;padding:0;margin:0}.axes{display:block;box-sizing:border-box;position:absolute;padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes-content{padding:0;margin:0;height:100%;width:100%;max-height:100%;max-width:100%;min-height:100%;min-width:100%}.axes__xlabel{grid-area:xlab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center}.axes__ylabel{grid-area:ylab;font-size:1.0em;font-weight:600;padding:0.25em;text-align:center;vertical-align:middle;display:flex}.axes__ylabel > span{width:1.5em;line-height:1.5em;display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}.axes__title{background:transparent;grid-area:title;font-size:1.3em;font-weight:bold;line-height:1.2em;padding:0.5em 0;text-align:center}.axis-labels{fill:#303030;font-size:0.95em}.labels{fill:#606060;font-size:0.90em}.labels{visibility:hidden;transition:visibility 0.25s linear, opacity 0.25s linear;opacity:0}");
503
507
  }
504
508
 
505
509
  const get_box_slot_changes = dirty => ({});
@@ -660,11 +664,12 @@ function create_fragment$b(ctx) {
660
664
  attr(rect, "width", rect_width_value = /*cpx*/ ctx[8][1] - /*cpx*/ ctx[8][0]);
661
665
  attr(rect, "height", rect_height_value = /*cpy*/ ctx[7][0] - /*cpy*/ ctx[7][1]);
662
666
  attr(clipPath, "id", /*clipPathID*/ ctx[9]);
667
+ attr(g, "class", "axes-content");
663
668
  attr(g, "clip-path", "url(#" + /*clipPathID*/ ctx[9] + ")");
664
669
  attr(svg, "preserveAspectRatio", "none");
665
670
  attr(svg, "class", "axes");
666
- attr(div0, "class", "axes-wrapper svelte-n80kcc");
667
- attr(div1, "class", div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-n80kcc");
671
+ attr(div0, "class", "axes-wrapper svelte-11hqgob");
672
+ attr(div1, "class", div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-11hqgob");
668
673
  toggle_class(div1, "plot_error", !/*$isOk*/ ctx[3]);
669
674
  },
670
675
  m(target, anchor) {
@@ -837,11 +842,11 @@ function create_fragment$b(ctx) {
837
842
  if_block3 = null;
838
843
  }
839
844
 
840
- if (!current || dirty[0] & /*$scale*/ 16 && div1_class_value !== (div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-n80kcc")) {
845
+ if (!current || dirty[0] & /*$scale*/ 16 && div1_class_value !== (div1_class_value = "plot " + ('plot_' + /*$scale*/ ctx[4]) + " svelte-11hqgob")) {
841
846
  attr(div1, "class", div1_class_value);
842
847
  }
843
848
 
844
- if (dirty[0] & /*$scale, $isOk*/ 24) {
849
+ if (!current || dirty[0] & /*$scale, $isOk*/ 24) {
845
850
  toggle_class(div1, "plot_error", !/*$isOk*/ ctx[3]);
846
851
  }
847
852
  },
@@ -1293,7 +1298,7 @@ const Colors = {
1293
1298
  "PRIMARY_TEXT": "#333",
1294
1299
  };
1295
1300
 
1296
- /* src/XAxis.svelte generated by Svelte v3.48.0 */
1301
+ /* src/XAxis.svelte generated by Svelte v3.50.1 */
1297
1302
 
1298
1303
  function get_each_context$5(ctx, list, i) {
1299
1304
  const child_ctx = ctx.slice();
@@ -1673,7 +1678,7 @@ class XAxis extends SvelteComponent {
1673
1678
  }
1674
1679
  }
1675
1680
 
1676
- /* src/YAxis.svelte generated by Svelte v3.48.0 */
1681
+ /* src/YAxis.svelte generated by Svelte v3.50.1 */
1677
1682
 
1678
1683
  function get_each_context$4(ctx, list, i) {
1679
1684
  const child_ctx = ctx.slice();
@@ -1786,7 +1791,6 @@ function create_each_block$4(ctx) {
1786
1791
  let t;
1787
1792
  let text_1_x_value;
1788
1793
  let text_1_y_value;
1789
- let text_1_dy_value;
1790
1794
 
1791
1795
  return {
1792
1796
  c() {
@@ -1807,7 +1811,7 @@ function create_each_block$4(ctx) {
1807
1811
  attr(text_1, "x", text_1_x_value = /*ticksX*/ ctx[3][0]);
1808
1812
  attr(text_1, "y", text_1_y_value = /*ty*/ ctx[26]);
1809
1813
  attr(text_1, "dx", /*dx*/ ctx[2]);
1810
- attr(text_1, "dy", text_1_dy_value = 0);
1814
+ attr(text_1, "dy", 0);
1811
1815
  attr(text_1, "transform", /*transform*/ ctx[6]);
1812
1816
  set_style(text_1, "background", "red");
1813
1817
  attr(text_1, "class", "mdaplot__axis-labels");
@@ -2059,7 +2063,7 @@ class YAxis extends SvelteComponent {
2059
2063
  }
2060
2064
  }
2061
2065
 
2062
- /* src/Rectangles.svelte generated by Svelte v3.48.0 */
2066
+ /* src/Rectangles.svelte generated by Svelte v3.50.1 */
2063
2067
 
2064
2068
  function get_each_context$3(ctx, list, i) {
2065
2069
  const child_ctx = ctx.slice();
@@ -2355,7 +2359,7 @@ class Rectangles extends SvelteComponent {
2355
2359
  }
2356
2360
  }
2357
2361
 
2358
- /* src/Box.svelte generated by Svelte v3.48.0 */
2362
+ /* src/Box.svelte generated by Svelte v3.50.1 */
2359
2363
 
2360
2364
  function create_if_block$5(ctx) {
2361
2365
  let g;
@@ -2522,7 +2526,7 @@ class Box extends SvelteComponent {
2522
2526
  }
2523
2527
  }
2524
2528
 
2525
- /* src/Segments.svelte generated by Svelte v3.48.0 */
2529
+ /* src/Segments.svelte generated by Svelte v3.50.1 */
2526
2530
 
2527
2531
  function get_each_context$2(ctx, list, i) {
2528
2532
  const child_ctx = ctx.slice();
@@ -2789,7 +2793,7 @@ class Segments extends SvelteComponent {
2789
2793
  }
2790
2794
  }
2791
2795
 
2792
- /* src/TextLabels.svelte generated by Svelte v3.48.0 */
2796
+ /* src/TextLabels.svelte generated by Svelte v3.50.1 */
2793
2797
 
2794
2798
  function add_css$2(target) {
2795
2799
  append_styles(target, "svelte-1xvrp9d", "text.svelte-1xvrp9d,text.svelte-1xvrp9d>tspan{dominant-baseline:middle}");
@@ -2879,14 +2883,13 @@ function create_if_block$3(ctx) {
2879
2883
  function create_each_block$1(ctx) {
2880
2884
  let text_1;
2881
2885
  let raw_value = /*labels*/ ctx[0][/*i*/ ctx[29]] + "";
2882
- let text_1_data_id_value;
2883
2886
  let text_1_x_value;
2884
2887
  let text_1_y_value;
2885
2888
 
2886
2889
  return {
2887
2890
  c() {
2888
2891
  text_1 = svg_element("text");
2889
- attr(text_1, "data-id", text_1_data_id_value = /*i*/ ctx[29]);
2892
+ attr(text_1, "data-id", /*i*/ ctx[29]);
2890
2893
  attr(text_1, "x", text_1_x_value = /*x*/ ctx[7][/*i*/ ctx[29]]);
2891
2894
  attr(text_1, "y", text_1_y_value = /*y*/ ctx[6][/*i*/ ctx[29]]);
2892
2895
  attr(text_1, "dx", /*dx*/ ctx[5]);
@@ -3112,7 +3115,7 @@ class TextLabels extends SvelteComponent {
3112
3115
  }
3113
3116
  }
3114
3117
 
3115
- /* src/TextLegend.svelte generated by Svelte v3.48.0 */
3118
+ /* src/TextLegend.svelte generated by Svelte v3.50.1 */
3116
3119
 
3117
3120
  function get_each_context(ctx, list, i) {
3118
3121
  const child_ctx = ctx.slice();
@@ -3436,7 +3439,7 @@ function diff(x) {
3436
3439
  return x.slice(1).map( (y, i) => (y - x[i]));
3437
3440
  }
3438
3441
 
3439
- /* src/BarSeries.svelte generated by Svelte v3.48.0 */
3442
+ /* src/BarSeries.svelte generated by Svelte v3.50.1 */
3440
3443
 
3441
3444
  function add_css$1(target) {
3442
3445
  append_styles(target, "svelte-kw726w", ".series_bar > rect{stroke-width:1px}.series_bar > rect:hover{opacity:90%}");
@@ -3604,7 +3607,7 @@ class BarSeries extends SvelteComponent {
3604
3607
  }
3605
3608
  }
3606
3609
 
3607
- /* src/ScatterSeries.svelte generated by Svelte v3.48.0 */
3610
+ /* src/ScatterSeries.svelte generated by Svelte v3.50.1 */
3608
3611
 
3609
3612
  function add_css(target) {
3610
3613
  append_styles(target, "svelte-byxua3", ".series_scatter > text{font-size:1em;cursor:default}.series_scatter > text:hover{opacity:90%}.series_scatter > *:hover + .labels_hover{visibility:visible;opacity:1}");
@@ -3771,7 +3774,7 @@ class ScatterSeries extends SvelteComponent {
3771
3774
  }
3772
3775
  }
3773
3776
 
3774
- /* src/LineSeries.svelte generated by Svelte v3.48.0 */
3777
+ /* src/LineSeries.svelte generated by Svelte v3.50.1 */
3775
3778
 
3776
3779
  function create_if_block$1(ctx) {
3777
3780
  let g;
@@ -3962,7 +3965,7 @@ class LineSeries extends SvelteComponent {
3962
3965
  }
3963
3966
  }
3964
3967
 
3965
- /* src/AreaSeries.svelte generated by Svelte v3.48.0 */
3968
+ /* src/AreaSeries.svelte generated by Svelte v3.50.1 */
3966
3969
 
3967
3970
  function create_if_block(ctx) {
3968
3971
  let g;
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "dist"
26
26
  ],
27
27
  "description": "Svelte components for creating simple plots",
28
- "version": "1.1.1",
28
+ "version": "1.1.2",
29
29
  "repository": {
30
30
  "type": "git",
31
31
  "url": "svkucheryavski/svelte-plots-basic"
package/src/Axes.svelte CHANGED
@@ -359,7 +359,7 @@
359
359
  <slot name="yaxis"></slot>
360
360
 
361
361
  <!-- main plot content -->
362
- <g clip-path="url(#{clipPathID})">
362
+ <g class="axes-content" clip-path="url(#{clipPathID})">
363
363
  <slot></slot>
364
364
  </g>
365
365
 
@@ -456,6 +456,18 @@
456
456
  min-width: 100%;
457
457
  }
458
458
 
459
+ :global(.axes-content) {
460
+ padding: 0;
461
+ margin: 0;
462
+ height: 100%;
463
+ width: 100%;
464
+ max-height: 100%;
465
+ max-width: 100%;
466
+ min-height: 100%;
467
+ min-width: 100%;
468
+
469
+ }
470
+
459
471
  :global(.axes__xlabel) {
460
472
  grid-area: xlab;
461
473
  font-size: 1.0em;