mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 15:18:11 +08:00
Disable ColorBy button for truncated categories (#1191)
* Disable ColorBy button for truncated categories Fixes https://github.com/chanzuckerberg/cellxgene/issues/1156 For categories that have more than 100 labels we truncate the labels in the UI, but still allowed users to ColorBy these categories. Coloring by these categories can cause browsers to get bogged down. This commit disables ColorBy for truncated categories. * Minor documentation spelling and typo fixes * Respond to feedback from @liaprins-czi * Respond to feedback from @colinmegill and @bkmartinjr
This commit is contained in:
@@ -45,7 +45,7 @@ Remember that option values can be ANY js type, except undefined/null.
|
||||
}
|
||||
*/
|
||||
function topNCategories(colSchema, summary, N) {
|
||||
/* return top N by occurance in the data, preserving original category order */
|
||||
/* return top N by occurrences in the data, preserving original category order */
|
||||
const { categories } = colSchema;
|
||||
const counts = categories.map(cat => summary.categoryCounts.get(cat) ?? 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user