Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the stroke-width of the stroke between the slices configurable. #4

Merged
merged 3 commits into from
Nov 5, 2014

Conversation

tafsiri
Copy link
Contributor

@tafsiri tafsiri commented Nov 4, 2014

3rd change I made, makes the stroke width configurable.

(function() {
  var data = [
    { label: 'one', value: 2 },
    { label: 'two', value: 5 },
    { label: 'three', value: 1.5 },
    { label: 'other', value: 1 }
  ],
  pie = d3.select('#pie')
    .append('svg')
      .attr('width', 450)
      .attr('height', 300)
      .chart('Pie', {
        width: 450,
        height: 300,
        radius: 100,
        donutHole: {
          radius: 80,
          color: 'white'
        },
        labelTemplate: '{label}: {value}',
        legend: false
      })
      .strokeWidth(5);

  pie.draw(data);
}());

@knownasilya
Copy link
Owner

@tafsiri This no longer merges, if you could make the changes and update the readme (for the other changes as well, if you can) with your change that would be great. Thanks!

@tafsiri
Copy link
Contributor Author

tafsiri commented Nov 5, 2014

@knownasilya I remerged and updated the branch. I also updated the readme, and made it so colors could be set in the options hash.

I also made a small fix to the original example in the readme, height and width were being called before the chart was instantiated on the selection and this were not available. I changed those to attr('height', ) and attr('width', ) respectively.

Thanks

knownasilya pushed a commit that referenced this pull request Nov 5, 2014
Make the stroke-width of the stroke between the slices configurable.
@knownasilya knownasilya merged commit bf67fbf into knownasilya:master Nov 5, 2014
@knownasilya
Copy link
Owner

Thanks again!

@knownasilya
Copy link
Owner

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

Successfully merging this pull request may close these issues.

2 participants