Closed dan-knight closed 2 weeks ago
Another thing: when label is empty, ''
, the node size becomes zero.
test.dt <- data.frame(
label = rep('', 4),
parent = c(NA, 1, 1, 2),
node.size = c(1, 0.7, 0.3, 0.4)
);
grid.draw(SRCGrob(test.dt));
results in:
This might arise when users want to associate a value with node.size
and want to remove labels if the node.size
is to small to contain it.
Im just documenting node behaviour here to verify if all these are intended outcomes:
node.size = NA
default node size is usednode.size=0
Node is not drawn but labels are still presentnode.size = NA
and draw.nodes = FALSE
Node is not drawn but labels are still presentnode.size = 0
and draw.nodes = FALSE
Node is not drawn but labels are still presentdraw.nodes
is a mixture of T/F : >> Error in validDetails.polygon(x) : 'x' and 'y' and 'id.lengths' must specify same overall length
I think when draw.nodes = FALSE
the labels should be gone too
- draw.nodes is a mixture of T/F : >> Error in validDetails.polygon(x) : 'x' and 'y' and 'id.lengths' must specify same overall length I think when draw.nodes = FALSE the labels should be gone too
fixed!
Description
Closes #80. Allows node-by-node control of the size of the node. This accounts for the node size using the existing algorithm for positioning nodes, which accounts for node radius. While this could be be slightly improved for a pixel-perfect solution, that is beyond the scope of these changes.
Checklist
[x] This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
Disclosing PHI is a major problem[^1] - Even a small leak can be costly[^2].
[x] This PR does NOT contain germline genetic data[^3], RNA-Seq, DNA methylation, microbiome or other molecular data[^4].
[^1]: UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records [^2]: The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records. [^3]: Genetic information is considered PHI. Forensic assays can identify patients with as few as 21 SNPs [^4]: RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other output files.To automatically exclude such files using a .gitignore file, see here for example.
[x] I have read the code review guidelines and the code review best practice on GitHub check-list.
[x] I have set up or verified the
main
branch protection rule following the github standards before opening this pull request.[x] The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
[x] I have added the major changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.