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

[Bug]: ccv-gauge-chart Not Displaying Correctly in Production - this.getHolder() from the core is not working #1823

Open
mohamedMok opened this issue May 17, 2024 · 1 comment

Comments

@mohamedMok
Copy link

Application/Team

external

What happened?

Description

When using the ccv-gauge-chart, the chart displays properly in development mode, but it fails to work correctly in both preview and production environments. I am experiencing a specific error in the production environment related to the function this.getHolder() from the core library.

Environment

Vue: 3.24.21
@carbon/charts-vue: 1.16.0
Build Tool: Vite
Error Details
In the production environment, the following error appears in the browser console:

Error: this.getHolder return undefined

It seems like the function this.getHolder() from the core library is not functioning as expected.

Steps to Reproduce

1 Import the charts in the Vue application as shown below:

import ChartsVue from '@carbon/charts-vue';
...
app.use(ChartsVue);
...

2 Use the chart component in a Vue template with the following setup:

const chartOptions = {
  title: props.title,
  animation: true,
  height: '130px',
  // width: '100%',
  toolbar: {
    enabled: false
  },
  color: {
    pairing: {
      option: 3
    }
  },
  gauge: {
    type: 'semi'
  }
}

<template>
  <div id="chart-demo">
    <ccv-gauge-chart id="chart" :data="chartData" :options="chartOptions"></ccv-gauge-chart>
  </div>
</template>

Additional Information

The chart displays correctly in development mode.
The issue occurs only in preview and production environments.

Request for Assistance

I suspect I might have missed something in the configuration or there could be an issue related to the production build process. Could you please help me identify and resolve the issue?

Configuration Files

If relevant, please find attached or referenced the configuration files for Vite and other related setup.

Thank you in advance for your assistance!

Version

@carbon/charts-vue@1.16.0

Data & options used

No response

Relevant log output

No response

StackBlitz example

No response

What priority level would this be in your opinion?

P2

@mohamedMok
Copy link
Author

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