0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00

fix(lemon-ui): Fix labels on basic sparklines (#19816)

This commit is contained in:
Michael Matloka 2024-01-17 17:36:18 +01:00 committed by GitHub
parent e5f3813976
commit 6a1af4952f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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"
],