Skip to content

Commit

Permalink
fix(surveys): absolute line graph positioning breaking surveys result…
Browse files Browse the repository at this point in the history
…s graph (#18696)

do not use absolute positioning for line graph charts on surveys
  • Loading branch information
liyiy authored Nov 16, 2023
1 parent db82cff commit de6bf8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { SeriesLetter } from 'lib/components/SeriesGlyph'
import { TrendsFilter } from '~/queries/schema'
import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'
import ChartjsPluginStacked100, { ExtendedChartData } from 'chartjs-plugin-stacked100'
import clsx from 'clsx'

let tooltipRoot: Root

Expand Down Expand Up @@ -725,7 +726,10 @@ export function LineGraph_({
}, [datasets, hiddenLegendKeys, isDarkModeOn, trendsFilter, formula, showValueOnSeries, showPercentStackView])

return (
<div className="LineGraph absolute w-full h-full overflow-hidden" data-attr={dataAttr}>
<div
className={clsx('LineGraph w-full h-full overflow-hidden', { absolute: !inSurveyView })}
data-attr={dataAttr}
>
<canvas ref={canvasRef} />
{showAnnotations && myLineChart && chartWidth && chartHeight ? (
<AnnotationsOverlay
Expand Down

0 comments on commit de6bf8e

Please sign in to comment.