Closed proand closed 1 month ago
Description
API consumer gets confused when using the current FHI Angular Highcharts API because the naming is hard to understand and the behavior is inconsistent.
Acceptance Criteria
Supplementary information
NEW API interface (with more grouping):
export interface FhiDiagramOptions { activeDiagramType: FhiDiagramTypeIds; controls?: FhiDiagramControls;; footer?: FhiDiagramFooter; openSource?: boolean; series: Array<FhiDiagramSerie>; tableOrientation?: FhiTableOrientations; title: string; unit?: Array<FhiDiagramUnit>; // The followin will be deprecated in v5 creditsHref?: string; creditsText?: string; decimals?: number; diagramTypeId?: FhiDiagramTypeIds; diagramTypeNavId?: keyof typeof DiagramTypeNavIds; diagramTypeSubset?: Array<FhiDiagramTypeIds>; disclaimer?: string; flags?: Array<FhiDiagramFlag>; lastUpdated?: string; mapTypeId?: keyof typeof MapTypeIds; metadataButton?: boolean; showFullScreenButton?: boolean; }
All properties:
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>; stack?: string; unitId?: number | string; }, ]; tableOrientation?: FhiTableOrientations; title: string; unit?: [ { id: number | string; decimals: number; label: string; symbol: string; position: keyof typeof UnitSymbolPosition; }, ]; }
Add console.warning "This "comp. prop" will be deprecated in v5, see https:// for more info.
Note to my self: check Fhi.Frontend.RnD #11 for more info
@yleaxeman Here are some of my earlier thoughts: https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/commit/4efe3f85cfbd394d64f30bbaad5f101d765e358e
Description
API consumer gets confused when using the current FHI Angular Highcharts API because the naming is hard to understand and the behavior is inconsistent.
Acceptance Criteria
Supplementary information
NEW API interface (with more grouping):
All properties:
Add console.warning "This "comp. prop" will be deprecated in v5, see https:// for more info.