@windborne/grapher 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windborne/grapher",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "Graphing library",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -799,48 +799,7 @@ export default class StateController extends Eventable {
799
799
  axis.targetBounds = axis.targetBounds.byAxis[axis.axisIndex];
800
800
  }
801
801
 
802
- const expandYWith = [];
803
- for (let singleSeries of axis.series) {
804
- if (singleSeries._rangeValues && singleSeries._rangeValues.length > 0) {
805
- const visibleDataPoints = singleSeries.inDataSpace.filter(([x, y]) =>
806
- axis.targetBounds.minX <= x && x <= axis.targetBounds.maxX
807
- );
808
-
809
- const visibleRangeValues = [];
810
- for (let i = 0; i < visibleDataPoints.length; i++) {
811
- const dataPointIndex = singleSeries.inDataSpace.indexOf(visibleDataPoints[i]);
812
- if (dataPointIndex >= 0) {
813
- const rangeIndex = dataPointIndex * 2;
814
- if (rangeIndex < singleSeries._rangeValues.length) {
815
- visibleRangeValues.push(singleSeries._rangeValues[rangeIndex]);
816
- if (rangeIndex + 1 < singleSeries._rangeValues.length) {
817
- visibleRangeValues.push(singleSeries._rangeValues[rangeIndex + 1]);
818
- }
819
- }
820
- }
821
- }
822
-
823
- if (visibleRangeValues.length > 0) {
824
- expandYWith.push(...visibleRangeValues);
825
- }
826
- }
827
- }
828
-
829
- if (expandYWith.length > 0) {
830
- const boundsToExpand = { ...axis.targetBounds };
831
-
832
- if (boundsToExpand.minY === null) {
833
- boundsToExpand.minY = Math.min(...expandYWith.filter(y => typeof y === 'number'));
834
- }
835
-
836
- if (boundsToExpand.maxY === null) {
837
- boundsToExpand.maxY = Math.max(...expandYWith.filter(y => typeof y === 'number'));
838
- }
839
-
840
- axis.currentBounds = boundsToExpand;
841
- } else {
842
- axis.currentBounds = axis.targetBounds;
843
- }
802
+ axis.currentBounds = axis.targetBounds;
844
803
  continue;
845
804
  }
846
805