@d3plus/core 3.0.15 → 3.0.16

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
@@ -5495,7 +5495,7 @@ An abstracted class for generating shapes.
5495
5495
 
5496
5496
 
5497
5497
 
5498
- <a name="Shape.render" href="#Shape.render">#</a> Shape.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L568)
5498
+ <a name="Shape.render" href="#Shape.render">#</a> Shape.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L567)
5499
5499
 
5500
5500
  Renders the current Shape to the page. If a *callback* is specified, it will be called once the shapes are done drawing.
5501
5501
 
@@ -5503,7 +5503,7 @@ Renders the current Shape to the page. If a *callback* is specified, it will be
5503
5503
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5504
5504
 
5505
5505
 
5506
- <a name="Shape.active" href="#Shape.active">#</a> Shape.**active**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L732)
5506
+ <a name="Shape.active" href="#Shape.active">#</a> Shape.**active**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L731)
5507
5507
 
5508
5508
  If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.
5509
5509
 
@@ -5511,7 +5511,7 @@ If *value* is specified, sets the highlight accessor to the specified function a
5511
5511
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5512
5512
 
5513
5513
 
5514
- <a name="Shape.activeOpacity" href="#Shape.activeOpacity">#</a> Shape.**activeOpacity**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L751)
5514
+ <a name="Shape.activeOpacity" href="#Shape.activeOpacity">#</a> Shape.**activeOpacity**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L750)
5515
5515
 
5516
5516
  When shapes are active, this is the opacity of any shape that is not active.
5517
5517
 
@@ -5519,7 +5519,7 @@ When shapes are active, this is the opacity of any shape that is not active.
5519
5519
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5520
5520
 
5521
5521
 
5522
- <a name="Shape.activeStyle" href="#Shape.activeStyle">#</a> Shape.**activeStyle**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L761)
5522
+ <a name="Shape.activeStyle" href="#Shape.activeStyle">#</a> Shape.**activeStyle**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L760)
5523
5523
 
5524
5524
  The style to apply to active shapes.
5525
5525
 
@@ -5527,7 +5527,7 @@ The style to apply to active shapes.
5527
5527
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5528
5528
 
5529
5529
 
5530
- <a name="Shape.ariaLabel" href="#Shape.ariaLabel">#</a> Shape.**ariaLabel**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L771)
5530
+ <a name="Shape.ariaLabel" href="#Shape.ariaLabel">#</a> Shape.**ariaLabel**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L770)
5531
5531
 
5532
5532
  If *value* is specified, sets the aria-label attribute to the specified function or string and returns the current class instance.
5533
5533
 
@@ -5535,7 +5535,7 @@ If *value* is specified, sets the aria-label attribute to the specified function
5535
5535
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5536
5536
 
5537
5537
 
5538
- <a name="Shape.backgroundImage" href="#Shape.backgroundImage">#</a> Shape.**backgroundImage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L783)
5538
+ <a name="Shape.backgroundImage" href="#Shape.backgroundImage">#</a> Shape.**backgroundImage**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L782)
5539
5539
 
5540
5540
  If *value* is specified, sets the background-image accessor to the specified function or string and returns the current class instance.
5541
5541
 
@@ -5543,7 +5543,7 @@ If *value* is specified, sets the background-image accessor to the specified fun
5543
5543
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5544
5544
 
5545
5545
 
5546
- <a name="Shape.data" href="#Shape.data">#</a> Shape.**data**([*data*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L795)
5546
+ <a name="Shape.data" href="#Shape.data">#</a> Shape.**data**([*data*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L794)
5547
5547
 
5548
5548
  If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array. A shape will be drawn for each object in the array.
5549
5549
 
@@ -5551,7 +5551,7 @@ If *data* is specified, sets the data array to the specified array and returns t
5551
5551
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5552
5552
 
5553
5553
 
5554
- <a name="Shape.discrete" href="#Shape.discrete">#</a> Shape.**discrete**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L807)
5554
+ <a name="Shape.discrete" href="#Shape.discrete">#</a> Shape.**discrete**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L806)
5555
5555
 
5556
5556
  Determines if either the X or Y position is discrete along a Line, which helps in determining the nearest data point on a line for a hit area event.
5557
5557
 
@@ -5559,7 +5559,7 @@ Determines if either the X or Y position is discrete along a Line, which helps i
5559
5559
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5560
5560
 
5561
5561
 
5562
- <a name="Shape.duration" href="#Shape.duration">#</a> Shape.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L817)
5562
+ <a name="Shape.duration" href="#Shape.duration">#</a> Shape.**duration**([*ms*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L816)
5563
5563
 
5564
5564
  If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.
5565
5565
 
@@ -5567,7 +5567,7 @@ If *ms* is specified, sets the animation duration to the specified number and re
5567
5567
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5568
5568
 
5569
5569
 
5570
- <a name="Shape.fill" href="#Shape.fill">#</a> Shape.**fill**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L829)
5570
+ <a name="Shape.fill" href="#Shape.fill">#</a> Shape.**fill**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L828)
5571
5571
 
5572
5572
  If *value* is specified, sets the fill accessor to the specified function or string and returns the current class instance.
5573
5573
 
@@ -5575,7 +5575,7 @@ If *value* is specified, sets the fill accessor to the specified function or str
5575
5575
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5576
5576
 
5577
5577
 
5578
- <a name="Shape.fillOpacity" href="#Shape.fillOpacity">#</a> Shape.**fillOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L841)
5578
+ <a name="Shape.fillOpacity" href="#Shape.fillOpacity">#</a> Shape.**fillOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L840)
5579
5579
 
5580
5580
  Defines the "fill-opacity" attribute for the shapes.
5581
5581
 
@@ -5583,7 +5583,7 @@ Defines the "fill-opacity" attribute for the shapes.
5583
5583
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5584
5584
 
5585
5585
 
5586
- <a name="Shape.hover" href="#Shape.hover">#</a> Shape.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L853)
5586
+ <a name="Shape.hover" href="#Shape.hover">#</a> Shape.**hover**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L852)
5587
5587
 
5588
5588
  If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.
5589
5589
 
@@ -5591,7 +5591,7 @@ If *value* is specified, sets the highlight accessor to the specified function a
5591
5591
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5592
5592
 
5593
5593
 
5594
- <a name="Shape.hoverStyle" href="#Shape.hoverStyle">#</a> Shape.**hoverStyle**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L872)
5594
+ <a name="Shape.hoverStyle" href="#Shape.hoverStyle">#</a> Shape.**hoverStyle**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L871)
5595
5595
 
5596
5596
  The style to apply to hovered shapes.
5597
5597
 
@@ -5599,7 +5599,7 @@ The style to apply to hovered shapes.
5599
5599
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5600
5600
 
5601
5601
 
5602
- <a name="Shape.hoverOpacity" href="#Shape.hoverOpacity">#</a> Shape.**hoverOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L882)
5602
+ <a name="Shape.hoverOpacity" href="#Shape.hoverOpacity">#</a> Shape.**hoverOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L881)
5603
5603
 
5604
5604
  If *value* is specified, sets the hover opacity to the specified function and returns the current class instance.
5605
5605
 
@@ -5607,7 +5607,7 @@ If *value* is specified, sets the hover opacity to the specified function and re
5607
5607
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5608
5608
 
5609
5609
 
5610
- <a name="Shape.hitArea" href="#Shape.hitArea">#</a> Shape.**hitArea**([*bounds*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L901)
5610
+ <a name="Shape.hitArea" href="#Shape.hitArea">#</a> Shape.**hitArea**([*bounds*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L900)
5611
5611
 
5612
5612
  If *bounds* is specified, sets the mouse hit area to the specified function and returns the current class instance. If *bounds* is not specified, returns the current mouse hit area accessor.
5613
5613
 
