react-native-pathjs-charts icon indicating copy to clipboard operation
react-native-pathjs-charts copied to clipboard

Documentation ?

Open fxfactorial opened this issue 8 years ago • 9 comments
trafficstars

Is there any documentation ? At least to give the schema of the objects for config of the charts?

Example, I want the x axis labels to be just horizontal, the example makes labels that are like 120 degrees.

fxfactorial avatar May 03 '17 12:05 fxfactorial

See the wiki and example app. It's pretty straight forward.

superandrew213 avatar May 03 '17 12:05 superandrew213

@superandrew213 Thanks for quick reply. Yea I see the examples but this examples have code rot eventually over time. It would be much better if you documented exactly what kinds of keys and values are appropriate.

I don't see what I need to do to change in configs to make the labels be horizontal. Can you help me with that?

fxfactorial avatar May 03 '17 12:05 fxfactorial

I'm assuming you are referring to the label rotation for the BarChart?

There is no setting for the label rotation yet. I needed this too so I added a rotate option. See my PR https://github.com/capitalone/react-native-pathjs-charts/pull/144. You can use that until it gets merged.

Add it like this:

    axisX: {
      showAxis: true,
      showLines: true,
      showLabels: true,
      showTicks: true,
      zeroAxis: false,
      orient: 'bottom',
      label: {
        fontFamily: 'Arial',
        fontSize: 8,
        fontWeight: true,
        fill: '#34495E',
        rotate: 0,  // <==== here
      }
    },

superandrew213 avatar May 03 '17 12:05 superandrew213

Yes, nice. Thanks.

fxfactorial avatar May 03 '17 12:05 fxfactorial

Agreed the documentation is lacking and describing all the configuration options in more detail on the wiki is desirable. As is a typical response, its just a matter of finding time to make it happen. It's a shame Github doesn't have a natural PR mechanism to allow for community-driven content for wikis like they do normally for the repository.

I will leave this open as a reminder to get it done and close it once there is some base level of documentation describing configuration options as you suggest.

marzolfb avatar May 03 '17 13:05 marzolfb

Many repositories use README for documentation purposes. Changing the documentation from wiki to readme would enable improvements from the community and speed things up significantly. While the wiki naturally is a better place for documentation it seems to be a reasonable trade-off. What do you think @marzolfb?

Jacse avatar May 05 '17 07:05 Jacse

@marzolfb and I have been talking offline about this for a while. The wiki was nice in that it let the documentation be searched separately. Unfortunately you lose the ability to have pull requests (very common complaint of the wiki around github). The readme also would get very bloated if all the documentation was there (even as small as it is right now). We were mostly circling around putting them into a docs folder, even though we would lose the search ability the wiki gives us. Regardless, there isn't any good solution here, but for now we've moved it into a docs folder that has been configured as the gh-pages location. This will let it be edited in a PR at least.

katscott avatar May 05 '17 15:05 katscott

@katscott that seems like a reasonable solution.

Jacse avatar May 05 '17 16:05 Jacse

This is really helpful guys. Thanks I want to make bars horizontal. I am not able to do it. Can anyone help ? Thanks

smitthakkar1 avatar Jul 20 '17 17:07 smitthakkar1