public static GETCATEGORICALCOLUMNS()

in src/BulletChartColumns.ts [96:120]


    public static GETCATEGORICALCOLUMNS(dataView: DataView): BulletChartColumns<DataViewCategoryColumn & DataViewValueColumn[] & DataViewValueColumns> {
        const categorical: DataViewCategorical = dataView && dataView.categorical,
            categories = categorical && categorical.categories || [],
            values = categorical && categorical.values || <DataViewValueColumns>[];

        return categorical && lodashMapvalues(
            new this<DataViewCategoryColumn & DataViewValueColumn[] & DataViewValueColumns>(),
            (n, i) => {
                let result: any = categories.filter(x => x.source.roles && x.source.roles[i])[0];

                if (!result) {
                    result = values.source && values.source.roles && values.source.roles[i] && values;
                }

                if (!result) {
                    result = values.filter(x => x.source.roles && x.source.roles[i]);

                    if (lodashIsempty(result)) {
                        result = undefined;
                    }
                }

                return result;
            });
    }