react-comparison-bar-chart
Advanced tools
Comparing version 1.1.71 to 1.1.72
@@ -473,2 +473,10 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
if (rightTopValue < leftTopValue * 0.5) { | ||
rightTopValue = leftTopValue / 2; | ||
} | ||
if (leftTopValue < rightTopValue * 0.5) { | ||
leftTopValue = rightTopValue / 2; | ||
} | ||
var rawTotalRange = rightTopValue + leftTopValue; | ||
@@ -491,6 +499,14 @@ var rightMax; | ||
axisIncrement = 2; | ||
} else { | ||
} else if (rawTotalRange < 35) { | ||
rightMax = 3 * Math.ceil(rightTopValue / 3); | ||
leftMax = 3 * Math.ceil(leftTopValue / 3); | ||
axisIncrement = 3; | ||
} else if (rawTotalRange < 60) { | ||
rightMax = 5 * Math.ceil(rightTopValue / 5); | ||
leftMax = 5 * Math.ceil(leftTopValue / 5); | ||
axisIncrement = 5; | ||
} else { | ||
rightMax = 10 * Math.ceil(rightTopValue / 10); | ||
leftMax = 10 * Math.ceil(leftTopValue / 10); | ||
axisIncrement = 10; | ||
} | ||
@@ -497,0 +513,0 @@ |
@@ -471,2 +471,10 @@ import React, { useState, useRef, useEffect } from 'react'; | ||
if (rightTopValue < leftTopValue * 0.5) { | ||
rightTopValue = leftTopValue / 2; | ||
} | ||
if (leftTopValue < rightTopValue * 0.5) { | ||
leftTopValue = rightTopValue / 2; | ||
} | ||
var rawTotalRange = rightTopValue + leftTopValue; | ||
@@ -489,6 +497,14 @@ var rightMax; | ||
axisIncrement = 2; | ||
} else { | ||
} else if (rawTotalRange < 35) { | ||
rightMax = 3 * Math.ceil(rightTopValue / 3); | ||
leftMax = 3 * Math.ceil(leftTopValue / 3); | ||
axisIncrement = 3; | ||
} else if (rawTotalRange < 60) { | ||
rightMax = 5 * Math.ceil(rightTopValue / 5); | ||
leftMax = 5 * Math.ceil(leftTopValue / 5); | ||
axisIncrement = 5; | ||
} else { | ||
rightMax = 10 * Math.ceil(rightTopValue / 10); | ||
leftMax = 10 * Math.ceil(leftTopValue / 10); | ||
axisIncrement = 10; | ||
} | ||
@@ -495,0 +511,0 @@ |
{ | ||
"name": "react-comparison-bar-chart", | ||
"version": "1.1.71", | ||
"version": "1.1.72", | ||
"description": "Vertical comparison bar chart component for comparing the difference in values between two datasets.", | ||
@@ -5,0 +5,0 @@ "author": "wsoeltz", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
155374
1353