Giter Club home page Giter Club logo

Comments (4)

zgordon01 avatar zgordon01 commented on June 18, 2024

Can you please provide a code snippet?

Also note a few disclaimers in the strokeCap section of our docs, which might be applying here.

strokeCap ( round , butt ) defaults to butt - string, optional
PLEASE NOTE If using strokeCap={'round'} it is highly recommended to use a higher innerRadius (around 60% of radius and higher) in addition to not having very small percentage sections. This will ensure proper display. We hope to address these issues in future PRs

from react-native-pie.

SiyabongaNzulwana avatar SiyabongaNzulwana commented on June 18, 2024

@zgordon01 thanks for the response, I did read the disclaimers, however even if I change/play around with the radius and inner_Radius, I still get the same results. below is the snippet of code you asked for.

  render() {
    return (
      <View style={styles.container}>
        <View style={styles.pieViewWrapper}>
          <View style={styles.yourConnections}>
            <Pie
              radius={120}
              innerRadius={100}
              sections={[
                {
                  percentage: 50,
                  color: '#48d1cc',
                },
              ]}
              backgroundColor="#EBECF0"
              strokeCap={'round'}
            />
          </View>
        </View>
        <View style={styles.pieViewWrapper}>
          <View style={styles.connectionsPerfomance}>
            <Pie
              radius={150}
              innerRadius={130}
              sections={[
                {
                  percentage: 90,
                  color: '#66cdaa',
                },
              ]}
              backgroundColor="#EBECF0"
              strokeCap={'round'}
            />
          </View>
        </View>
        <View style={styles.pieViewWrapper}>
          <View style={styles.communityPerfomance}>
            <Pie
              radius={180}
              innerRadius={160}
              sections={[
                {
                  percentage: 40,
                  color: '#ffd700',
                },
              ]}
              backgroundColor="#EBECF0"
              strokeCap={'round'}
            />
          </View>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    justifyContent: 'center',
    alignItems: 'center',
    height: height * 0.5,
    width: width,
  },
  pieViewWrapper: {
    position: 'absolute',
    justifyContent: 'center',
    alignItems: 'center',
  },
  yourConnections: {
    alignItems: 'center',
    justifyContent: 'center',
  },
  connectionsPerfomance: {
    alignItems: 'center',
    justifyContent: 'center',
  },
  communityPerfomance: {
    alignItems: 'center',
    justifyContent: 'center',
  },
  points: {
    color: '#000',
    fontSize: 35,
    fontWeight: 'bold',
  },
  pointsText: {
    color: 'grey',
    fontSize: 10,
    alignSelf: 'center',
  },
})

from react-native-pie.

SiyabongaNzulwana avatar SiyabongaNzulwana commented on June 18, 2024

@zgordon01, @nihgwu I have managed to figure out what was going wrong with the strokeCap prop on version 1.1.2 of react-native-pie I have sent a PR for it.

from react-native-pie.

gokulrajkp avatar gokulrajkp commented on June 18, 2024

I'm still getting this issue how do u guys solve this

from react-native-pie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.