@@ -5627,7 +5627,7 @@ function(d, i, shape) {
5627
5627
  ```
5628
5628
 
5629
5629
 
5630
- <a name="Shape.id" href="#Shape.id">#</a> Shape.**id**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L911)
5630
+ <a name="Shape.id" href="#Shape.id">#</a> Shape.**id**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L910)
5631
5631
 
5632
5632
  If *value* is specified, sets the id accessor to the specified function and returns the current class instance.
5633
5633
 
@@ -5635,7 +5635,7 @@ If *value* is specified, sets the id accessor to the specified function and retu
5635
5635
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5636
5636
 
5637
5637
 
5638
- <a name="Shape.label" href="#Shape.label">#</a> Shape.**label**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L921)
5638
+ <a name="Shape.label" href="#Shape.label">#</a> Shape.**label**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L920)
5639
5639
 
5640
5640
  If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance.
5641
5641
 
@@ -5643,7 +5643,7 @@ If *value* is specified, sets the label accessor to the specified function or st
5643
5643
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5644
5644
 
5645
5645
 
5646
- <a name="Shape.labelBounds" href="#Shape.labelBounds">#</a> Shape.**labelBounds**([*bounds*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L940)
5646
+ <a name="Shape.labelBounds" href="#Shape.labelBounds">#</a> Shape.**labelBounds**([*bounds*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L939)
5647
5647
 
5648
5648
  If *bounds* is specified, sets the label bounds to the specified function and returns the current class instance. If *bounds* is not specified, returns the current inner bounds accessor.
5649
5649
 
@@ -5663,7 +5663,7 @@ function(d, i, shape) {
5663
5663
  ```
5664
5664
 
5665
5665
 
5666
- <a name="Shape.labelConfig" href="#Shape.labelConfig">#</a> Shape.**labelConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L950)
5666
+ <a name="Shape.labelConfig" href="#Shape.labelConfig">#</a> Shape.**labelConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L949)
5667
5667
 
5668
5668
  A pass-through to the config method of the TextBox class used to create a shape's labels.
5669
5669
 
@@ -5671,7 +5671,7 @@ A pass-through to the config method of the TextBox class used to create a shape'
5671
5671
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5672
5672
 
5673
5673
 
5674
- <a name="Shape.opacity" href="#Shape.opacity">#</a> Shape.**opacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L960)
5674
+ <a name="Shape.opacity" href="#Shape.opacity">#</a> Shape.**opacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L959)
5675
5675
 
5676
5676
  If *value* is specified, sets the opacity accessor to the specified function or number and returns the current class instance.
5677
5677
 
@@ -5679,7 +5679,7 @@ If *value* is specified, sets the opacity accessor to the specified function or
5679
5679
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5680
5680
 
5681
5681
 
5682
- <a name="Shape.pointerEvents" href="#Shape.pointerEvents">#</a> Shape.**pointerEvents**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L970)
5682
+ <a name="Shape.pointerEvents" href="#Shape.pointerEvents">#</a> Shape.**pointerEvents**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L969)
5683
5683
 
5684
5684
  If *value* is specified, sets the pointerEvents accessor to the specified function or string and returns the current class instance.
5685
5685
 
@@ -5687,7 +5687,7 @@ If *value* is specified, sets the pointerEvents accessor to the specified functi
5687
5687
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5688
5688
 
5689
5689
 
5690
- <a name="Shape.role" href="#Shape.role">#</a> Shape.**role**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L980)
5690
+ <a name="Shape.role" href="#Shape.role">#</a> Shape.**role**(*value*) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L979)
5691
5691
 
5692
5692
  If *value* is specified, sets the role attribute to the specified function or string and returns the current class instance.
5693
5693
 
@@ -5695,7 +5695,7 @@ If *value* is specified, sets the role attribute to the specified function or st
5695
5695
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5696
5696
 
5697
5697
 
5698
- <a name="Shape.rotate" href="#Shape.rotate">#</a> Shape.**rotate**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L992)
5698
+ <a name="Shape.rotate" href="#Shape.rotate">#</a> Shape.**rotate**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L991)
5699
5699
 
5700
5700
  If *value* is specified, sets the rotate accessor to the specified function or number and returns the current class instance.
5701
5701
 
@@ -5703,7 +5703,7 @@ If *value* is specified, sets the rotate accessor to the specified function or n
5703
5703
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5704
5704
 
5705
5705
 
5706
- <a name="Shape.rx" href="#Shape.rx">#</a> Shape.**rx**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1002)
5706
+ <a name="Shape.rx" href="#Shape.rx">#</a> Shape.**rx**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1001)
5707
5707
 
5708
5708
  Defines the "rx" attribute for the shapes.
5709
5709
 
@@ -5711,7 +5711,7 @@ Defines the "rx" attribute for the shapes.
5711
5711
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5712
5712
 
5713
5713
 
5714
- <a name="Shape.ry" href="#Shape.ry">#</a> Shape.**ry**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1012)
5714
+ <a name="Shape.ry" href="#Shape.ry">#</a> Shape.**ry**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1011)
5715
5715
 
5716
5716
  Defines the "rx" attribute for the shapes.
5717
5717
 
@@ -5719,7 +5719,7 @@ Defines the "rx" attribute for the shapes.
5719
5719
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5720
5720
 
5721
5721
 
5722
- <a name="Shape.scale" href="#Shape.scale">#</a> Shape.**scale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1022)
5722
+ <a name="Shape.scale" href="#Shape.scale">#</a> Shape.**scale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1021)
5723
5723
 
5724
5724
  If *value* is specified, sets the scale accessor to the specified function or string and returns the current class instance.
5725
5725
 
@@ -5727,7 +5727,7 @@ If *value* is specified, sets the scale accessor to the specified function or st
5727
5727
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5728
5728
 
5729
5729
 
5730
- <a name="Shape.select" href="#Shape.select">#</a> Shape.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1032)
5730
+ <a name="Shape.select" href="#Shape.select">#</a> Shape.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1031)
5731
5731
 
5732
5732
  If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.
5733
5733
 
@@ -5735,7 +5735,7 @@ If *selector* is specified, sets the SVG container element to the specified d3 s
5735
5735
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5736
5736
 
5737
5737
 
5738
- <a name="Shape.shapeRendering" href="#Shape.shapeRendering">#</a> Shape.**shapeRendering**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1046)
5738
+ <a name="Shape.shapeRendering" href="#Shape.shapeRendering">#</a> Shape.**shapeRendering**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1045)
5739
5739
 
5740
5740
  If *value* is specified, sets the shape-rendering accessor to the specified function or string and returns the current class instance.
5741
5741
 
@@ -5750,7 +5750,7 @@ function(d) {
5750
5750
  ```
5751
5751
 
5752
5752
 
5753
- <a name="Shape.sort" href="#Shape.sort">#</a> Shape.**sort**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1056)
5753
+ <a name="Shape.sort" href="#Shape.sort">#</a> Shape.**sort**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1055)
5754
5754
 
5755
5755
  If *value* is specified, sets the sort comparator to the specified function and returns the current class instance.
5756
5756
 
@@ -5758,7 +5758,7 @@ If *value* is specified, sets the sort comparator to the specified function and
5758
5758
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5759
5759
 
5760
5760
 
5761
- <a name="Shape.stroke" href="#Shape.stroke">#</a> Shape.**stroke**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1066)
5761
+ <a name="Shape.stroke" href="#Shape.stroke">#</a> Shape.**stroke**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1065)
5762
5762
 
5763
5763
  If *value* is specified, sets the stroke accessor to the specified function or string and returns the current class instance.
5764
5764
 
@@ -5766,7 +5766,7 @@ If *value* is specified, sets the stroke accessor to the specified function or s
5766
5766
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5767
5767
 
5768
5768
 
5769
- <a name="Shape.strokeDasharray" href="#Shape.strokeDasharray">#</a> Shape.**strokeDasharray**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1076)
5769
+ <a name="Shape.strokeDasharray" href="#Shape.strokeDasharray">#</a> Shape.**strokeDasharray**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1075)
5770
5770
 
5771
5771
  Defines the "stroke-dasharray" attribute for the shapes.
5772
5772
 
@@ -5774,7 +5774,7 @@ Defines the "stroke-dasharray" attribute for the shapes.
5774
5774
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5775
5775
 
5776
5776
 
5777
- <a name="Shape.strokeLinecap" href="#Shape.strokeLinecap">#</a> Shape.**strokeLinecap**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1086)
5777
+ <a name="Shape.strokeLinecap" href="#Shape.strokeLinecap">#</a> Shape.**strokeLinecap**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1085)
5778
5778
 
5779
5779
  Defines the "stroke-linecap" attribute for the shapes. Accepted values are `"butt"`, `"round"`, and `"square"`.
5780
5780
 
@@ -5782,7 +5782,7 @@ Defines the "stroke-linecap" attribute for the shapes. Accepted values are `"but
5782
5782
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5783
5783
 
5784
5784
 
5785
- <a name="Shape.strokeOpacity" href="#Shape.strokeOpacity">#</a> Shape.**strokeOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1096)
5785
+ <a name="Shape.strokeOpacity" href="#Shape.strokeOpacity">#</a> Shape.**strokeOpacity**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1095)
5786
5786
 
5787
5787
  Defines the "stroke-opacity" attribute for the shapes.
5788
5788
 
@@ -5790,7 +5790,7 @@ Defines the "stroke-opacity" attribute for the shapes.
5790
5790
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5791
5791
 
5792
5792
 
5793
- <a name="Shape.strokeWidth" href="#Shape.strokeWidth">#</a> Shape.**strokeWidth**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1106)
5793
+ <a name="Shape.strokeWidth" href="#Shape.strokeWidth">#</a> Shape.**strokeWidth**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1105)
5794
5794
 
5795
5795
  If *value* is specified, sets the stroke-width accessor to the specified function or string and returns the current class instance.
5796
5796
 
@@ -5798,7 +5798,7 @@ If *value* is specified, sets the stroke-width accessor to the specified functio
5798
5798
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5799
5799
 
5800
5800
 
5801
- <a name="Shape.textAnchor" href="#Shape.textAnchor">#</a> Shape.**textAnchor**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1116)
5801
+ <a name="Shape.textAnchor" href="#Shape.textAnchor">#</a> Shape.**textAnchor**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1115)
5802
5802
 
5803
5803
  If *value* is specified, sets the text-anchor accessor to the specified function or string and returns the current class instance.
5804
5804
 
@@ -5806,7 +5806,7 @@ If *value* is specified, sets the text-anchor accessor to the specified function
5806
5806
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5807
5807
 
5808
5808
 
5809
- <a name="Shape.texture" href="#Shape.texture">#</a> Shape.**texture**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1126)
5809
+ <a name="Shape.texture" href="#Shape.texture">#</a> Shape.**texture**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1125)
5810
5810
 
5811
5811
  Defines the texture used inside of each shape. This uses the [textures.js](https://riccardoscalco.it/textures/) package, and expects either a simple string (`"lines"` or `"circles"`) or a more complex Object containing the various properties of the texture (ie. `{texture: "lines", orientation: "3/8", stroke: "darkorange"}`). If multiple textures are necessary, provide an accsesor Function that returns the correct String/Object for each given data point and index.
5812
5812
 
@@ -5814,7 +5814,7 @@ Defines the texture used inside of each shape. This uses the [textures.js](https
5814
5814
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5815
5815
 
5816
5816
 
5817
- <a name="Shape.textureDefault" href="#Shape.textureDefault">#</a> Shape.**textureDefault**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1136)
5817
+ <a name="Shape.textureDefault" href="#Shape.textureDefault">#</a> Shape.**textureDefault**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1135)
5818
5818
 
5819
5819
  A series of global texture methods to be used for all textures (ie. `{stroke: "darkorange", strokeWidth: 2}`).
5820
5820
 
@@ -5822,7 +5822,7 @@ A series of global texture methods to be used for all textures (ie. `{stroke: "d
5822
5822
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5823
5823
 
5824
5824
 
5825
- <a name="Shape.vectorEffect" href="#Shape.vectorEffect">#</a> Shape.**vectorEffect**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1146)
5825
+ <a name="Shape.vectorEffect" href="#Shape.vectorEffect">#</a> Shape.**vectorEffect**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1145)
5826
5826
 
5827
5827
  If *value* is specified, sets the vector-effect accessor to the specified function or string and returns the current class instance.
5828
5828
 
@@ -5830,7 +5830,7 @@ If *value* is specified, sets the vector-effect accessor to the specified functi
5830
5830
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5831
5831
 
5832
5832
 
5833
- <a name="Shape.verticalAlign" href="#Shape.verticalAlign">#</a> Shape.**verticalAlign**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1156)
5833
+ <a name="Shape.verticalAlign" href="#Shape.verticalAlign">#</a> Shape.**verticalAlign**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1155)
5834
5834
 
5835
5835
  If *value* is specified, sets the vertical alignment accessor to the specified function or string and returns the current class instance.
5836
5836
 
@@ -5838,7 +5838,7 @@ If *value* is specified, sets the vertical alignment accessor to the specified f
5838
5838
  This is a static method of [<code>Shape</code>](#Shape), and is chainable with other methods of this Class.
5839
5839
 
5840
5840
 
5841
- <a name="Shape.x" href="#Shape.x">#</a> Shape.**x**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1170)
5841
+ <a name="Shape.x" href="#Shape.x">#</a> Shape.**x**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1169)
5842
5842
 
5843
5843
  If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance.
5844
5844
 
@@ -5853,7 +5853,7 @@ function(d) {
5853
5853
  ```
5854
5854
 
5855
5855
 
5856
- <a name="Shape.y" href="#Shape.y">#</a> Shape.**y**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1184)
5856
+ <a name="Shape.y" href="#Shape.y">#</a> Shape.**y**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/shapes/Shape.js#L1183)
5857
5857
 
5858
5858
  If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance.
5859
5859
 
@@ -1345,7 +1345,7 @@ If *data* is not specified, this method returns the current primary data array,
1345
1345
  value: function hover(_) {
1346
1346
  var _this = this;
1347
1347
  var hoverFunction = this._hover = _;
1348
- if (this._shapeConfig.hoverOpacity !== 1) {
1348
+ if (this._shapeConfig.hoverOpacity !== 1 && _ !== undefined) {
1349
1349
  if (typeof _ === "function") {
1350
1350
  var shapeData = arrayMerge(this._shapes.map(function(s) {
1351
1351
  return s.data();
@@ -104,7 +104,7 @@ import { accessor, BaseClass, configPrep, constant } from "../utils/index.js";
104
104
  }
105
105
  }
106
106
  }
107
- return 0; // Return -1 if no element is found with the class
107
+ return -1; // Return -1 if no element is found with the class
108
108
  }
109
109
  import Image from "./Image.js";
110
110
  var Shape = /*#__PURE__*/ function(BaseClass) {
@@ -420,8 +420,6 @@ var Shape = /*#__PURE__*/ function(BaseClass) {
420
420
  this._group.selectAll("g.d3plus-".concat(this._name, "-shape, g.d3plus-").concat(this._name, "-image, g.d3plus-").concat(this._name, "-text, g.d3plus-").concat(this._name, "-hover")).selectAll(".d3plus-Shape, .d3plus-Image, .d3plus-textBox").each(function(d, i) {
421
421
  if (!d) d = {};
422
422
  if (!d.parentNode) d.parentNode = this.parentNode;
423
- if (!d.dataIndex) d.dataIndex = i;
424
- var dataIndex = d.dataIndex;
425
423
  var parent = d.parentNode;
426
424
  var d3plusType = select(this).classed("d3plus-textBox") ? "textBox" : select(this).classed("d3plus-Image") ? "Image" : "Shape";
427
425
  if (d3plusType === "textBox") d = d.data;
@@ -434,13 +432,15 @@ var Shape = /*#__PURE__*/ function(BaseClass) {
434
432
  var notHovering = !that._hover || typeof that._hover !== "function" || !that._hover(d, i);
435
433
  var group = notHovering ? parent : that._hoverGroup.node();
436
434
  if (group !== this.parentNode) {
437
- var offset = d3plusType === "textBox" ? findLastIndexWithClass(group.childNodes, [
435
+ var afterIndex = d3plusType === "textBox" ? findLastIndexWithClass(group.childNodes, [
438
436
  "d3plus-Image",
439
437
  "d3plus-Shape"
440
438
  ]) : d3plusType === "Image" ? findLastIndexWithClass(group.childNodes, [
441
439
  "d3plus-Shape"
442
- ]) : 0;
443
- group.insertBefore(this, group.childNodes[offset + dataIndex]);
440
+ ]) : -1;
441
+ if (notHovering) group.appendChild(this);
442
+ else if (afterIndex === -1) group.prepend(this);
443
+ else group.childNodes[afterIndex].after(this);
444
444
  }
445
445
  if (this.className.baseVal.includes("d3plus-Shape")) {
446
446
  if (parent === group) select(this).call(that._applyStyle.bind(that));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d3plus/core",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "description": "Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,13 +34,13 @@
34
34
  "test": "eslint index.js src/**/*.js && eslint --global=it test && mocha 'test/**/*-test.js'"
35
35
  },
36
36
  "dependencies": {
37
- "@d3plus/color": "3.0.15",
38
- "@d3plus/data": "3.0.15",
39
- "@d3plus/dom": "3.0.15",
40
- "@d3plus/format": "3.0.15",
41
- "@d3plus/locales": "3.0.15",
42
- "@d3plus/math": "3.0.15",
43
- "@d3plus/text": "3.0.15",
37
+ "@d3plus/color": "3.0.16",
38
+ "@d3plus/data": "3.0.16",
39
+ "@d3plus/dom": "3.0.16",
40
+ "@d3plus/format": "3.0.16",
41
+ "@d3plus/locales": "3.0.16",
42
+ "@d3plus/math": "3.0.16",
43
+ "@d3plus/text": "3.0.16",
44
44
  "@popperjs/core": "^2.11.8",
45
45
  "d3-array": "^3.2.4",
46
46
  "d3-brush": "^3.0.0",
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/core v3.0.15
2
+ @d3plus/core v3.0.16
3
3
  Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.
4
4
  Copyright (c) 2026 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -23490,7 +23490,7 @@
23490
23490
  }
23491
23491
  }
23492
23492
  }
23493
- return 0; // Return -1 if no element is found with the class
23493
+ return -1; // Return -1 if no element is found with the class
23494
23494
  }
23495
23495
  class Shape extends BaseClass {
23496
23496
  /**
@@ -23687,8 +23687,6 @@
23687
23687
  this._group.selectAll(`g.d3plus-${this._name}-shape, g.d3plus-${this._name}-image, g.d3plus-${this._name}-text, g.d3plus-${this._name}-hover`).selectAll(".d3plus-Shape, .d3plus-Image, .d3plus-textBox").each(function(d, i) {
23688
23688
  if (!d) d = {};
23689
23689
  if (!d.parentNode) d.parentNode = this.parentNode;
23690
- if (!d.dataIndex) d.dataIndex = i;
23691
- const dataIndex = d.dataIndex;
23692
23690
  const parent = d.parentNode;
23693
23691
  const d3plusType = select(this).classed("d3plus-textBox") ? "textBox" : select(this).classed("d3plus-Image") ? "Image" : "Shape";
23694
23692
  if (d3plusType === "textBox") d = d.data;
@@ -23701,13 +23699,15 @@
23701
23699
  const notHovering = !that._hover || typeof that._hover !== "function" || !that._hover(d, i);
23702
23700
  const group = notHovering ? parent : that._hoverGroup.node();
23703
23701
  if (group !== this.parentNode) {
23704
- const offset = d3plusType === "textBox" ? findLastIndexWithClass(group.childNodes, [
23702
+ const afterIndex = d3plusType === "textBox" ? findLastIndexWithClass(group.childNodes, [
23705
23703
  "d3plus-Image",
23706
23704
  "d3plus-Shape"
23707
23705
  ]) : d3plusType === "Image" ? findLastIndexWithClass(group.childNodes, [
23708
23706
  "d3plus-Shape"
23709
- ]) : 0;
23710
- group.insertBefore(this, group.childNodes[offset + dataIndex]);
23707
+ ]) : -1;
23708
+ if (notHovering) group.appendChild(this);
23709
+ else if (afterIndex === -1) group.prepend(this);
23710
+ else group.childNodes[afterIndex].after(this);
23711
23711
  }
23712
23712
  if (this.className.baseVal.includes("d3plus-Shape")) {
23713
23713
  if (parent === group) select(this).call(that._applyStyle.bind(that));
@@ -34663,7 +34663,7 @@
34663
34663
  @chainable
34664
34664
  */ hover(_) {
34665
34665
  let hoverFunction = this._hover = _;
34666
- if (this._shapeConfig.hoverOpacity !== 1) {
34666
+ if (this._shapeConfig.hoverOpacity !== 1 && _ !== undefined) {
34667
34667
  if (typeof _ === "function") {
34668
34668
  let shapeData = merge$1(this._shapes.map((s)=>s.data()));
34669
34669
  shapeData = shapeData.concat(this._legendClass.data());