public static parseSettings()

in src/settings.ts [105:165]


    public static parseSettings(
        dataView: DataView,
        localizationManager: ILocalizationManager,
        colorHelper: ColorHelper
    ): Settings {
        const settings: Settings = Settings.parse<Settings>(dataView);

        if (!settings.counteroptions.counterTitle) {
            settings.counteroptions.counterTitle = localizationManager.getDisplayName("Visual_CounterTitle");
        }

        settings.dotoptions.dotSizeMin = this.getValidValue(
            settings.dotoptions.dotSizeMin,
            settings.dotoptions.minDotSize,
            settings.dotoptions.maxDotSize,
        );

        settings.dotoptions.dotSizeMax = this.getValidValue(
            settings.dotoptions.dotSizeMax,
            settings.dotoptions.dotSizeMin,
            settings.dotoptions.maxDotSize,
        );

        settings.lineoptions.lineThickness = this.getValidValue(
            settings.lineoptions.lineThickness,
            settings.lineoptions.minLineThickness,
            settings.lineoptions.maxLineThickness,
        );

        settings.misc.duration = this.getValidValue(
            settings.misc.duration,
            settings.misc.minDuration,
            settings.misc.maxDuration,
        );

        if (colorHelper.isHighContrast) {
            const foregroundColor: string = colorHelper.getThemeColor("foreground");
            const backgroundColor: string = colorHelper.getThemeColor("background");

            settings.lineoptions.fill = foregroundColor;
            settings.lineoptions.lineThickness = 2;

            settings.dotoptions.color = backgroundColor;
            settings.dotoptions.strokeOpacity = null;
            settings.dotoptions.strokeWidth = 2;
            settings.dotoptions.stroke = foregroundColor;

            settings.counteroptions.color = foregroundColor;

            settings.xAxis.color = foregroundColor;
            settings.yAxis.color = foregroundColor;

            settings.play.fill = backgroundColor;
            settings.play.stroke = foregroundColor;
            settings.play.strokeWidth = 1;
            settings.play.innerColor = foregroundColor;
            settings.play.opacity = 1;
        }

        return settings;
    }