Closed k8hughes closed 5 years ago
@Duncan-Knox I think this one may be related to issue #344. I don't know what's changed in the data to bring rise to this. Error is below
I think there's some inconsistencies with the Pakistan expenditure tree that my earlier fix has failed to compensate for. Maybe @Napho can have a look.
@edwinmp I see this one does not reference the react component and the visual straight out disappears. Other than that it looks the same as #344. It is completely unclear to me what is causing this. Do you have any idea on the type of inconsistencies? I'll show Richard the data in the case he can spot something too.
@edwinmp update: this links to negative values in the government expenditure data used in the treemaps. Richard will remove these and resend the data to @akmiller01 for another upload. This ought to fix it.
Further research has led me to conclude that when the partition treemap was refactored into the charts
repo, the negative logic was accidentally excluded. In the Datahub-angular repo I found logic that took the absolute value of a child node https://github.com/devinit/datahub-angular/blob/master/public/diConcept/components/PartitionTree/partitionTreeDirective.js#L221 and assigned a blue/red value depending on if it was once negative https://github.com/devinit/datahub-angular/blob/master/public/diConcept/components/PartitionTree/partitionTreeDirective.js#L261-L265
I think we'll need to fit the negative/absolute value logic into charts/core/src/datasets where it creates the partition tree data https://github.com/devinit/charts/blob/master/packages/core/src/dataset/index.ts#L42
Alternatively, since the error seems to be stemming from stratify
it might be getting confused when children and parents have the same ID
And in the case of Brazil, it's because the parent has a 0 value because both of the children cancel each other out!
@Napho and @edwinmp , Richard provided me a few data fixes that might help avoid these issues. If you pull the latest output from the domestic_finance_2018
branch, it may fix this problem.
Bug fixed in data @edwinmp , no front-end work required, besides pulling through new data.
I'm submitting a ...
Check one of the following options with "x" and add the appropriate label to the issue as well
Describe the Issue Pakistan expenditure box burst graphic has disappeared
To Reproduce Replace the content below with the steps to reproduce the behaviour.
Expected Behaviour On live there is a box burst graph below
Screenshots/GIF
Desktop (please complete the following information):
Environment/Server:
Additional Context This is a lower importance bug for launch, we can launch with it and fix after
Requested Delivery Date: dd/MMM/YYYY