You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
****### Hello guys,
I actually have an issue with the XAxisTickComponent.
I have an infinite loop on my console i dont understand while, even when i remove my XAxisTickComponent function, i dont understand why....
That is the error who is looping :
ERROR TypeError: Cannot read properties of undefined (reading 'constructor')
at XAxisTicksComponent.tickFormat (swimlane-ngx-charts.mjs:5329:15)
at XAxisTicksComponent__svg_g_2_Template (swimlane-ngx-charts.mjs:221:34)
at executeTemplate (core.mjs:11268:9)
at refreshView (core.mjs:12791:13)
at detectChangesInView$1 (core.mjs:13015:9)
at detectChangesInViewIfAttached (core.mjs:12978:5)
at detectChangesInEmbeddedViews (core.mjs:12935:13)
at refreshView (core.mjs:12815:9)
at detectChangesInView$1 (core.mjs:13015:9)
at detectChangesInViewIfAttached (core.mjs:12978:5)
And this is my xAxisTickFormating function :
` xAxisTickFormatting = (val: any): string => {
if (val === null || val === undefined) {
return ''; // Ou une autre valeur par défaut comme 'N/A'
}
const formatDate = (date: Date): string => {
if (isNaN(date.getTime())) {
return 'Date invalide';
}
return date.toLocaleDateString('fr-FR', { day: '2-digit', month: '2-digit', year: 'numeric' });
};
if (val instanceof Date) {
return formatDate(val);
}
if (typeof val === 'number') {
return formatDate(new Date(val));
}
if (typeof val === 'string') {
const date = new Date(val);
if (!isNaN(date.getTime())) {
return formatDate(date);
}
// Si la chaîne n'est pas une date valide, on la retourne telle quelle
return val;
}
// Pour les objets et autres types
try {
return String(val);
} catch (error) {
console.error('Erreur lors de la conversion en chaîne :', error);
return 'Erreur de format';
}
}`
The text was updated successfully, but these errors were encountered:
****### Hello guys,
I actually have an issue with the XAxisTickComponent.
I have an infinite loop on my console i dont understand while, even when i remove my XAxisTickComponent function, i dont understand why....
That is the error who is looping :
ERROR TypeError: Cannot read properties of undefined (reading 'constructor')
at XAxisTicksComponent.tickFormat (swimlane-ngx-charts.mjs:5329:15)
at XAxisTicksComponent__svg_g_2_Template (swimlane-ngx-charts.mjs:221:34)
at executeTemplate (core.mjs:11268:9)
at refreshView (core.mjs:12791:13)
at detectChangesInView$1 (core.mjs:13015:9)
at detectChangesInViewIfAttached (core.mjs:12978:5)
at detectChangesInEmbeddedViews (core.mjs:12935:13)
at refreshView (core.mjs:12815:9)
at detectChangesInView$1 (core.mjs:13015:9)
at detectChangesInViewIfAttached (core.mjs:12978:5)
And this is my xAxisTickFormating function :
` xAxisTickFormatting = (val: any): string => {
if (val === null || val === undefined) {
return ''; // Ou une autre valeur par défaut comme 'N/A'
}
}`
The text was updated successfully, but these errors were encountered: