def _chart_data(self, chart, rows):
        def p2f(column):
            return float(column['html'].strip('%')) / 100.0

        if rows:
            charts = [[], [], []]
            for row in rows:
                group_name = row[0]
                total = sum(row[1:])
                total = float(total) if total else 1.0
                for ix, column in enumerate(row[1:]):
                    charts[ix].append({'x': group_name, 'y': float(column) / total})

            chart.add_dataset('None', charts[0], "red")
            chart.add_dataset('Some', charts[1], "yellow")
            chart.add_dataset('All', charts[2], "green")
dataset/ETHPy150Open dimagi/commcare-hq/custom/care_pathways/reports/adoption_disaggregated_report.py/AdoptionDisaggregatedReport._chart_data/original