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

BarGroupChart : X tick label is not centered #46

Open
aesteve opened this issue Feb 14, 2017 · 0 comments
Open

BarGroupChart : X tick label is not centered #46

aesteve opened this issue Feb 14, 2017 · 0 comments

Comments

@aesteve
Copy link

aesteve commented Feb 14, 2017

As a very minimal reproducer :

import React, {Component} from 'react';
import { BarGroupChart } from 'react-d3-basic';


export default () => {
	const data = [{age: 10, populationHere: 50, populationThere: 75}, {age: 20, populationHere: 100, populationThere: 95}, {age: 30, populationHere: 120, populationThere: 65}];
	const chartSeries = [{field: "populationHere", name: "Population Here", color: 'red'}, {field: "populationThere", name: "Population There", color: 'blue'}];
	const x = d => d.age;
	return (
		<BarGroupChart
			width={1000}
			height={200}
			x={x}
			chartSeries={chartSeries}
			xScale="ordinal"
			xLabel="Population"
			showYGrid={false}
			showXGrid={false}
			data={data} />
	);
};

image

As you can see on the picture above, the label is not displayed in between the two bars, but abit too much to the right.

Are you aware of that ? Is this on purpose ? Can I change this behaviour somehow ?

Thanks for your help.

@aesteve aesteve changed the title BarGroupChart : X label is not centered BarGroupChart : X tick label is not centered Feb 14, 2017
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

No branches or pull requests

1 participant