WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Line Chart Pointer Strip config issue with negative values and multiple lines chart #1157

@gorkemHK

Description

@gorkemHK

Description

Hi there,
I have a chart with multiple datasets and also with negative values.
My current implementation is like this for the linechart:
<LineChart
backgroundColor={colors.white}
dataSet={processLineData}
maxValue={maxCalculatedValue}
mostNegativeValue={overAllMinPointValue}
isAnimated
formatYLabel={formatYLabel}
width={calc(260)}
height={126}
spacing={calc(260) / maxLengthOfCharts}
endSpacing={8}
curved
yAxisLabelPrefix="%"
curveType={CurveType.QUADRATIC}
yAxisSide={yAxisSides.LEFT}
yAxisThickness={0}
yAxisLabelWidth={45}
xAxisColor={colors.neutral300}
initialSpacing={8}
yAxisLabelContainerStyle={styles.labelContainer}
yAxisTextStyle={styles.yAxisText}
hideRules
adjustToWidth
xAxisType="dotted"
focusEnabled
pointerConfig={{
showPointerStrip: true,
pointerStripColor: 'magenta',
hidePointers: true,
}}
noOfSections={3}
noOfSectionsBelowXAxis={3}
stepHeight={42}
stripWidth={1}
/>

Its not visible in the negative area. Like in the below image:

Image

Would rather have a constant position in y-axis and constant height. Is that somehow possible?

Steps to reproduce

<LineChart
backgroundColor={colors.white}
dataSet={processLineData}
maxValue={maxCalculatedValue}
mostNegativeValue={overAllMinPointValue}
isAnimated
formatYLabel={formatYLabel}
width={calc(260)}
height={126}
spacing={calc(260) / maxLengthOfCharts}
endSpacing={8}
curved
yAxisLabelPrefix="%"
curveType={CurveType.QUADRATIC}
yAxisSide={yAxisSides.LEFT}
yAxisThickness={0}
yAxisLabelWidth={45}
xAxisColor={colors.neutral300}
initialSpacing={8}
yAxisLabelContainerStyle={styles.labelContainer}
yAxisTextStyle={styles.yAxisText}
hideRules
adjustToWidth
xAxisType="dotted"
focusEnabled
pointerConfig={{
showPointerStrip: true,
pointerStripColor: 'magenta',
hidePointers: true,
}}
noOfSections={3}
noOfSectionsBelowXAxis={3}
stepHeight={42}
stripWidth={1}
/>

Give a multiline dataset.

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.58

React Native version

0.74.3

Platforms

iOS

Workflow

React Native

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions