Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

How i can scroll chart horizontally? #35

Closed
gadfil opened this issue Dec 18, 2016 · 1 comment
Closed

How i can scroll chart horizontally? #35

gadfil opened this issue Dec 18, 2016 · 1 comment

Comments

@gadfil
Copy link

gadfil commented Dec 18, 2016

Hi
For first, thank you for cool library!
How i can scroll chart horizontally?

@marzolfb
Copy link
Contributor

You should be able to do this by wrapping a ScrollView around your chart component and setting the horizontal property to true. For example, take the example app and start by taking one of the charts (like the Pie chart) and set its width to a large enough number to make it not fit on the screen. Then, it should be a matter of changing this:

     <View>
        <Pie
          data={data}
          options={options}
          accessorKey="population" />
      </View>

to this:

    <ScrollView horizontal={true}>
        <Pie
          data={data}
          options={options}
          accessorKey="population" />
      </ScrollView>

and now you should be able to scroll horizontally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants