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

Allow full config #37

Merged
merged 6 commits into from
May 11, 2017
Merged

Allow full config #37

merged 6 commits into from
May 11, 2017

Conversation

ilyavf
Copy link
Contributor

@ilyavf ilyavf commented May 10, 2017

Simply bit-c3 to accept a config object which will be passed to c3 to generate chart.

Issues: #19, #23

Config object:

let config = {
  axis: {
    x: {
      type: 'category',
      tick: {
        rotate: -45,
        multiline: false
      },
      height: 130
    }
  }
};
let axisXData = new DefineList(['x','cat 1','cat 2','cat 3'])

Template:

<bit-c3 {config}="config">
	<bit-c3-data type="{type}">
		{{#each dataColumns}}
			<bit-c3-data-column value="{.}" {axis-x}="axisXData" />
		{{/each}}
	</bit-c3-data>
</bit-c3>

Will generate barchart with x category labels rotated by -45:
image

@ilyavf ilyavf changed the title Allow configure axis-x Allow full config May 11, 2017
@ilyavf ilyavf merged commit f093e69 into master May 11, 2017
@ilyavf ilyavf deleted the dev/axis-x branch May 11, 2017 14:02
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