naikus / svg-gauge

Minimalistic, animated SVG gauge. Zero dependencies
MIT License
319 stars 74 forks source link

Adding attributes for svg paths. #3

Closed HejdesGit closed 8 years ago

HejdesGit commented 8 years ago

Would like to use this module but I'm using other design on our paths eg. 'stroke-linecap': 'round', 'stroke-linejoin': 'round' on the paths. I made it possible to add attributes to the SVG paths.

Take a look and see if you like it. Or just hit me back if something should be fixed.

There are also some problems with the formatting of your code. I'm using Webstorm and there seems to be a lot of extra tabs and spaces. Have you considered using: EditorConfig?

HejdesGit commented 8 years ago

I'm setting the attribute via css props instead. Thought there was a use case for setting attributes but on second thought, maybe not.

naikus commented 8 years ago

Thanks for pointing about EditorConfig. And I too think it'd be a good idea to style via CSS. Btw I'm going to fix the example file as suggested by you. Thanks!

naikus commented 8 years ago

Or you can submit a pull request for that :)

HejdesGit commented 8 years ago

I just did. But I closed it since I didn't see the use case right now :)

Another thing. Is there a reason for the viewbox to be that big? 1000 1000? SVG is not my expertise, just wondering. Because it looks like it paints the SVG rather big then shrinks it down with the container class.