@d3plus/core 3.0.11 → 3.0.12

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/core v3.0.11
2
+ @d3plus/core v3.0.12
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) 2025 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -3960,7 +3960,7 @@ function uf(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}af||(af=1,ch.exports=((dh=rf.pro
3960
3960
  @function _drawColorScale
3961
3961
  @desc Renders the color scale if this._colorScale is not falsey.
3962
3962
  @private
3963
- */function gf(){var t=this._data;let n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom");var e=["top","bottom"].includes(n),i=this._colorScale&&n,a=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},r=this._width-(this._margin.left+this._margin.right+a.left+a.right),o=e?Dt([this._colorScaleMaxSize,r]):this._width-(this._margin.left+this._margin.right),s=this._height-(this._margin.bottom+this._margin.top+a.bottom+a.top),l=e?this._height-(this._margin.bottom+this._margin.top):Dt([this._colorScaleMaxSize,s]),r={opacity:n?1:0,transform:`translate(${e?this._margin.left+a.left+(r-o)/2:this._margin.left}, ${e?this._margin.top:this._margin.top+a.top+(s-l)/2})`},a=Pt("g.d3plus-viz-colorScale",{condition:i&&!this._colorScaleConfig.select,enter:r,parent:this._select,duration:this._duration,update:r}).node();this._colorScale&&(s=t.filter((t,n)=>{t=this._colorScale(t,n);return null!=t}),this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[n]||"bottom").duration(this._duration).data(s).height(l).locale(this._locale).orient(n).select(a).value(this._colorScale).width(o).config(this._colorScaleConfig).render(),i)&&(r=this._colorScaleClass.outerBounds(),!this._colorScaleConfig.select)&&r.height&&(this._margin[n]+=e?r.height+2*this._legendClass.padding():r.width+2*this._legendClass.padding())}let df=["fill","opacity","texture"];
3963
+ */function gf(){var t=Array.from(qi(this._data,t=>_u(t,this._aggs),(t,n)=>`${this._time?this._time(t,n):"all"}-`+this._ids(t,n).join("_")).values());let n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom");var e=["top","bottom"].includes(n),i=this._colorScale&&n,a=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},r=this._width-(this._margin.left+this._margin.right+a.left+a.right),o=e?Dt([this._colorScaleMaxSize,r]):this._width-(this._margin.left+this._margin.right),s=this._height-(this._margin.bottom+this._margin.top+a.bottom+a.top),l=e?this._height-(this._margin.bottom+this._margin.top):Dt([this._colorScaleMaxSize,s]),r={opacity:n?1:0,transform:`translate(${e?this._margin.left+a.left+(r-o)/2:this._margin.left}, ${e?this._margin.top:this._margin.top+a.top+(s-l)/2})`},a=Pt("g.d3plus-viz-colorScale",{condition:i&&!this._colorScaleConfig.select,enter:r,parent:this._select,duration:this._duration,update:r}).node();this._colorScale&&(s=t.filter((t,n)=>{t=this._colorScale(t,n);return null!=t}),this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[n]||"bottom").duration(this._duration).data(s).height(l).locale(this._locale).orient(n).select(a).value(this._colorScale).width(o).config(this._colorScaleConfig).render(),i)&&(r=this._colorScaleClass.outerBounds(),!this._colorScaleConfig.select)&&r.height&&(this._margin[n]+=e?r.height+2*this._legendClass.padding():r.width+2*this._legendClass.padding())}let df=["fill","opacity","texture"];
3964
3964
  /**
3965
3965
  @function legendLabel
3966
3966
  @desc Default label function for the legend.
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/core v3.0.11
2
+ @d3plus/core v3.0.12
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) 2025 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -6715,7 +6715,7 @@
6715
6715
  @desc Renders the color scale if this._colorScale is not falsey.
6716
6716
  @private
6717
6717
  */ function drawColorScale() {
6718
- const data = this._data;
6718
+ const data$1 = Array.from(d3Array.rollup(this._data, (leaves)=>data.merge(leaves, this._aggs), (d, i)=>`${this._time ? this._time(d, i) : "all"}-${this._ids(d, i).join("_")}`).values());
6719
6719
  let position = this._colorScalePosition.bind(this)(this.config());
6720
6720
  if (![
6721
6721
  false,
@@ -6757,7 +6757,7 @@
6757
6757
  update: transform
6758
6758
  }).node();
6759
6759
  if (this._colorScale) {
6760
- const scaleData = data.filter((d, i)=>{
6760
+ const scaleData = data$1.filter((d, i)=>{
6761
6761
  const c = this._colorScale(d, i);
6762
6762
  return c !== undefined && c !== null;
6763
6763
  });