question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label are not showing properly/overlapping

See original GitHub issue

http://prntscr.com/j45qov

Lables are not showing properly, My Code

import React from 'react'
import { BarChart, XAxis } from 'react-native-svg-charts'
import { View } from 'react-native'
import * as scale from 'd3-scale'

class ChartExample extends Component {

    render() {

        const data = [ 14, 80, 100, 55 ]

        return (
            <View style={{ height: 200, padding: 20 }}>
                <BarChart
                    style={{ flex: 1 }}
                    data={data}
                    gridMin={0}
                    svg={{ fill: 'rgb(134, 65, 244)' }}
                />
                <XAxis
                    style={{ marginTop: 10 }}
                    data={ data }
                    scale={scale.scaleBand}
                    formatLabel={ (value, index) => index }
                    labelStyle={ { color: 'black' } }
                />
            </View>
        )
    }

}

I tried all barcharts example its the same issue with labels, anyone knows whats the issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:38 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
burhanahmed92commented, Apr 16, 2018

found the issue buddy. Issue was with svg dependency. Your charts library supports <= 5.5.1 react-native-svg. Mine was 6.3.1 so i downgraded to 5.5.1 and it works. Anyway thanks

2reactions
JesperLeklandcommented, Apr 16, 2018

@burhanahmed92 Kindly respect that this is an open source project, if you find something lacking you are more than welcome to contribute. This is something I work on on my spare time, for free. I have had very little feedback on people having problems with this library seeing how many people use it and I try to help out as much as possible with those who do. Please show respect to people working on open source.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The overlapping point is not displayed in ArcGIS Pro.
When point features are placed closely together or overlap one another, some of the point labels are not displayed.
Read more >
Prevent Overlapping Data Labels in Excel Charts - Peltier Tech
Data labels are terribly tedious to apply to slope charts, since these labels have to be positioned to the left of the first...
Read more >
How to properly draw and label overlapping polygons?
I would like to show overlapping polygons on a single layer. The polygons are coloured based on a property and labelled according to...
Read more >
Flot: Stacked bar labels overlapping / not showing
The issue is that the stacked bars overlap / doesn't show all distinct labels stacked sometimes (see third bar in first chart). Not...
Read more >
Prevent labels from overlapping certain features—ArcGIS Pro
The Maplex Label Engine places labels to avoid overlapping important features. A feature weight of 0 indicates that the feature should be treated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found