def set_default_hcoptions(self):
        self.hcoptions = HCOptions({})
        # series and terms
        dss = self.datasource.series
        terms = self.series_options.keys()
        # legend by
        lgby_dict = dict(((t, dss[t]['legend_by']) for t in terms))
        lgby_vname_lists= [[dss[t]['field_aliases'].get(lgby, lgby) 
                            for lgby in lgby_tuple]
                           for (t, lgby_tuple) in lgby_dict.items()]
        lgby_titles = (':'.join(lgby_vname_list).title() for 
                       lgby_vname_list in lgby_vname_lists) 
        # chart title
        term_titles = (t.title() for t in terms)
        title = ''
        for t, lg in zip(term_titles, lgby_titles):
            if not lg:
                title += "%s, " % t
            else:
                title += "%s (lgnd. by %s), "  %(t, lg)
        categories = dss[terms[0]]['categories']
        categories_vnames = [dss[terms[0]]['field_aliases'][c].title() 
                             for c in categories]
        category_title = ':'.join(categories_vnames)
        chart_title = (title[:-2], category_title) % "%s vs. %s"
        self.hcoptions['title']['text'] = chart_title
dataset/ETHPy150Open pgollakota/django-chartit/chartit/charts.py/PivotChart.set_default_hcoptions/swapped operands of `%`