• Bill Lorensen's avatar
    BUG: ChartPie tooltip is wrong · e3025f5a
    Bill Lorensen authored
    ChartPie's tooltip is formatted in
    vtkChartPie::LocatePointInPlot. This method relies on
    PlotPie:::GetNearestPoint, but the plotpos vector was not being
    computed by GetNearestPoint. Consequently, the tooltip always reported
    a 0 value for the dependent variable.
    In this patch, PlotPie:::GetNearestPoint computes the dependent
    variable and return it in plotpos[1]. In addition, plotpos returns the
    independent vaiable in plotpos[0]. ChartPie now uses plotPos.GetY() to
    obtain the dependent variable. This seems consistent with other
    To reproduce the problem (before the patch) and verify (after the
    patch) run:
    vtkChartsCoreCxxTests "TestPieChart" -I
    and move the mouse of each pie chart segment.
    Change-Id: I5c3d56a79c3ceca6616bae2b0a7a85f9c15f2293
vtkPlotPie.cxx 7.18 KB