diff --git a/frontend/src/scenes/surveys/SurveyView.tsx b/frontend/src/scenes/surveys/SurveyView.tsx index c1474f3316be9..0f3e3d8416aab 100644 --- a/frontend/src/scenes/surveys/SurveyView.tsx +++ b/frontend/src/scenes/surveys/SurveyView.tsx @@ -12,7 +12,7 @@ import { surveyLogic } from './surveyLogic' import { surveysLogic } from './surveysLogic' import { PageHeader } from 'lib/components/PageHeader' import { SurveyReleaseSummary } from './Survey' -import { ChartDisplayType, PropertyFilterType, PropertyOperator, Survey, SurveyQuestionType, SurveyType } from '~/types' +import { PropertyFilterType, PropertyOperator, Survey, SurveyQuestionType, SurveyType } from '~/types' import { SurveyAPIEditor } from './SurveyAPIEditor' import { NodeKind } from '~/queries/schema' import { dayjs } from 'lib/dayjs' @@ -271,6 +271,7 @@ export function SurveyResult({ disableEventsTable }: { disableEventsTable?: bool
{surveyNPSScore}
Total NPS Score
{featureFlags[FEATURE_FLAGS.SURVEYS_RESULTS_VISUALIZATIONS] && ( + // TODO: rework this to show nps scores over time )} @@ -383,7 +384,6 @@ function SurveyNPSResults({ survey }: { survey: Survey }): JSX.Element { ], trendsFilter: { formula: '(A / (A+B+C) * 100) - (C / (A+B+C)* 100)', - display: ChartDisplayType.ActionsLineGraphCumulative, }, }, }} diff --git a/frontend/src/scenes/surveys/surveyLogic.tsx b/frontend/src/scenes/surveys/surveyLogic.tsx index a7a34a939a89b..df328e14a22bc 100644 --- a/frontend/src/scenes/surveys/surveyLogic.tsx +++ b/frontend/src/scenes/surveys/surveyLogic.tsx @@ -653,7 +653,7 @@ export const surveyLogic = kea([ const passives = questionResults.slice(7, 9).reduce((a, b) => a + b, 0) const detractors = questionResults.slice(0, 7).reduce((a, b) => a + b, 0) const npsScore = ((promoters - detractors) / (promoters + passives + detractors)) * 100 - return npsScore + return npsScore.toFixed(1) } } },