Skip to content

Commit

Permalink
fix(lemon-ui): Fix labels on basic sparklines (#19816)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Jan 17, 2024
1 parent e5f3813 commit 6a1af49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/lemon-ui/Sparkline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function Sparkline({ labels, data }: SparklineProps): JSX.Element {
chart = new Chart(canvasRef.current?.getContext('2d') as ChartItem, {
type: 'bar',
data: {
labels: labels || Object.values(adjustedData).map(() => ''),
labels: labels || adjustedData[0].values.map((_, i) => `Entry ${i}`),
datasets: adjustedData.map((timeseries) => ({
data: timeseries.values,
minBarLength: 0,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@
"stylelint --fix",
"prettier --write"
],
"frontend/src/**.{js,jsx,mjs,ts,tsx}": [
"frontend/src/**/*.{js,jsx,mjs,ts,tsx}": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
],
"plugin-server/**.{js,jsx,mjs,ts,tsx}": [
"plugin-server/**/*.{js,jsx,mjs,ts,tsx}": [
"pnpm --dir plugin-server exec eslint --fix",
"pnpm --dir plugin-server exec prettier --write"
],
Expand Down

0 comments on commit 6a1af49

Please sign in to comment.