Skip to content

Commit

Permalink
Stringify tick labels (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkfreeman authored Nov 13, 2024
1 parent b98b2ee commit 7fa90ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/getPlotOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ export function getTickFormatter(
) {
if (colType === "string") {
return {
tickFormat: (text: string) =>
truncateText(text, direction, width, height),
tickFormat: (value: unknown) => {
return truncateText(String(value), direction, width, height);
},
};
}
return {};
Expand Down

0 comments on commit 7fa90ec

Please sign in to comment.