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

Missing axis ticks on bar chart #3020

Closed
Alex-Dettinger opened this issue Jan 6, 2023 · 1 comment
Closed

Missing axis ticks on bar chart #3020

Alex-Dettinger opened this issue Jan 6, 2023 · 1 comment
Labels

Comments

@Alex-Dettinger
Copy link

Description

I've migrated our project from c3 to the latest version of billboard.js. All charts are worked as previously except that there are not tick marks on the axes of our bar chart

Steps to reproduce

Our bar chart is detailed below. I've also needed to make some changes to our scss to adjust the axes thickness.

this.chart = bb.generate({
                bindto: '#chart-container',
                size: {
                    height: 350,
                    width: 600,
                },
                legend: {
                    show: false,
                },
                tooltip: {
                    show: false,
                },
                data: {
                    type: bar(),
                    json: this.state.data,
                    keys: {
                        x: 'letter_grade',
                        value: ['num_learners'],
                    },
                },
                axis: {
                    x: {
                        type: 'category',
                    },
                    y: {
                        padding: {
                            top: 120,
                        },
                        tick: {
                            format: d3.format("d"),
                        },
                    },
                },
            });
.bb-axis.bb-axis-y path {
  stroke-width: 1px;
  stroke: #000;
  fill: none;
}

.bb-axis.bb-axis-x path {
  stroke-width: 1px;
  stroke: #000;
  fill: none;
}

Old Chart:
Screen Shot 2023-01-06 at 2 50 50 PM

New Chart:
Screen Shot 2023-01-06 at 2 50 59 PM

@netil netil added the question label Jan 9, 2023
@netil
Copy link
Member

netil commented Jan 9, 2023

Hi @Alex-Dettinger, I made an online working example based on your generation code I couldn't find any issues.

Ticks display can be handle by axis.x.tick.show option, which the default is set to display.

@netil netil closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants