Skip to content

Commit 912e001

Browse files
authored
Merge pull request #914 from finos/potpourri
`perspective-viewer-hypergrid` Tree column toggle buttons.
2 parents ff1a34d + 362140e commit 912e001

File tree

21 files changed

+352
-315
lines changed

21 files changed

+352
-315
lines changed

examples/simple/superstore-arrow.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
<body>
3030

31-
<perspective-viewer plugin="d3_sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>
31+
<perspective-viewer plugin="hypergrid" row-pivots='["Region", "State",
32+
"City"]' column-pivots='["Category", "Sub-Category"]' sort='[["Profit","desc"]]' columns='["Sales",
33+
"Profit"]'>
3234

3335
</perspective-viewer>
3436

examples/simple/superstore-hypergrid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</perspective-viewer>
3333

3434
<script>
35-
window.addEventListener('WebComponentsReady', function() {
35+
window.addEventListener('DOMContentLoaded', async function() {
3636
const viewer = document.getElementsByTagName('perspective-viewer')[0];
3737
const data = await fetch("superstore.arrow");
3838
viewer.load(await data.arrayBuffer(), {index: "Row ID"});

packages/perspective-viewer-d3fc/test/results/linux.docker.json

Lines changed: 116 additions & 116 deletions
Large diffs are not rendered by default.
Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
11
{
22
"bar_shows_a_grid_without_any_settings_applied_": "3cd4e90eb3fbc750742408cc7a364b03",
3-
"bar_pivots_by_a_row_": "57a8fe752ee18b4d02db708ecc348055",
4-
"bar_pivots_by_two_rows_": "2ffd3f34d18e7fdb1436f886eeef7a99",
5-
"bar_pivots_by_a_column_": "9d4fa1bd1d0489c50081cdf96439d48c",
6-
"bar_pivots_by_a_row_and_a_column_": "ea51bc4cfa9014830e2a527afc9c8657",
7-
"bar_pivots_by_two_rows_and_two_columns_": "15c19e8dd75529dca20312d3ac3f5e36",
8-
"bar_sorts_by_a_hidden_column_": "02e6850e7027bb5757324b6ddd5ce0fd",
9-
"bar_sorts_by_a_numeric_column_": "e3523839427708971c60b39bfd0135cc",
10-
"bar_filters_by_a_numeric_column_": "5f129d525eefec709a7602b7e4ae5e85",
11-
"bar_filters_by_a_datetime_column_": "6eab2ed006be5c35c4a820d05cb8b857",
12-
"bar_highlights_invalid_filter_": "fb44a762e91419c8d85b7372613fb6e8",
13-
"bar_sorts_by_an_alpha_column_": "e2ff9b2aba0c76e37c3bca576213e576",
14-
"bar_displays_visible_columns_": "85111c6e91eb5aad3882670b93aec8b1",
3+
"bar_pivots_by_a_row_": "2751d45c12bfed16a5309491a581817f",
4+
"bar_pivots_by_two_rows_": "08201640696fbf828e216278183abde1",
5+
"bar_pivots_by_a_column_": "d7b63244aeff0952c33043e939b3ffd4",
6+
"bar_pivots_by_a_row_and_a_column_": "de4f30dde503081777c16e99b0763a97",
7+
"bar_pivots_by_two_rows_and_two_columns_": "0aa1b98156f91c27796343d0ed8e54fe",
8+
"bar_sorts_by_a_hidden_column_": "3b31444c137d42530ed493aa47c78195",
9+
"bar_sorts_by_a_numeric_column_": "613630d0946238751f08ea0606474b08",
10+
"bar_filters_by_a_numeric_column_": "e2f872d67388ea1f8670a2f776c65bc6",
11+
"bar_filters_by_a_datetime_column_": "14059a989de4b2582202319668035b9f",
12+
"bar_highlights_invalid_filter_": "67a6ec838b49915fbb6baabda829aa96",
13+
"bar_sorts_by_an_alpha_column_": "16e0d4746d34ec8150c05ce542bb4846",
14+
"bar_displays_visible_columns_": "b23cfcf08a9fa67d4c88e211b42ab87d",
1515
"bar_clicking_on_a_bar_when_no_filters_are_present_perspective_dispatches_perspective-click_event_with_NO_filters_": "4c0d84d8c806b3027b52be37c487f0cc",
1616
"bar_clicking_on_a_bar_when_a_filter_is_present_perspective_dispatches_perspective-click_event_with_one_filter_": "32d64db28af46dfe77fad5cc1ca8af9c",
1717
"bar_clicking_on_a_bar_when_a_filter_is_present_perspective_dispatches_perspective-click_event_with_filters_": "c18f49270244dfe4a6b32270ec30d99d",
1818
"bar_tooltip_tests_tooltip_shows_on_hover_": "ba5e455a9d3f877cf0c773d417777fd9",
19-
"bar_tooltip_tests_dates_on_the_x-axis_display_correctly_": "c1c71230522606ff738056c7a003f2f5",
20-
"bar_tooltip_tests_tooltip_shows_proper_column_labels_based_on_hover_target_": "3a96364233f837c7e64e62337d82cef0",
21-
"bar_tooltip_tests_tooltip_shows_proper_column_labels_based_on_hover_target,_pt2_": "19b4b3038cc0f27d2158ab81f7c434ed",
22-
"bar_tooltip_tests_tooltip_shows_pivot_labels_": "07658bbacbf13dc8e1fa4772652d7474",
19+
"bar_tooltip_tests_dates_on_the_x-axis_display_correctly_": "dd88c5c191d0a1d772298fd19f2ea85d",
20+
"bar_tooltip_tests_tooltip_shows_proper_column_labels_based_on_hover_target_": "7562fed552d4b49e7575262d0ae58a8b",
21+
"bar_tooltip_tests_tooltip_shows_proper_column_labels_based_on_hover_target,_pt2_": "9dd8338895af9318bb2880565ae7f41e",
22+
"bar_tooltip_tests_tooltip_shows_pivot_labels_": "7d8e312622faea609a8817757f610e6f",
2323
"null_should_handle_null_categories_in_a_pivot": "9a71cb2ded2697b005e9bc02d48387b8",
2424
"render_warning_render_warning_should_not_show_under_size_limit_": "8b216a2b86af03bbd65f71261e2f1167",
25-
"render_warning_render_warning_should_show_above_size_limit_": "fec978469e044f80d32cc62db3d50c8e",
26-
"render_warning_dismissing_render_warning_should_trigger_render_": "f048923ce813618c0a45e8d3c91f9243",
27-
"render_warning_underlying_data_updates_should_not_trigger_rerender_if_warning_is_visible_": "e86356a4da01449f592933db1f6c98ec",
28-
"__GIT_COMMIT__": "b8015e9c9c7a640bf056656b7f577debe7e4a5e5",
25+
"render_warning_render_warning_should_show_above_size_limit_": "54dacb0e820609b0630ebcbe0e7d08dc",
26+
"render_warning_dismissing_render_warning_should_trigger_render_": "a19460e94971e107754140056d0844fd",
27+
"render_warning_underlying_data_updates_should_not_trigger_rerender_if_warning_is_visible_": "de22dce000eb9bfafc85359c620a8365",
28+
"__GIT_COMMIT__": "410648f3426fe2358cdf2a9a89424ed6cbe6122a",
2929
"line_shows_a_grid_without_any_settings_applied_": "daa48e26ee315f01377eaaf054088934",
30-
"line_pivots_by_a_row_": "58cf884c20144abf0bef9213369e2b4f",
31-
"line_pivots_by_two_rows_": "7383fffaf8cbf886090e501a658ef4e2",
32-
"line_pivots_by_a_column_": "0b34a0dbb0c8914ed267bbbcbcc1b580",
33-
"line_pivots_by_a_row_and_a_column_": "e931410d1df92c414e024a5af3a3ae5a",
34-
"line_pivots_by_two_rows_and_two_columns_": "1bf05eb596ac5ca143b62b1552b7a356",
35-
"line_sorts_by_a_hidden_column_": "ca4ba6dc852cb42bff575d1300f35114",
36-
"line_sorts_by_a_numeric_column_": "01c702695b283b08771e7ecd68f7d9aa",
37-
"line_filters_by_a_numeric_column_": "7c42d4b32df111b031a65d380053aef1",
38-
"line_filters_by_a_datetime_column_": "66e8bd5893cee56a9e8b7eeda0f5c930",
39-
"line_highlights_invalid_filter_": "5fbe3f3126ae98a0f402c0219ac80de2",
40-
"line_sorts_by_an_alpha_column_": "ea02fa9fea0e0d86d0edb0a42817c77b",
41-
"line_displays_visible_columns_": "a451e28f589cc3d436071744693d1bf2",
42-
"line_axis_tests_sets_a_category_X_axis_when_pivoted_by_a_datetime_": "25f926cf75a93b7f2e10be7b550f4e09",
43-
"line_axis_tests_sets_a_category_axis_when_the_axis_type_is_a_string_": "b633ff56439c041e79172eee72dddf75",
44-
"line_tooltip_tests_tooltip_shows_on_hover_": "29b6fb52d6148b19c4c99062fe6df62d",
45-
"line_tooltip_tests_tooltip_shows_pivot_labels_": "981a177ef625dd422e934b99f150af3a",
30+
"line_pivots_by_a_row_": "47381fac3329abe680ee05457635ace4",
31+
"line_pivots_by_two_rows_": "f4938c42922f08a3af0741afc997d5e2",
32+
"line_pivots_by_a_column_": "e688f43c39840980ffb71e7c4ca65461",
33+
"line_pivots_by_a_row_and_a_column_": "5eea5fd2047c9644fa20806eeb99b0b9",
34+
"line_pivots_by_two_rows_and_two_columns_": "070008974f9fe2aefe51f5e923828ec6",
35+
"line_sorts_by_a_hidden_column_": "d8a47b63ed10d2a56c7224d108966b3c",
36+
"line_sorts_by_a_numeric_column_": "3ca6b5852f0d6eb0c4bc77484be8868d",
37+
"line_filters_by_a_numeric_column_": "6674fdb3098f7a17ce2b6f4f5e9855f5",
38+
"line_filters_by_a_datetime_column_": "3d934d3a0071ae5d625d302ac5cb201a",
39+
"line_highlights_invalid_filter_": "db8616202743d767cd50152ffb78af3e",
40+
"line_sorts_by_an_alpha_column_": "6d4cb02a8aefa161892d0afebc601100",
41+
"line_displays_visible_columns_": "6085f7c6dc298f331b85fd8871369ea9",
42+
"line_axis_tests_sets_a_category_X_axis_when_pivoted_by_a_datetime_": "f911c8cc3b6e5d951e3bf05207493388",
43+
"line_axis_tests_sets_a_category_axis_when_the_axis_type_is_a_string_": "c36c8b50f1338afdc85ede2a066a90f0",
44+
"line_tooltip_tests_tooltip_shows_on_hover_": "d35fdf4ec57052984979b6825e2adf8c",
45+
"line_tooltip_tests_tooltip_shows_pivot_labels_": "5c3215fe7f761e345ad92ac82865b312",
4646
"scatter_shows_a_grid_without_any_settings_applied_": "2e5ab01698615779dbe3f70e9fdf19a3",
47-
"scatter_pivots_by_a_row_": "b60fbf9dce9a3cd47e8029a708845f72",
48-
"scatter_pivots_by_two_rows_": "ebb4d88477cae1a90573c0770f9462d3",
49-
"scatter_pivots_by_a_column_": "ae530b4e1b12e2715ed94f80fb25aa4f",
50-
"scatter_pivots_by_a_row_and_a_column_": "08cd626e58a588cb76c284a7138c2a3a",
51-
"scatter_pivots_by_two_rows_and_two_columns_": "14d1872e9e61d51f8ee7fe6618403121",
52-
"scatter_sorts_by_a_hidden_column_": "6db9cc465713281760f274e962301b05",
53-
"scatter_sorts_by_a_numeric_column_": "73ad687624dee78ecf5f0d71599a261c",
54-
"scatter_filters_by_a_numeric_column_": "d832b1807d8d25837fe66b02b81ba08e",
55-
"scatter_filters_by_a_datetime_column_": "a04469813fffc8df06f43ed4e4746cf1",
56-
"scatter_highlights_invalid_filter_": "8906356923c0b76365f09270c359329d",
57-
"scatter_sorts_by_an_alpha_column_": "3bf4afc217d4dc32fcf77570a544578f",
58-
"scatter_displays_visible_columns_": "5310a94f28417f9ed65a487742be6c96",
59-
"scatter_axis_tests_sets_a_category_X_axis_when_pivoted_by_a_datetime_": "7945fbd06a5b2e07e45cdf403b8c1877",
60-
"scatter_axis_tests_sets_a_category_axis_when_the_axis_type_is_a_string_": "fc600d174597a36c2dadea1a8d1e41cc",
61-
"scatter_tooltip_tests_tooltip_shows_on_hover_": "fcc95b2cd17bcdd02f5d915359e25039",
62-
"scatter_tooltip_tests_tooltip_shows_pivot_labels_": "074c6b2c914ad18fd7d88150b459a768",
47+
"scatter_pivots_by_a_row_": "c7ad74b19981faab802e14f73277fb35",
48+
"scatter_pivots_by_two_rows_": "71f6cdef142ba8639eec80539fd9f2a5",
49+
"scatter_pivots_by_a_column_": "a85f86807982ffa8c456c0c124b8eae8",
50+
"scatter_pivots_by_a_row_and_a_column_": "db54e6e8e5036cb129077f1be1aedb0b",
51+
"scatter_pivots_by_two_rows_and_two_columns_": "dc3a6601d150c072e052631ce179e0a0",
52+
"scatter_sorts_by_a_hidden_column_": "5170de276915ea3d73271566e8786c9d",
53+
"scatter_sorts_by_a_numeric_column_": "f2cfe549303d1bb2fef120f521e4714b",
54+
"scatter_filters_by_a_numeric_column_": "4ab2e0b9d16f08838ebfdd782f4b3c70",
55+
"scatter_filters_by_a_datetime_column_": "a5b9bad5b041143996e88112d88e13f3",
56+
"scatter_highlights_invalid_filter_": "9f2f4d4ac72167231ff517c544d4d12c",
57+
"scatter_sorts_by_an_alpha_column_": "c44c2724651dd0dcb784484efeec0a05",
58+
"scatter_displays_visible_columns_": "894be726049b2b1c4ddfd1c78382a381",
59+
"scatter_axis_tests_sets_a_category_X_axis_when_pivoted_by_a_datetime_": "fefbaacbd9d6f236bb4b83c3d4d569b0",
60+
"scatter_axis_tests_sets_a_category_axis_when_the_axis_type_is_a_string_": "12bf791a518fb7b6dd30c3143a43c96c",
61+
"scatter_tooltip_tests_tooltip_shows_on_hover_": "fba8611ea41261ad9888b84a04a83cd3",
62+
"scatter_tooltip_tests_tooltip_shows_pivot_labels_": "eba70e3f789a754bedd153b07761d885",
6363
"treemap_shows_a_grid_without_any_settings_applied_": "e61a53b560304cfbe3a6464218910cb0",
64-
"treemap_pivots_by_a_row_": "f4dead09e192212907944d861723521f",
65-
"treemap_pivots_by_two_rows_": "ab2f5ad67a37eb58ea20ae6b55088421",
66-
"treemap_pivots_by_a_column_": "cbf8a7e1492e3bf239e32669ec634aa5",
67-
"treemap_pivots_by_a_row_and_a_column_": "7690446eac2649f4a4253be505df1a4b",
68-
"treemap_pivots_by_two_rows_and_two_columns_": "529a9aacc111ab293561f8714af4a43c",
69-
"treemap_sorts_by_a_hidden_column_": "3c4a0a56ca04279f63e50d1a8a099559",
70-
"treemap_sorts_by_a_numeric_column_": "80b6b3002896d0378004580e8af9d9bd",
71-
"treemap_filters_by_a_numeric_column_": "4f0a108112df447133b45757617b75db",
72-
"treemap_filters_by_a_datetime_column_": "5a6b57e4472cdb1b1142b75c02ca2bb6",
73-
"treemap_highlights_invalid_filter_": "a1baf4e626e5e41ac59b00340e7db47f",
74-
"treemap_sorts_by_an_alpha_column_": "b19b26460201d49810836587a3e4998c",
75-
"treemap_displays_visible_columns_": "86ad12f6d6c2da9591336ef64ee48bad",
76-
"treemap_tooltip_tests_tooltip_shows_on_hover_": "a8b8d9d53cce4ac71de501732dbcede7",
64+
"treemap_pivots_by_a_row_": "612162ec3626871e81110ee6654310c4",
65+
"treemap_pivots_by_two_rows_": "302b5af362c1c6afceffd1673fa98957",
66+
"treemap_pivots_by_a_column_": "9d10fbcd089f0ed17d16eb3143ff127b",
67+
"treemap_pivots_by_a_row_and_a_column_": "3f3fae0089e844602214fedea9c895be",
68+
"treemap_pivots_by_two_rows_and_two_columns_": "da05c0c2e954a91a6e558b49cae0073a",
69+
"treemap_sorts_by_a_hidden_column_": "4eeba554c68d2de479dc5f06ccf58382",
70+
"treemap_sorts_by_a_numeric_column_": "c8d9e21e6347aa5b64adc14525643cb9",
71+
"treemap_filters_by_a_numeric_column_": "b345710589a642ebda25e825b9fb72e0",
72+
"treemap_filters_by_a_datetime_column_": "a3c580b28e209386513fe223a3b7cb69",
73+
"treemap_highlights_invalid_filter_": "9073aa2b815b37b50f26d8dbaf418b01",
74+
"treemap_sorts_by_an_alpha_column_": "b980f6bacaa2de89298b6802fbf61ad3",
75+
"treemap_displays_visible_columns_": "a5fdbe71f13d9bbca179b2d4f74de3db",
76+
"treemap_tooltip_tests_tooltip_shows_on_hover_": "2fcd4ad3b0f1a784551c07a4fc458ab0",
7777
"heatmap_shows_a_grid_without_any_settings_applied_": "a3dfdb1b0e5d6e93d86c2c8613a1be6d",
78-
"heatmap_pivots_by_a_row_": "a371e586e5d1c462840e391440b56eb7",
79-
"heatmap_pivots_by_two_rows_": "9f3e94fcac73adf9309ae6e8e6caa3dc",
80-
"heatmap_pivots_by_a_column_": "18dd4108b4dc7c35ff69993a4e72ef70",
81-
"heatmap_pivots_by_a_row_and_a_column_": "5ed07fc1e404fdd61dc0d834215f7517",
82-
"heatmap_pivots_by_two_rows_and_two_columns_": "d7ee4b476517d67a3e59ae6d8753f443",
83-
"heatmap_sorts_by_a_hidden_column_": "dc210456dd4417ee7bb83090b13deb97",
84-
"heatmap_sorts_by_a_numeric_column_": "cb99950c6355ceb20030f9a4133222e6",
85-
"heatmap_filters_by_a_numeric_column_": "faeff861246414b273c05ff9a40cd6e8",
86-
"heatmap_filters_by_a_datetime_column_": "028982b8dcb224f8b8df55ff605b64d2",
87-
"heatmap_highlights_invalid_filter_": "fed455e555938fa160a6de613d09ee6c",
88-
"heatmap_sorts_by_an_alpha_column_": "8bf6678a550e03200c85fed47745c112",
89-
"heatmap_displays_visible_columns_": "1e0d1da888ff5377748f1e79132fa764",
78+
"heatmap_pivots_by_a_row_": "516d1451cb957bd18adc34de5b44a688",
79+
"heatmap_pivots_by_two_rows_": "16b2920478eb01cb7d8bcd72e96085f3",
80+
"heatmap_pivots_by_a_column_": "5532c59c3117c715e88b54e0be55db6d",
81+
"heatmap_pivots_by_a_row_and_a_column_": "444f5cd30e57e54c68a237b8d2062e5c",
82+
"heatmap_pivots_by_two_rows_and_two_columns_": "c84af795bc3ddf5244ca6f6626244426",
83+
"heatmap_sorts_by_a_hidden_column_": "65bf69a43dec4189f7018fb0f1cd56ea",
84+
"heatmap_sorts_by_a_numeric_column_": "5af66df19474c3101798f97bb83dcf6b",
85+
"heatmap_filters_by_a_numeric_column_": "720ed0940f9352bc3dd4e2f1f0679a56",
86+
"heatmap_filters_by_a_datetime_column_": "6ee619acabe83b091873c6eab4feb995",
87+
"heatmap_highlights_invalid_filter_": "0f2147aa97387f63ed87e6ba790b41df",
88+
"heatmap_sorts_by_an_alpha_column_": "0e95615b749a1ef1b0dfc7d8023db3d3",
89+
"heatmap_displays_visible_columns_": "cadb9c73f1f6bac75974361836aafe87",
9090
"heatmap_tooltip_tests_tooltip_shows_on_hover_": "d459cde6c4044d6d30cbddf8f6b069e7",
91-
"line_replaces_all_rows_": "bfbc8f5aedb19676a5ced7338afc63cb",
92-
"line_tooltip_columns_work_with_extra_tooltip_columns": "e735dad438378bac346c8fca83657370",
93-
"scatter_tooltip_tests_tooltip_columns_works_when_color_column_is_null": "2609926468c2e181c08cfc04beeddbeb"
91+
"line_replaces_all_rows_": "fe3a3c6244530496bb997919399c2517",
92+
"line_tooltip_columns_work_with_extra_tooltip_columns": "db7238f748b0e2328971fe6c0cf16489",
93+
"scatter_tooltip_tests_tooltip_columns_works_when_color_column_is_null": "4e89313f4b839af69b9ed78b5ccadedb"
9494
}

packages/perspective-viewer-hypergrid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@finos/perspective-viewer": "^0.4.1",
4141
"core-js": "^3.6.4",
4242
"datasaur-local": "3.0.0",
43-
"faux-hypergrid": "3.2.4",
43+
"faux-hypergrid": "3.2.5",
4444
"fin-hypergrid-grouped-header-plugin": "^1.2.4",
4545
"lodash": "^4.17.4",
4646
"rectangular": "1.0.1",

packages/perspective-viewer-hypergrid/src/js/hypergrid.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ async function getOrCreateHypergrid(div) {
152152
div.innerHTML = "";
153153
div.appendChild(perspectiveHypergridElement);
154154
await new Promise(resolve => setTimeout(resolve));
155-
perspectiveHypergridElement.grid.canvas.resize(false, true);
155+
perspectiveHypergridElement.grid.canvas.resize(false);
156156
}
157157
return perspectiveHypergridElement;
158158
}
@@ -246,12 +246,9 @@ const plugin = {
246246
resize: async function() {
247247
const hypergrid = get_hypergrid.call(this);
248248
if (hypergrid) {
249-
hypergrid.canvas.checksize();
250-
hypergrid.canvas.paintNow();
251249
let nrows = await this._view.num_rows();
252250
hypergrid.behavior.dataModel.setDirty(nrows);
253251
await hypergrid.canvas.resize(true);
254-
hypergrid.canvas.paintNow();
255252
}
256253
},
257254
delete: function() {

0 commit comments

Comments
 (0)