folkehelseinstituttet / Fhi.Frontend.Demo

MIT License
2 stars 1 forks source link

Update the FHI AngularHighcharts API #539

Closed proand closed 2 months ago

proand commented 2 months ago

NB! Check #11 for more info!

Acceptance Criteria

  1. Go to https://dev-designsystem.fhi.no/developer/components/highcharts
  2. Check that all diagrams works as before. There should be no changes at all!
  3. Go to API doc
  4. Check that the interface is same as the one below, that the docomuentation make sense and that all deprecated properties are still there, but marked for deprecation in later version

API interface (expanded)

export interface FhiDiagramOptions {
  activeDiagramType: FhiDiagramTypeIds;
  controls?: {
    fullScreenButton?: {
      show?: boolean;
    };
    metadataButton?: {
      show?: boolean;
    };
    navigation?: {
      items?: {
        chartTypes?: Array<keyof typeof ChartTypeIds>;
        mapTypes?: Array<keyof typeof MapTypeIds>;
      };
      show?: boolean;
      type?: keyof typeof DiagramTypeNavIds;
    };
    tableOrientationButton?: {
      show?: boolean;
    };
  };
  footer?: {
    credits?: {
      href: string;
      text: string;
    };
    disclaimer?: string;
    flags?: Array<FhiDiagramFlag>;
    lastUpdated?: string;
  };
  openSource?: boolean;
  series: {
    data: {
      name: string;
      y: number | string;
    };
    name: string | Array<string>;
    unitId?: number | string;
  };
  tableOrientation?: FhiTableOrientations;
  title: string;
  unit?: [
    {
      id: number | string;
      decimals: number;
      label: string;
      symbol: string;
      position: keyof typeof UnitSymbolPosition;
    },
  ];
}