Skip to content

Remove the dead graph average options (datasetAverageArray, showDatasetAngleAverageValueLine) #599

Description

@mairas

Two graph config fields are wired end to end but can never take effect.

datasetAverageArray selects which average the overlay plots — sma | ema | dema | avg. No control renders it (GraphDisplayOptionsComponent declares the input, the template never uses it), so it is whatever the widget default sets, always 'sma'. Worse, two of its four values cannot work: ema and doubleEma are set to null at history-to-graph-mapper.service.ts:137-138 and are computed nowhere, so selecting them would plot an empty series. widget-data-graph, minigraph and widget-windtrends-graph all read the field and map those keys.

showDatasetAngleAverageValueLine has an input, a form control and a config entry, and widget-data-graph.component.ts:101 marks it "legacy (not currently rendered separately)". Nothing draws it.

Either implement EMA/DEMA and expose the selector, or drop both fields. Dropping is the smaller answer: hardcode the SMA in the three graph widgets, remove the inputs and form controls, and leave the keys in stored configs alone — an unread key costs nothing and skipping a migration keeps old dashboards loadable.

Found while working on #598, which deliberately leaves these alone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions