Revert "Hid wierd percentage and added percent symbol"
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This reverts commit d315f2904e
.
pull/156/head
parent
d315f2904e
commit
229260cba9
|
@ -53,14 +53,6 @@ export type StackedBarProps = {
|
|||
scalePadding?: number;
|
||||
/** Margin for each item in the legend */
|
||||
itemMargin?: string;
|
||||
/** Hide the first data value in tooltip*/
|
||||
hideDataValueInTooltip?: boolean;
|
||||
//** Top tooltip label */
|
||||
tooltipTopLabel?: string;
|
||||
//** Bottom tooltip label */
|
||||
tooltipBottomLabel?: string;
|
||||
//** Display percentage */
|
||||
displayPercentage?: boolean;
|
||||
};
|
||||
|
||||
let tooltipTimeout: number;
|
||||
|
@ -87,10 +79,6 @@ export const StackedBarGraphVertical = withTooltip<
|
|||
tooltipData,
|
||||
hideTooltip,
|
||||
showTooltip,
|
||||
hideDataValueInTooltip,
|
||||
tooltipBottomLabel = "",
|
||||
tooltipTopLabel = "",
|
||||
displayPercentage,
|
||||
}: StackedBarProps & WithTooltipProvidedProps<TooltipData>) => {
|
||||
const yTotals = data.reduce((allTotals, currCategory) => {
|
||||
const yTotal = keys.reduce((categoryTotal, k) => {
|
||||
|
@ -242,15 +230,8 @@ export const StackedBarGraphVertical = withTooltip<
|
|||
left={tooltipLeft}
|
||||
header={tooltipData.key}
|
||||
>
|
||||
{hideDataValueInTooltip ? null : (
|
||||
<p>
|
||||
{tooltipTopLabel} {tooltipData.bar.data[tooltipData.key]}
|
||||
{displayPercentage ? "%" : ""}
|
||||
</p>
|
||||
)}
|
||||
<p>
|
||||
{tooltipBottomLabel} {getCategory(tooltipData.bar.data)}
|
||||
</p>
|
||||
<p>{tooltipData.bar.data[tooltipData.key]}</p>
|
||||
<p>{getCategory(tooltipData.bar.data)}</p>
|
||||
</TooltipWrapper>
|
||||
) : null}
|
||||
</div>
|
||||
|
@ -280,10 +261,6 @@ export const StackedBarGraphHorizontal = withTooltip<
|
|||
tooltipData,
|
||||
hideTooltip,
|
||||
showTooltip,
|
||||
hideDataValueInTooltip,
|
||||
tooltipBottomLabel = "",
|
||||
tooltipTopLabel = "",
|
||||
displayPercentage,
|
||||
}: StackedBarProps & WithTooltipProvidedProps<TooltipData>) => {
|
||||
const yTotals = data.reduce((allTotals, currCategory) => {
|
||||
const yTotal = keys.reduce((categoryTotal, k) => {
|
||||
|
@ -432,15 +409,8 @@ export const StackedBarGraphHorizontal = withTooltip<
|
|||
left={tooltipLeft}
|
||||
header={tooltipData.key}
|
||||
>
|
||||
{hideDataValueInTooltip ? null : (
|
||||
<p>
|
||||
{tooltipTopLabel} {tooltipData.bar.data[tooltipData.key]}
|
||||
{displayPercentage ? "%" : ""}
|
||||
</p>
|
||||
)}
|
||||
<p>
|
||||
{tooltipBottomLabel} {getCategory(tooltipData.bar.data)}
|
||||
</p>
|
||||
<p>{tooltipData.bar.data[tooltipData.key]}</p>
|
||||
<p>{getCategory(tooltipData.bar.data)}</p>
|
||||
</TooltipWrapper>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
@ -231,8 +231,6 @@ export default function CoopPage() {
|
|||
]}
|
||||
data={C7v}
|
||||
margin={barGraphMargin}
|
||||
hideDataValueInTooltip
|
||||
tooltipBottomLabel="Coop Term: "
|
||||
/>
|
||||
</div>
|
||||
</ComponentWrapper>
|
||||
|
@ -258,8 +256,6 @@ export default function CoopPage() {
|
|||
]}
|
||||
data={C7vi}
|
||||
margin={barGraphMargin}
|
||||
tooltipBottomLabel="Coop Term: "
|
||||
displayPercentage
|
||||
/>
|
||||
</div>
|
||||
</ComponentWrapper>
|
||||
|
|
Loading…
Reference in New Issue