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

fix: new-york component type error. #784

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

linbingquan
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Fix error TS6133: '*' is declared but its value is never read.

src/components/ui/chart-area/AreaChart.vue:86:16 - error TS6133: 'd' is declared but its value is never read.

86           :x="(d: Data, i: number) => i"
                  ~

src/components/ui/chart-area/AreaChart.vue:101:16 - error TS6133: 'd' is declared but its value is never read.

101           :x="(d: Data, i: number) => i"
                   ~

src/components/ui/chart-bar/BarChart.vue:74:14 - error TS6133: 'd' is declared but its value is never read.

74         :x="(d: Data, i: number) => i"
                ~

src/components/ui/chart-bar/BarChart.vue:81:23 - error TS6133: 'd' is declared but its value is never read.

81             opacity: (d: Data, i:number) => {
                         ~

src/components/ui/chart-donut/DonutChart.vue:82:30 - error TS6133: 'ev' is declared but its value is never read.

82             click: (d: Data, ev: PointerEvent, i: number, elements: HTMLElement[]) => {
                                ~~

src/components/ui/chart-line/LineChart.vue:67:16 - error TS6133: 'd' is declared but its value is never read.

67           :x="(d: Data, i: number) => i"
                  ~

src/components/ui/chart/ChartCrosshair.vue:36:16 - error TS6133: 'd' is declared but its value is never read.

36 function color(d: unknown, i: number) {

πŸ“Έ Screenshots (if appropriate)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@linbingquan
Copy link
Author

There are import code was sorted by git-hooks. I don't want to change.
If this PR has any problem, please tell me.

@sadeghbarati sadeghbarati changed the title fix: new-york component error. fix: new-york component type error. Sep 25, 2024
@sadeghbarati
Copy link
Collaborator

Hi thanks for the PR

Those unused params or imports might be later used on refactoring charts, so let's keep it

@@ -83,7 +83,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {

<template v-for="(category, i) in categories" :key="category">
<VisArea
:x="(d: Data, i: number) => i"
:x="(_: Data, i: number) => i"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfer _d instead of _

Suggested change
:x="(_: Data, i: number) => i"
:x="(_d: Data, i: number) => i"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfer _d instead of _

Done.

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

Successfully merging this pull request may close these issues.

2 participants