def setup(self):

        # handle special case of inputs as measures
        if self.measure_input:
            stack_flags = self.stack_flags
            id_cols = self.get_id_cols(stack_flags)

            # if we have measures input, we need to stack by something, set default
            if all(attr is False for attr in list(stack_flags.values())):
                stack_flags['color'] = True

            # stack the measurement dimension while keeping id columns
            self._stack_measures(ids=id_cols)

            # set the attributes to key off of the name of the stacked measurement
            source = ColumnDataSource(self._data.df)
            for attr_name, stack_flag in iteritems(stack_flags):
                if stack_flags[attr_name]:
                    default_attr = self.attributes[attr_name]
                    default_attr.setup(columns='series', data=source)

        # Handle when to use special column names
        if self.x.selection is None and self.y.selection is not None:
            self.x.selection = 'index'
        elif self.x.selection is not None and self.y.selection is None:
            self.y.selection = 'index'
Handle input options that require transforming data and/or user selections.
dataset/ETHPy150Open bokeh/bokeh/bokeh/charts/builders/line_builder.py/LineBuilder.setup