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

Charts are not working with latest version 1.15.7 #1820

Open
jreddy2024 opened this issue May 8, 2024 · 2 comments
Open

Charts are not working with latest version 1.15.7 #1820

jreddy2024 opened this issue May 8, 2024 · 2 comments

Comments

@jreddy2024
Copy link

Application/Team

IBMT

What happened?

Option names are not appearing in Graphs menu. Its showing blank names. using latest version - 1.15.7
image

Expected is - using older version 1.13.4
image

Version

"@carbon/charts-react": "1.15.7",

Data & options used

options: {
                title: 'Total HBCU User course enrollments',
                data: {
                    selectedGroups: [],
                },
                axes: {
                    left: {
                        mapsTo: 'value',
                        scaleType: 'linear',
                        title: 'Volume',
                    },
                    bottom: {
                        mapsTo: 'key',
                        scaleType: 'labels',
                        title: 'Date',
                    },
                },
                legend: {
                    order: [],
                },
                toolbar: {
                    enabled: true,
                    numberOfIcons: 3,
                    controls: [
                        {
                            type: 'Show as data-table',
                        },
                        {
                            type: 'Make fullscreen',
                        },
                        {
                            type: 'Custom',
                            text: 'Export as XLS',
                            clickFunction: () => {
                                this.download();
                            },
                        },
                        {
                            type: 'Custom',
                            text: 'Sort by Year',
                            clickFunction: () => {
                                this.updateGrpah('Year');
                            },
                        },
                        {
                            type: 'Custom',
                            text: 'Sort by Month',
                            clickFunction: () => {
                                this.updateGrpah('Month');
                            },
                        }
                    ],
                },
                color: {
                    scale: {},
                },
                curve: 'curveMonotoneX',
                height: '400px',
            },

<div className='bx--col-lg-10'>
                            <LineChart data={this.state.data} options={this.state.options}></LineChart>
                        </div>

Relevant log output

No response

StackBlitz example

No response

What priority level would this be in your opinion?

P1

@nstuyvesant
Copy link
Contributor

Here is a StackBlitz repro with made-up data...
https://stackblitz.com/edit/react-2njdag?file=src%2Foptions.js,src%2Fdata.js

@nstuyvesant
Copy link
Contributor

@jreddy2024 - can you please rename this issue to "Custom names for toolbar dropdowns not working in @carbon/charts-react 1.15.7+"?

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

2 participants