Skip to content

Commit

Permalink
Merge branch 'dev' into enhancement/highcharts-always-show-flags
Browse files Browse the repository at this point in the history
* dev:
  Enhancement/highcharts line design (#779)
  Enhancement/ignore unknown diagram types (#776)
  • Loading branch information
Bernt Andersen committed Jan 10, 2025
2 parents a6b48df + b460973 commit 99cca83
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
4 changes: 3 additions & 1 deletion projects/fhi-angular-highcharts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Unreleased

> Dec 18, 2024
> Jan 10, 2025
* :tada: **Enhancement** Add option `categoryAxis` to `FhiDiagramOptions`, and add support for setting the category axis title [(#763)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/763)
* :tada: **Enhancement** Update qualitative color series [(#771)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/771)
* :tada: **Enhancement** Use cloneDeep() to make diagramOptions immutable [(#765)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/765)
* :tada: **Enhancement** Rewrite decimals once instead of formatting decimals in table template and tooltip [(#773)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/773)
* :tada: **Enhancement** Add test for illegal diagram type, and for multiple equal diagram types [(#776)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/776)
* :tada: **Enhancement** Update styling of diagram type line to mark all line points [(#779)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/779)
* :tada: **Enhancement** Show footer if only units are set, and also show footer if flags, but no flagged data [(#780)](https://github.com/folkehelseinstituttet/Fhi.Frontend.Demo/pull/780)

## 5.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,36 @@ export class DiagramTypeGroupService {

if (isChart) {
items.chartTypes.forEach((id) => {
group.children.push(ChartTypes.find((type) => type.id === id));
this.updateDiagramTypeGroup(id, group, ChartTypes, 'Chart');
});
}
if (isMap) {
items.mapTypes.forEach((id) => {
group.children.push(MapTypes.find((type) => type.id === id));
this.updateDiagramTypeGroup(id, group, MapTypes, 'Map');
});
}

return group;
}

private updateDiagramTypeGroup(
id: string,
group: DiagramTypeGroup,
Types: DiagramType[],
typeName: string,
) {
const type = Types.find((type) => type.id === id);
const typeExist = group.children.find((type) => type.id === id);

if (type !== undefined && typeExist === undefined) {
group.children.push(type);
} else if (typeExist) {
console.warn(typeName + ' type id: "' + id + '" is listed more than once.');
} else {
console.warn(typeName + ' type id: "' + id + '" is not valid.');
}
}

private diagramTypeIsActive(diagramType: DiagramType, groups: DiagramTypeGroup[]): boolean {
const activeFromOptionsNotFoundInGrops = (() =>
groups.every(
Expand Down
10 changes: 0 additions & 10 deletions projects/fhi-angular-highcharts/src/styles/theme/_line-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
.highcharts-line-series.highcharts-markers.highcharts-tracker {
.highcharts-point {
stroke-width: 4;
display: none;
}
.highcharts-point:first-child,
.highcharts-halo + .highcharts-point:nth-child(2),
.highcharts-point:last-child {
display: inline;
}
.highcharts-point-hover,
.highcharts-point-hover {
display: inline;
}
}

Expand Down

0 comments on commit 99cca83

Please sign in to comment.