terezka / elm-charts

Create SVG charts in Elm.
https://www.elm-charts.org
BSD 3-Clause "New" or "Revised" License
734 stars 67 forks source link

Basic bar chart #22

Closed vizowl closed 7 years ago

vizowl commented 7 years ago

Thanks for the great library.

I have added a basic bar chart for my own purposes - if you would like to incorporate it into the core please do. Let me know if you would like to change anything ...

I increased the default padding on plots to 40px in order to support y axis labels.

The bar chart demo plots use the tickValues function to ensure that only the actual bars have ticks - it would be nice to make that the default for barCharts - but that was a bigger change than I wanted to make initially.

vizowl commented 7 years ago

@terezka Haha - I see you have just made a massive change that includes adding bar charts. I'll delete close this pull request. I looks like you have not added horizontal bars yet so I will add those for my own purposes and submit a new pull request.

This will be the third version of the elm-plot API that I have written against - but it keeps getting better - great work!

terezka commented 7 years ago

Thanks, @vizowl!!

Yeah, I just merged a bunch of stuff! I'll make the horizontal bars out asap! I'm still a little undecided on the api, but just wanted to get a version out. I'll of course have a look at your work though! Maybe I can use it for the current implementation.

I haven't actually published the new version yet as I'm waiting for elm-lang/dom to merge my PR, so I don't have to use native modules for the hint module. Not sure how long it will take 😱

nikgraf commented 7 years ago

awesome contribution @vizowl