@d3plus/core 3.0.13 → 3.0.14
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 +41 -41
- package/es/src/components/Axis.js +21 -5
- package/package.json +8 -8
- package/umd/d3plus-core.full.js +20 -6
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +6 -4
- package/umd/d3plus-core.js +20 -6
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +6 -4
package/README.md
CHANGED
|
@@ -2738,7 +2738,7 @@ This is a static method of [<code>Viz</code>](#Viz), and is chainable with other
|
|
|
2738
2738
|
---
|
|
2739
2739
|
|
|
2740
2740
|
<a name="Axis"></a>
|
|
2741
|
-
#### **Axis** [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2741
|
+
#### **Axis** [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L175)
|
|
2742
2742
|
|
|
2743
2743
|
|
|
2744
2744
|
This is a global class, and extends all of the methods and functionality of [<code>BaseClass</code>](#BaseClass).
|
|
@@ -2796,7 +2796,7 @@ Creates an SVG scale based on an array of data.
|
|
|
2796
2796
|
|
|
2797
2797
|
|
|
2798
2798
|
|
|
2799
|
-
<a name="Axis.render" href="#Axis.render">#</a> Axis.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2799
|
+
<a name="Axis.render" href="#Axis.render">#</a> Axis.**render**([*callback*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L455)
|
|
2800
2800
|
|
|
2801
2801
|
Renders the current Axis to the page. If a *callback* is specified, it will be called once the legend is done drawing.
|
|
2802
2802
|
|
|
@@ -2804,7 +2804,7 @@ Renders the current Axis to the page. If a *callback* is specified, it will be c
|
|
|
2804
2804
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2805
2805
|
|
|
2806
2806
|
|
|
2807
|
-
<a name="Axis.align" href="#Axis.align">#</a> Axis.**align**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2807
|
+
<a name="Axis.align" href="#Axis.align">#</a> Axis.**align**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1370)
|
|
2808
2808
|
|
|
2809
2809
|
If *value* is specified, sets the horizontal alignment to the specified value and returns the current class instance.
|
|
2810
2810
|
|
|
@@ -2812,7 +2812,7 @@ If *value* is specified, sets the horizontal alignment to the specified value an
|
|
|
2812
2812
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2813
2813
|
|
|
2814
2814
|
|
|
2815
|
-
<a name="Axis.barConfig" href="#Axis.barConfig">#</a> Axis.**barConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2815
|
+
<a name="Axis.barConfig" href="#Axis.barConfig">#</a> Axis.**barConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1380)
|
|
2816
2816
|
|
|
2817
2817
|
If *value* is specified, sets the axis line style and returns the current class instance.
|
|
2818
2818
|
|
|
@@ -2820,7 +2820,7 @@ If *value* is specified, sets the axis line style and returns the current class
|
|
|
2820
2820
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2821
2821
|
|
|
2822
2822
|
|
|
2823
|
-
<a name="Axis.data" href="#Axis.data">#</a> Axis.**data**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2823
|
+
<a name="Axis.data" href="#Axis.data">#</a> Axis.**data**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1392)
|
|
2824
2824
|
|
|
2825
2825
|
An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.
|
|
2826
2826
|
|
|
@@ -2828,7 +2828,7 @@ An array of data points, which helps determine which ticks should be shown and w
|
|
|
2828
2828
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2829
2829
|
|
|
2830
2830
|
|
|
2831
|
-
<a name="Axis.domain" href="#Axis.domain">#</a> Axis.**domain**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2831
|
+
<a name="Axis.domain" href="#Axis.domain">#</a> Axis.**domain**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1402)
|
|
2832
2832
|
|
|
2833
2833
|
If *value* is specified, sets the scale domain of the axis and returns the current class instance.
|
|
2834
2834
|
|
|
@@ -2836,7 +2836,7 @@ If *value* is specified, sets the scale domain of the axis and returns the curre
|
|
|
2836
2836
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2837
2837
|
|
|
2838
2838
|
|
|
2839
|
-
<a name="Axis.duration" href="#Axis.duration">#</a> Axis.**duration**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2839
|
+
<a name="Axis.duration" href="#Axis.duration">#</a> Axis.**duration**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1412)
|
|
2840
2840
|
|
|
2841
2841
|
If *value* is specified, sets the transition duration of the axis and returns the current class instance.
|
|
2842
2842
|
|
|
@@ -2844,7 +2844,7 @@ If *value* is specified, sets the transition duration of the axis and returns th
|
|
|
2844
2844
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2845
2845
|
|
|
2846
2846
|
|
|
2847
|
-
<a name="Axis.grid" href="#Axis.grid">#</a> Axis.**grid**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2847
|
+
<a name="Axis.grid" href="#Axis.grid">#</a> Axis.**grid**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1422)
|
|
2848
2848
|
|
|
2849
2849
|
If *value* is specified, sets the grid values of the axis and returns the current class instance.
|
|
2850
2850
|
|
|
@@ -2852,7 +2852,7 @@ If *value* is specified, sets the grid values of the axis and returns the curren
|
|
|
2852
2852
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2853
2853
|
|
|
2854
2854
|
|
|
2855
|
-
<a name="Axis.gridConfig" href="#Axis.gridConfig">#</a> Axis.**gridConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2855
|
+
<a name="Axis.gridConfig" href="#Axis.gridConfig">#</a> Axis.**gridConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1432)
|
|
2856
2856
|
|
|
2857
2857
|
If *value* is specified, sets the grid config of the axis and returns the current class instance.
|
|
2858
2858
|
|
|
@@ -2860,7 +2860,7 @@ If *value* is specified, sets the grid config of the axis and returns the curren
|
|
|
2860
2860
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2861
2861
|
|
|
2862
2862
|
|
|
2863
|
-
<a name="Axis.gridLog" href="#Axis.gridLog">#</a> Axis.**gridLog**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2863
|
+
<a name="Axis.gridLog" href="#Axis.gridLog">#</a> Axis.**gridLog**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1444)
|
|
2864
2864
|
|
|
2865
2865
|
If *value* is specified, sets the grid behavior of the axis when scale is logarithmic and returns the current class instance.
|
|
2866
2866
|
|
|
@@ -2868,7 +2868,7 @@ If *value* is specified, sets the grid behavior of the axis when scale is logari
|
|
|
2868
2868
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2869
2869
|
|
|
2870
2870
|
|
|
2871
|
-
<a name="Axis.gridSize" href="#Axis.gridSize">#</a> Axis.**gridSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2871
|
+
<a name="Axis.gridSize" href="#Axis.gridSize">#</a> Axis.**gridSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1454)
|
|
2872
2872
|
|
|
2873
2873
|
If *value* is specified, sets the grid size of the axis and returns the current class instance.
|
|
2874
2874
|
|
|
@@ -2876,7 +2876,7 @@ If *value* is specified, sets the grid size of the axis and returns the current
|
|
|
2876
2876
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2877
2877
|
|
|
2878
2878
|
|
|
2879
|
-
<a name="Axis.height" href="#Axis.height">#</a> Axis.**height**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2879
|
+
<a name="Axis.height" href="#Axis.height">#</a> Axis.**height**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1464)
|
|
2880
2880
|
|
|
2881
2881
|
If *value* is specified, sets the overall height of the axis and returns the current class instance.
|
|
2882
2882
|
|
|
@@ -2884,7 +2884,7 @@ If *value* is specified, sets the overall height of the axis and returns the cur
|
|
|
2884
2884
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2885
2885
|
|
|
2886
2886
|
|
|
2887
|
-
<a name="Axis.labels" href="#Axis.labels">#</a> Axis.**labels**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2887
|
+
<a name="Axis.labels" href="#Axis.labels">#</a> Axis.**labels**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1474)
|
|
2888
2888
|
|
|
2889
2889
|
If *value* is specified, sets the visible tick labels of the axis and returns the current class instance.
|
|
2890
2890
|
|
|
@@ -2892,7 +2892,7 @@ If *value* is specified, sets the visible tick labels of the axis and returns th
|
|
|
2892
2892
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2893
2893
|
|
|
2894
2894
|
|
|
2895
|
-
<a name="Axis.labelOffset" href="#Axis.labelOffset">#</a> Axis.**labelOffset**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2895
|
+
<a name="Axis.labelOffset" href="#Axis.labelOffset">#</a> Axis.**labelOffset**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1484)
|
|
2896
2896
|
|
|
2897
2897
|
If *value* is specified, sets whether offsets will be used to position some labels further away from the axis in order to allow space for the text.
|
|
2898
2898
|
|
|
@@ -2900,7 +2900,7 @@ If *value* is specified, sets whether offsets will be used to position some labe
|
|
|
2900
2900
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2901
2901
|
|
|
2902
2902
|
|
|
2903
|
-
<a name="Axis.labelRotation" href="#Axis.labelRotation">#</a> Axis.**labelRotation**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2903
|
+
<a name="Axis.labelRotation" href="#Axis.labelRotation">#</a> Axis.**labelRotation**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1496)
|
|
2904
2904
|
|
|
2905
2905
|
If *value* is specified, sets whether whether horizontal axis labels are rotated -90 degrees.
|
|
2906
2906
|
|
|
@@ -2908,7 +2908,7 @@ If *value* is specified, sets whether whether horizontal axis labels are rotated
|
|
|
2908
2908
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2909
2909
|
|
|
2910
2910
|
|
|
2911
|
-
<a name="Axis.maxSize" href="#Axis.maxSize">#</a> Axis.**maxSize**(_) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2911
|
+
<a name="Axis.maxSize" href="#Axis.maxSize">#</a> Axis.**maxSize**(_) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1508)
|
|
2912
2912
|
|
|
2913
2913
|
If *value* is specified, sets the maximum size allowed for the space that contains the axis tick labels and title.
|
|
2914
2914
|
|
|
@@ -2916,7 +2916,7 @@ If *value* is specified, sets the maximum size allowed for the space that contai
|
|
|
2916
2916
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2917
2917
|
|
|
2918
2918
|
|
|
2919
|
-
<a name="Axis.minSize" href="#Axis.minSize">#</a> Axis.**minSize**(_) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2919
|
+
<a name="Axis.minSize" href="#Axis.minSize">#</a> Axis.**minSize**(_) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1518)
|
|
2920
2920
|
|
|
2921
2921
|
If *value* is specified, sets the minimum size alloted for the space that contains the axis tick labels and title.
|
|
2922
2922
|
|
|
@@ -2924,7 +2924,7 @@ If *value* is specified, sets the minimum size alloted for the space that contai
|
|
|
2924
2924
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2925
2925
|
|
|
2926
2926
|
|
|
2927
|
-
<a name="Axis.orient" href="#Axis.orient">#</a> Axis.**orient**([*orient*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2927
|
+
<a name="Axis.orient" href="#Axis.orient">#</a> Axis.**orient**([*orient*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1528)
|
|
2928
2928
|
|
|
2929
2929
|
If *orient* is specified, sets the orientation of the shape and returns the current class instance. If *orient* is not specified, returns the current orientation.
|
|
2930
2930
|
|
|
@@ -2932,7 +2932,7 @@ If *orient* is specified, sets the orientation of the shape and returns the curr
|
|
|
2932
2932
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2933
2933
|
|
|
2934
2934
|
|
|
2935
|
-
<a name="Axis.outerBounds" href="#Axis.outerBounds">#</a> Axis.**outerBounds**() [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2935
|
+
<a name="Axis.outerBounds" href="#Axis.outerBounds">#</a> Axis.**outerBounds**() [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1553)
|
|
2936
2936
|
|
|
2937
2937
|
If called after the elements have been drawn to DOM, will returns the outer bounds of the axis content.
|
|
2938
2938
|
|
|
@@ -2945,7 +2945,7 @@ This is a static method of [<code>Axis</code>](#Axis)
|
|
|
2945
2945
|
```
|
|
2946
2946
|
|
|
2947
2947
|
|
|
2948
|
-
<a name="Axis.padding" href="#Axis.padding">#</a> Axis.**padding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2948
|
+
<a name="Axis.padding" href="#Axis.padding">#</a> Axis.**padding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1563)
|
|
2949
2949
|
|
|
2950
2950
|
If *value* is specified, sets the padding between each tick label to the specified number and returns the current class instance.
|
|
2951
2951
|
|
|
@@ -2953,7 +2953,7 @@ If *value* is specified, sets the padding between each tick label to the specifi
|
|
|
2953
2953
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2954
2954
|
|
|
2955
2955
|
|
|
2956
|
-
<a name="Axis.paddingInner" href="#Axis.paddingInner">#</a> Axis.**paddingInner**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2956
|
+
<a name="Axis.paddingInner" href="#Axis.paddingInner">#</a> Axis.**paddingInner**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1573)
|
|
2957
2957
|
|
|
2958
2958
|
If *value* is specified, sets the inner padding of band scale to the specified number and returns the current class instance.
|
|
2959
2959
|
|
|
@@ -2961,7 +2961,7 @@ If *value* is specified, sets the inner padding of band scale to the specified n
|
|
|
2961
2961
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2962
2962
|
|
|
2963
2963
|
|
|
2964
|
-
<a name="Axis.paddingOuter" href="#Axis.paddingOuter">#</a> Axis.**paddingOuter**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2964
|
+
<a name="Axis.paddingOuter" href="#Axis.paddingOuter">#</a> Axis.**paddingOuter**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1585)
|
|
2965
2965
|
|
|
2966
2966
|
If *value* is specified, sets the outer padding of band scales to the specified number and returns the current class instance.
|
|
2967
2967
|
|
|
@@ -2969,7 +2969,7 @@ If *value* is specified, sets the outer padding of band scales to the specified
|
|
|
2969
2969
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2970
2970
|
|
|
2971
2971
|
|
|
2972
|
-
<a name="Axis.range" href="#Axis.range">#</a> Axis.**range**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2972
|
+
<a name="Axis.range" href="#Axis.range">#</a> Axis.**range**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1597)
|
|
2973
2973
|
|
|
2974
2974
|
If *value* is specified, sets the scale range (in pixels) of the axis and returns the current class instance. The given array must have 2 values, but one may be `undefined` to allow the default behavior for that value.
|
|
2975
2975
|
|
|
@@ -2977,7 +2977,7 @@ If *value* is specified, sets the scale range (in pixels) of the axis and return
|
|
|
2977
2977
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2978
2978
|
|
|
2979
2979
|
|
|
2980
|
-
<a name="Axis.rounding" href="#Axis.rounding">#</a> Axis.**rounding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2980
|
+
<a name="Axis.rounding" href="#Axis.rounding">#</a> Axis.**rounding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1607)
|
|
2981
2981
|
|
|
2982
2982
|
Sets the rounding method, so that more evenly spaced ticks appear at the extents of the scale. Can be set to "none" (default), "outside", or "inside".
|
|
2983
2983
|
|
|
@@ -2985,7 +2985,7 @@ Sets the rounding method, so that more evenly spaced ticks appear at the extents
|
|
|
2985
2985
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2986
2986
|
|
|
2987
2987
|
|
|
2988
|
-
<a name="Axis.roundingInsideMinPrefix" href="#Axis.roundingInsideMinPrefix">#</a> Axis.**roundingInsideMinPrefix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2988
|
+
<a name="Axis.roundingInsideMinPrefix" href="#Axis.roundingInsideMinPrefix">#</a> Axis.**roundingInsideMinPrefix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1617)
|
|
2989
2989
|
|
|
2990
2990
|
Sets the prefix used for the minimum value of "inside" rounding scales.
|
|
2991
2991
|
|
|
@@ -2993,7 +2993,7 @@ Sets the prefix used for the minimum value of "inside" rounding scales.
|
|
|
2993
2993
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
2994
2994
|
|
|
2995
2995
|
|
|
2996
|
-
<a name="Axis.roundingInsideMinSuffix" href="#Axis.roundingInsideMinSuffix">#</a> Axis.**roundingInsideMinSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
2996
|
+
<a name="Axis.roundingInsideMinSuffix" href="#Axis.roundingInsideMinSuffix">#</a> Axis.**roundingInsideMinSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1629)
|
|
2997
2997
|
|
|
2998
2998
|
Sets the suffix used for the minimum value of "inside" rounding scales.
|
|
2999
2999
|
|
|
@@ -3001,7 +3001,7 @@ Sets the suffix used for the minimum value of "inside" rounding scales.
|
|
|
3001
3001
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3002
3002
|
|
|
3003
3003
|
|
|
3004
|
-
<a name="Axis.roundingInsideMaxPrefix" href="#Axis.roundingInsideMaxPrefix">#</a> Axis.**roundingInsideMaxPrefix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3004
|
+
<a name="Axis.roundingInsideMaxPrefix" href="#Axis.roundingInsideMaxPrefix">#</a> Axis.**roundingInsideMaxPrefix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1641)
|
|
3005
3005
|
|
|
3006
3006
|
Sets the prefix used for the maximum value of "inside" rounding scales.
|
|
3007
3007
|
|
|
@@ -3009,7 +3009,7 @@ Sets the prefix used for the maximum value of "inside" rounding scales.
|
|
|
3009
3009
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3010
3010
|
|
|
3011
3011
|
|
|
3012
|
-
<a name="Axis.roundingInsideMaxSuffix" href="#Axis.roundingInsideMaxSuffix">#</a> Axis.**roundingInsideMaxSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3012
|
+
<a name="Axis.roundingInsideMaxSuffix" href="#Axis.roundingInsideMaxSuffix">#</a> Axis.**roundingInsideMaxSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1653)
|
|
3013
3013
|
|
|
3014
3014
|
Sets the suffix used for the maximum value of "inside" rounding scales.
|
|
3015
3015
|
|
|
@@ -3017,7 +3017,7 @@ Sets the suffix used for the maximum value of "inside" rounding scales.
|
|
|
3017
3017
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3018
3018
|
|
|
3019
3019
|
|
|
3020
|
-
<a name="Axis.scale" href="#Axis.scale">#</a> Axis.**scale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3020
|
+
<a name="Axis.scale" href="#Axis.scale">#</a> Axis.**scale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1665)
|
|
3021
3021
|
|
|
3022
3022
|
If *value* is specified, sets the scale of the axis and returns the current class instance.
|
|
3023
3023
|
|
|
@@ -3025,7 +3025,7 @@ If *value* is specified, sets the scale of the axis and returns the current clas
|
|
|
3025
3025
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3026
3026
|
|
|
3027
3027
|
|
|
3028
|
-
<a name="Axis.scalePadding" href="#Axis.scalePadding">#</a> Axis.**scalePadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3028
|
+
<a name="Axis.scalePadding" href="#Axis.scalePadding">#</a> Axis.**scalePadding**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1675)
|
|
3029
3029
|
|
|
3030
3030
|
Sets the "padding" property of the scale, often used in point scales.
|
|
3031
3031
|
|
|
@@ -3033,7 +3033,7 @@ Sets the "padding" property of the scale, often used in point scales.
|
|
|
3033
3033
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3034
3034
|
|
|
3035
3035
|
|
|
3036
|
-
<a name="Axis.select" href="#Axis.select">#</a> Axis.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3036
|
+
<a name="Axis.select" href="#Axis.select">#</a> Axis.**select**([*selector*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1687)
|
|
3037
3037
|
|
|
3038
3038
|
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.
|
|
3039
3039
|
|
|
@@ -3041,7 +3041,7 @@ If *selector* is specified, sets the SVG container element to the specified d3 s
|
|
|
3041
3041
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3042
3042
|
|
|
3043
3043
|
|
|
3044
|
-
<a name="Axis.shape" href="#Axis.shape">#</a> Axis.**shape**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3044
|
+
<a name="Axis.shape" href="#Axis.shape">#</a> Axis.**shape**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1697)
|
|
3045
3045
|
|
|
3046
3046
|
If *value* is specified, sets the tick shape constructor and returns the current class instance.
|
|
3047
3047
|
|
|
@@ -3049,7 +3049,7 @@ If *value* is specified, sets the tick shape constructor and returns the current
|
|
|
3049
3049
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3050
3050
|
|
|
3051
3051
|
|
|
3052
|
-
<a name="Axis.shapeConfig" href="#Axis.shapeConfig">#</a> Axis.**shapeConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3052
|
+
<a name="Axis.shapeConfig" href="#Axis.shapeConfig">#</a> Axis.**shapeConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1707)
|
|
3053
3053
|
|
|
3054
3054
|
If *value* is specified, sets the tick style of the axis and returns the current class instance.
|
|
3055
3055
|
|
|
@@ -3057,7 +3057,7 @@ If *value* is specified, sets the tick style of the axis and returns the current
|
|
|
3057
3057
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3058
3058
|
|
|
3059
3059
|
|
|
3060
|
-
<a name="Axis.tickFormat" href="#Axis.tickFormat">#</a> Axis.**tickFormat**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3060
|
+
<a name="Axis.tickFormat" href="#Axis.tickFormat">#</a> Axis.**tickFormat**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1719)
|
|
3061
3061
|
|
|
3062
3062
|
If *value* is specified, sets the tick formatter and returns the current class instance.
|
|
3063
3063
|
|
|
@@ -3065,7 +3065,7 @@ If *value* is specified, sets the tick formatter and returns the current class i
|
|
|
3065
3065
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3066
3066
|
|
|
3067
3067
|
|
|
3068
|
-
<a name="Axis.ticks" href="#Axis.ticks">#</a> Axis.**ticks**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3068
|
+
<a name="Axis.ticks" href="#Axis.ticks">#</a> Axis.**ticks**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1729)
|
|
3069
3069
|
|
|
3070
3070
|
If *value* is specified, sets the tick values of the axis and returns the current class instance.
|
|
3071
3071
|
|
|
@@ -3073,7 +3073,7 @@ If *value* is specified, sets the tick values of the axis and returns the curren
|
|
|
3073
3073
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3074
3074
|
|
|
3075
3075
|
|
|
3076
|
-
<a name="Axis.tickSize" href="#Axis.tickSize">#</a> Axis.**tickSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3076
|
+
<a name="Axis.tickSize" href="#Axis.tickSize">#</a> Axis.**tickSize**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1739)
|
|
3077
3077
|
|
|
3078
3078
|
If *value* is specified, sets the tick size of the axis and returns the current class instance.
|
|
3079
3079
|
|
|
@@ -3081,7 +3081,7 @@ If *value* is specified, sets the tick size of the axis and returns the current
|
|
|
3081
3081
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3082
3082
|
|
|
3083
3083
|
|
|
3084
|
-
<a name="Axis.tickSuffix" href="#Axis.tickSuffix">#</a> Axis.**tickSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3084
|
+
<a name="Axis.tickSuffix" href="#Axis.tickSuffix">#</a> Axis.**tickSuffix**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1749)
|
|
3085
3085
|
|
|
3086
3086
|
Sets the behavior of the abbreviations when you are using linear scale. This method accepts two options: "normal" (uses formatAbbreviate to determinate the abbreviation) and "smallest" (uses suffix from the smallest tick as reference in every tick).
|
|
3087
3087
|
|
|
@@ -3089,7 +3089,7 @@ Sets the behavior of the abbreviations when you are using linear scale. This met
|
|
|
3089
3089
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3090
3090
|
|
|
3091
3091
|
|
|
3092
|
-
<a name="Axis.timeLocale" href="#Axis.timeLocale">#</a> Axis.**timeLocale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3092
|
+
<a name="Axis.timeLocale" href="#Axis.timeLocale">#</a> Axis.**timeLocale**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1759)
|
|
3093
3093
|
|
|
3094
3094
|
Defines a custom locale object to be used in time scale. This object must include the following properties: dateTime, date, time, periods, days, shortDays, months, shortMonths. For more information, you can revise [d3p.d3-time-format](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatLocale).
|
|
3095
3095
|
|
|
@@ -3097,7 +3097,7 @@ Defines a custom locale object to be used in time scale. This object must includ
|
|
|
3097
3097
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3098
3098
|
|
|
3099
3099
|
|
|
3100
|
-
<a name="Axis.title" href="#Axis.title">#</a> Axis.**title**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3100
|
+
<a name="Axis.title" href="#Axis.title">#</a> Axis.**title**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1769)
|
|
3101
3101
|
|
|
3102
3102
|
If *value* is specified, sets the title of the axis and returns the current class instance.
|
|
3103
3103
|
|
|
@@ -3105,7 +3105,7 @@ If *value* is specified, sets the title of the axis and returns the current clas
|
|
|
3105
3105
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3106
3106
|
|
|
3107
3107
|
|
|
3108
|
-
<a name="Axis.titleConfig" href="#Axis.titleConfig">#</a> Axis.**titleConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3108
|
+
<a name="Axis.titleConfig" href="#Axis.titleConfig">#</a> Axis.**titleConfig**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1779)
|
|
3109
3109
|
|
|
3110
3110
|
If *value* is specified, sets the title configuration of the axis and returns the current class instance.
|
|
3111
3111
|
|
|
@@ -3113,7 +3113,7 @@ If *value* is specified, sets the title configuration of the axis and returns th
|
|
|
3113
3113
|
This is a static method of [<code>Axis</code>](#Axis), and is chainable with other methods of this Class.
|
|
3114
3114
|
|
|
3115
3115
|
|
|
3116
|
-
<a name="Axis.width" href="#Axis.width">#</a> Axis.**width**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#
|
|
3116
|
+
<a name="Axis.width" href="#Axis.width">#</a> Axis.**width**([*value*]) [<>](https://github.com/d3plus/d3plus/blob/main/packages/core/src/components/Axis.js#L1791)
|
|
3117
3117
|
|
|
3118
3118
|
If *value* is specified, sets the overall width of the axis and returns the current class instance.
|
|
3119
3119
|
|
|
@@ -176,6 +176,7 @@ var fixFloat = function(d) {
|
|
|
176
176
|
if (zeroMatch) return +"".concat(zeroMatch[1]).concat(+zeroMatch[2]);
|
|
177
177
|
return d;
|
|
178
178
|
};
|
|
179
|
+
var maxTimezoneOffset = 1000 * 60 * 60 * 26;
|
|
179
180
|
/**
|
|
180
181
|
* Calculates ticks from a given scale (negative and/or positive)
|
|
181
182
|
* @param {scale} scale A d3-scale object
|
|
@@ -220,9 +221,15 @@ var fixFloat = function(d) {
|
|
|
220
221
|
*/ function calculateTicks(scale) {
|
|
221
222
|
var minorTicks = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
222
223
|
var ticks = [];
|
|
223
|
-
var
|
|
224
|
-
|
|
224
|
+
var scaleClone = scale.copy();
|
|
225
|
+
if (this._scale === "time" && this._data.length) {
|
|
226
|
+
var newDomain = extent(this._data);
|
|
227
|
+
var range = newDomain.map(scale);
|
|
228
|
+
scaleClone.domain(newDomain).range(range);
|
|
229
|
+
}
|
|
230
|
+
var domain = scaleClone.domain();
|
|
225
231
|
var inverted = domain[1] < domain[0];
|
|
232
|
+
var step = calculateStep.bind(this)(scaleClone, minorTicks);
|
|
226
233
|
if (!minorTicks && this._scale === "log") {
|
|
227
234
|
var roundDomain = domain.map(function(d) {
|
|
228
235
|
return Math.log10(d) % 1 === 0 ? d : (inverted ? ceilPow : floorPow)(d);
|
|
@@ -235,7 +242,7 @@ var fixFloat = function(d) {
|
|
|
235
242
|
].includes(d) || Math.abs(d) < 1 ? 1 : Math.log10(Math.abs(d)));
|
|
236
243
|
});
|
|
237
244
|
var powMod = Math.ceil((Math.abs(powers[1] - powers[0]) + 1) / (step * 0.65));
|
|
238
|
-
ticks = powMod <= 1 && powers[0] === powers[1] || invertedRound !== inverted ?
|
|
245
|
+
ticks = powMod <= 1 && powers[0] === powers[1] || invertedRound !== inverted ? scaleClone.ticks(step).filter(function(d) {
|
|
239
246
|
return +"".concat(d).replace("0.", "") % 2 === 0;
|
|
240
247
|
}) : d3Range(powers[0], powers[1], powers[1] < powers[0] ? -1 : 1).concat([
|
|
241
248
|
powers[1]
|
|
@@ -245,7 +252,7 @@ var fixFloat = function(d) {
|
|
|
245
252
|
return +"".concat((isNegative(d) ? -1 : 1) * (d ? Math.pow(10, Math.abs(d)) : Math.sign(1 / d) > 0 ? 1 : -1)).replace(/9+/g, "1");
|
|
246
253
|
});
|
|
247
254
|
} else {
|
|
248
|
-
ticks =
|
|
255
|
+
ticks = scaleClone.ticks(step);
|
|
249
256
|
if (!minorTicks && ![
|
|
250
257
|
"log",
|
|
251
258
|
"time"
|
|
@@ -261,6 +268,16 @@ var fixFloat = function(d) {
|
|
|
261
268
|
});
|
|
262
269
|
}
|
|
263
270
|
}
|
|
271
|
+
// for time scale, if data array has been provided, filter out ticks that are not in the array
|
|
272
|
+
if (this._scale === "time" && this._data.length) {
|
|
273
|
+
var dataNumbers = this._data.map(Number);
|
|
274
|
+
ticks = ticks.filter(function(t) {
|
|
275
|
+
var tn = +t;
|
|
276
|
+
return dataNumbers.find(function(n) {
|
|
277
|
+
return n >= tn - maxTimezoneOffset && n <= tn + maxTimezoneOffset;
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
}
|
|
264
281
|
// forces min/max into ticks, if not present
|
|
265
282
|
if (!this._d3ScaleNegative || isNegative(domain[inverted ? 1 : 0]) === ticks.some(function(d) {
|
|
266
283
|
return isNegative(d);
|
|
@@ -276,7 +293,6 @@ var fixFloat = function(d) {
|
|
|
276
293
|
ticks.push(domain[1]);
|
|
277
294
|
}
|
|
278
295
|
}
|
|
279
|
-
if (this._scale === "time" && this._data.length) ticks = this._data;
|
|
280
296
|
return ticks;
|
|
281
297
|
}
|
|
282
298
|
var Axis = /*#__PURE__*/ function(BaseClass) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3plus/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.14",
|
|
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.
|
|
38
|
-
"@d3plus/data": "3.0.
|
|
39
|
-
"@d3plus/dom": "3.0.
|
|
40
|
-
"@d3plus/format": "3.0.
|
|
41
|
-
"@d3plus/locales": "3.0.
|
|
42
|
-
"@d3plus/math": "3.0.
|
|
43
|
-
"@d3plus/text": "3.0.
|
|
37
|
+
"@d3plus/color": "3.0.14",
|
|
38
|
+
"@d3plus/data": "3.0.14",
|
|
39
|
+
"@d3plus/dom": "3.0.14",
|
|
40
|
+
"@d3plus/format": "3.0.14",
|
|
41
|
+
"@d3plus/locales": "3.0.14",
|
|
42
|
+
"@d3plus/math": "3.0.14",
|
|
43
|
+
"@d3plus/text": "3.0.14",
|
|
44
44
|
"@popperjs/core": "^2.11.8",
|
|
45
45
|
"d3-array": "^3.2.4",
|
|
46
46
|
"d3-brush": "^3.0.0",
|
package/umd/d3plus-core.full.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
@d3plus/core v3.0.
|
|
2
|
+
@d3plus/core v3.0.14
|
|
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
|
|
@@ -26286,6 +26286,7 @@
|
|
|
26286
26286
|
if (zeroMatch) return +`${zeroMatch[1]}${+zeroMatch[2]}`;
|
|
26287
26287
|
return d;
|
|
26288
26288
|
};
|
|
26289
|
+
const maxTimezoneOffset = 1000 * 60 * 60 * 26;
|
|
26289
26290
|
/**
|
|
26290
26291
|
* Calculates ticks from a given scale (negative and/or positive)
|
|
26291
26292
|
* @param {scale} scale A d3-scale object
|
|
@@ -26328,9 +26329,15 @@
|
|
|
26328
26329
|
* @private
|
|
26329
26330
|
*/ function calculateTicks(scale, minorTicks = false) {
|
|
26330
26331
|
let ticks = [];
|
|
26331
|
-
const
|
|
26332
|
-
|
|
26332
|
+
const scaleClone = scale.copy();
|
|
26333
|
+
if (this._scale === "time" && this._data.length) {
|
|
26334
|
+
const newDomain = extent$1(this._data);
|
|
26335
|
+
const range = newDomain.map(scale);
|
|
26336
|
+
scaleClone.domain(newDomain).range(range);
|
|
26337
|
+
}
|
|
26338
|
+
const domain = scaleClone.domain();
|
|
26333
26339
|
const inverted = domain[1] < domain[0];
|
|
26340
|
+
const step = calculateStep.bind(this)(scaleClone, minorTicks);
|
|
26334
26341
|
if (!minorTicks && this._scale === "log") {
|
|
26335
26342
|
const roundDomain = domain.map((d)=>Math.log10(d) % 1 === 0 ? d : (inverted ? ceilPow : floorPow)(d));
|
|
26336
26343
|
const invertedRound = roundDomain[1] < roundDomain[0];
|
|
@@ -26339,11 +26346,11 @@
|
|
|
26339
26346
|
1
|
|
26340
26347
|
].includes(d) || Math.abs(d) < 1 ? 1 : Math.log10(Math.abs(d))));
|
|
26341
26348
|
const powMod = Math.ceil((Math.abs(powers[1] - powers[0]) + 1) / (step * 0.65));
|
|
26342
|
-
ticks = powMod <= 1 && powers[0] === powers[1] || invertedRound !== inverted ?
|
|
26349
|
+
ticks = powMod <= 1 && powers[0] === powers[1] || invertedRound !== inverted ? scaleClone.ticks(step).filter((d)=>+`${d}`.replace("0.", "") % 2 === 0) : range$1(powers[0], powers[1], powers[1] < powers[0] ? -1 : 1).concat([
|
|
26343
26350
|
powers[1]
|
|
26344
26351
|
]).filter((d)=>Math.abs(d) % powMod === 0).map((d)=>+`${(isNegative(d) ? -1 : 1) * (d ? Math.pow(10, Math.abs(d)) : Math.sign(1 / d) > 0 ? 1 : -1)}`.replace(/9+/g, "1"));
|
|
26345
26352
|
} else {
|
|
26346
|
-
ticks =
|
|
26353
|
+
ticks = scaleClone.ticks(step);
|
|
26347
26354
|
if (!minorTicks && ![
|
|
26348
26355
|
"log",
|
|
26349
26356
|
"time"
|
|
@@ -26359,6 +26366,14 @@
|
|
|
26359
26366
|
});
|
|
26360
26367
|
}
|
|
26361
26368
|
}
|
|
26369
|
+
// for time scale, if data array has been provided, filter out ticks that are not in the array
|
|
26370
|
+
if (this._scale === "time" && this._data.length) {
|
|
26371
|
+
const dataNumbers = this._data.map(Number);
|
|
26372
|
+
ticks = ticks.filter((t)=>{
|
|
26373
|
+
const tn = +t;
|
|
26374
|
+
return dataNumbers.find((n)=>n >= tn - maxTimezoneOffset && n <= tn + maxTimezoneOffset);
|
|
26375
|
+
});
|
|
26376
|
+
}
|
|
26362
26377
|
// forces min/max into ticks, if not present
|
|
26363
26378
|
if (!this._d3ScaleNegative || isNegative(domain[inverted ? 1 : 0]) === ticks.some((d)=>isNegative(d))) {
|
|
26364
26379
|
if (!ticks.map(Number).includes(+domain[0])) {
|
|
@@ -26370,7 +26385,6 @@
|
|
|
26370
26385
|
ticks.push(domain[1]);
|
|
26371
26386
|
}
|
|
26372
26387
|
}
|
|
26373
|
-
if (this._scale === "time" && this._data.length) ticks = this._data;
|
|
26374
26388
|
return ticks;
|
|
26375
26389
|
}
|
|
26376
26390
|
class Axis extends BaseClass {
|