Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(surveys): absolute line graph positioning breaking surveys results graph #18696

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading