File

components/plot-settings-panel/plot-settings-panel.component.ts

Description

Plot settings form fields.

Metadata

Index

Properties

Properties

plots
Default value : computed<PlotSettingsPlots[]>(() => { const meanPlot = this.service.meanPlotState(); const sigmaPlot = this.service.sigmaPlotState(); const defaultPlots = this.service.defaultPlots; return [ { defaultPlotSetting: defaultPlots.means.settingsForm.getRawValue(), plot: meanPlot, }, { defaultPlotSetting: defaultPlots.sigmas.settingsForm.getRawValue(), plot: sigmaPlot, }, ]; })
service
Default value : inject(AppService)
import {Component, computed, inject} from '@angular/core';
import {NshmpPlotSettingsExpansionPanelComponent, PlotSettingsPlots} from '@ghsc/nshmp-lib-ng/plot';

import {AppService} from '../../services/app.service';

/**
 * Plot settings form fields.
 */
@Component({
  imports: [NshmpPlotSettingsExpansionPanelComponent],
  selector: 'app-plot-settings-panel',
  styleUrl: './plot-settings-panel.component.scss',
  templateUrl: './plot-settings-panel.component.html',
})
export class PlotSettingsPanelComponent {
  service = inject(AppService);

  plots = computed<PlotSettingsPlots[]>(() => {
    const meanPlot = this.service.meanPlotState();
    const sigmaPlot = this.service.sigmaPlotState();
    const defaultPlots = this.service.defaultPlots;

    return [
      {
        defaultPlotSetting: defaultPlots.means.settingsForm.getRawValue(),
        plot: meanPlot,
      },
      {
        defaultPlotSetting: defaultPlots.sigmas.settingsForm.getRawValue(),
        plot: sigmaPlot,
      },
    ];
  });
}
<nshmp-plot-settings-expansion-panel [plots]="plots()" />
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""