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

How to add 0 in bar chart? #374

Open
NabeelAhmed23 opened this issue Jul 16, 2024 · 1 comment
Open

How to add 0 in bar chart? #374

NabeelAhmed23 opened this issue Jul 16, 2024 · 1 comment

Comments

@NabeelAhmed23
Copy link

I have following data :
const data: DataInterface[] = [
{
label: "React Charts",
data: [
{
value: 23000,
plateform: "Linux",
color: "#95A5FD",
},
{
value: 18000,
plateform: "Mac",
color: "#C0DEFF",
},
{
value: 26000,
plateform: "iOS",
color: "#1C1C1C",
},
{
value: 32000,
plateform: "Windows",
color: "#B1E3FE",
},
{
value: 38000,
plateform: "Android",
color: "#A9C5DA",
},
{
value: 20000,
plateform: "Other",
color: "#C0DEFF",
},
],
},
];

This is just for testing, not actual data. Following is the rendered chart. The bar for mac is not showing because it has the lowest value and the chart minimum value is 18k.

image

@NabeelAhmed23
Copy link
Author

Figured it out:
image

For me this worked.

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