private static parseSettings()

in src/visual.ts [460:498]


    private static parseSettings(dataView: DataView, colorHelper: ColorHelper): VisualSettings {
        const settings: VisualSettings = VisualSettings.parse<VisualSettings>(dataView);

        if (dataView
            && dataView.categorical
            && dataView.categorical.values
            && !settings.legend.titleText
        ) {

            const valuesSource: DataViewMetadataColumn = dataView.categorical.values.source,
                titleTextDefault: string = valuesSource
                    ? valuesSource.displayName
                    : settings.legend.titleText;

            settings.legend.titleText = titleTextDefault; // Force a value (shouldn't be empty with show=true)
        }

        settings.categoryAxis.labelColor = colorHelper.getHighContrastColor(
            "foreground",
            settings.categoryAxis.labelColor,
        );

        settings.valueAxis.labelColor = colorHelper.getHighContrastColor(
            "foreground",
            settings.valueAxis.labelColor,
        );

        settings.legend.labelColor = colorHelper.getHighContrastColor(
            "foreground",
            settings.legend.labelColor,
        );

        settings.labels.color = colorHelper.getHighContrastColor(
            "foreground",
            settings.labels.color,
        );

        return settings;
    }