-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
refactor: remaining realtime charts to TS #33111
Changes from 19 commits
beb6aa8
712887a
da33ffe
bf91700
a2dbbcb
2855861
8dc2486
29273d9
2cdea1f
6ad50ab
b132486
6430147
54b1f05
26ee490
addf0c4
897644e
63a6440
213d47b
1b469ac
7b40315
bf56487
8f510b9
ba9a2f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ type LineChartConfigOptions = Partial<{ | |
anim: boolean; | ||
displayColors: boolean; | ||
tooltipCallbacks: any; | ||
smallTicks: boolean; | ||
}>; | ||
|
||
const lineChartConfiguration = ({ | ||
|
@@ -108,7 +109,7 @@ const doughnutChartConfiguration = ( | |
|
||
type ChartDataSet = { | ||
label: string; | ||
data: number; | ||
data: number[]; | ||
backgroundColor: string; | ||
borderColor: string; | ||
borderWidth: number; | ||
|
@@ -128,12 +129,11 @@ export const drawLineChart = async ( | |
chartContext: { destroy: () => void } | undefined, | ||
chartLabels: string[], | ||
dataLabels: string[], | ||
dataSets: number[], | ||
dataSets: number[][], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it was wrong before, but since the files that consumed this type were all in js, no error was raised |
||
options: LineChartConfigOptions = {}, | ||
): Promise<ChartType<'line', number, string> | void> => { | ||
): Promise<ChartType> => { | ||
if (!chart) { | ||
console.error('No chart element'); | ||
return; | ||
throw new Error('No chart element'); | ||
} | ||
if (chartContext) { | ||
chartContext.destroy(); | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this type change expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it was wrong before, but since the files that consumed this type were all in js, no error was raised