Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3 Treemaps #563

Merged
merged 86 commits into from
May 13, 2019
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
8c5b5f2
Unit tests of series styles, colours and ranges
andy-lee-eng Apr 8, 2019
910482c
Support dates on the y-axis for heatmaps
Ro4052 Apr 9, 2019
6923ed4
Simplify plugin interface code
andy-lee-eng Apr 9, 2019
bd657f4
Merge pull request #167 from redbearsam/feature/plugin-simplify
matt-hooper Apr 10, 2019
52dd9c8
resolve yarn.lock conflict
matt-hooper Apr 10, 2019
ae7d97d
Merge branch 'feature/series-tests' into develop
matt-hooper Apr 10, 2019
2357215
Merge pull request #165 from redbearsam/fix/heatmap-date-y
Ro4052 Apr 12, 2019
b62931e
Merge branch 'master' into develop
Ro4052 Apr 12, 2019
43f0c82
Initial implemenetation of save and restore
Ro4052 Apr 12, 2019
da2903a
Merge branch 'master' into develop
Ro4052 Apr 15, 2019
d86646d
Refactored plugin registration
Ro4052 Apr 15, 2019
6a551be
Added fixed zoom ranges for date x axis
Ro4052 Apr 12, 2019
99614c2
Remove zoomableChart dateAxis property
Ro4052 Apr 15, 2019
98fda9e
Exclude non-customisation settings from save/load settings
andy-lee-eng Apr 15, 2019
498c0e4
Merge remote-tracking branch 'origin/feature/save-restore' into featu…
andy-lee-eng Apr 15, 2019
35b0483
Moved xRange call (initialisation issue)
Ro4052 Apr 16, 2019
1b80262
Moved xRange call
andy-lee-eng Apr 16, 2019
bc8ddd4
Added 6-month and 1-month range buttons
Ro4052 Apr 16, 2019
0385446
Merge pull request #169 from redbearsam/feature/date-zoom
Ro4052 Apr 16, 2019
7859095
Zoom y-axis to data on OHLC/Candlestick charts
andy-lee-eng Apr 16, 2019
74c2efa
Merge pull request #171 from redbearsam/feature/zoom-to-data
andy-lee-eng Apr 16, 2019
0ff6ac3
Merge pull request #170 from redbearsam/feature/save-restore
Ro4052 Apr 16, 2019
6643b1e
Allow settings to be restored before draw
andy-lee-eng Apr 16, 2019
e86c948
Merge pull request #173 from redbearsam/feature/fix-restore
andy-lee-eng Apr 16, 2019
5afcb72
Minor refactor to settings configuration
Ro4052 Apr 16, 2019
a438663
Merge pull request #174 from redbearsam/refactor/config-settings
Ro4052 Apr 16, 2019
16b2707
Made date zoom button names consistent
Ro4052 Apr 16, 2019
041ed9b
Merge pull request #175 from redbearsam/fix/date-buttons
Ro4052 Apr 16, 2019
e0ee739
Save legend position in settings
Ro4052 Apr 17, 2019
916051a
Save legend size in settings
Ro4052 Apr 17, 2019
8c0337f
Fix settings pageIndex
Ro4052 Apr 17, 2019
145ff41
Removed unnecessary resize event
Ro4052 Apr 17, 2019
a068b57
Fix tooltip for sunburst with no color
Ro4052 Apr 18, 2019
bd4c116
Treat negative sunburst size values as zero
Ro4052 Apr 18, 2019
53fe1f0
first treemap commit
matt-hooper Mar 28, 2019
6445288
add colour to treemap
matt-hooper Mar 29, 2019
26a1826
Add rect styles to css
matt-hooper Mar 29, 2019
9f40d56
add drill-down
matt-hooper Mar 29, 2019
b138aaa
add legend to treemap
matt-hooper Apr 3, 2019
7518d7a
fix chart.less file
matt-hooper Apr 3, 2019
4dfd0b9
treemap text centred, never overlaps, handles dark theme
redbearsam Apr 5, 2019
cefec17
separated out concerns of treemap to resemble the sunburst chart's
redbearsam Apr 8, 2019
f0bd0db
encapsulated multichart grid layout common between sunburst and treemap
redbearsam Apr 9, 2019
9b0b8ef
added highlighting to treemap blocks
redbearsam Apr 10, 2019
4116e47
interpolate the transition when switching layers
redbearsam Apr 18, 2019
171526b
Put treemaplevel for nodes inside a mapLevel array rather than on the…
redbearsam Apr 18, 2019
a57d867
Move treemapLayout.js to more logical place
redbearsam Apr 18, 2019
bd39ee2
Merge pull request #178 from redbearsam/fix/sunburst-zero
Ro4052 Apr 18, 2019
f5c8639
Merge pull request #177 from redbearsam/fix/sunburst-tooltip
Ro4052 Apr 18, 2019
9503c18
Merge pull request #176 from redbearsam/feature/legend-settings
Ro4052 Apr 23, 2019
235d938
minor css change to hide edges on non-leafnodes
redbearsam Apr 23, 2019
80ed174
restructure to be more d3-like
redbearsam Apr 23, 2019
d5f41bf
componentize treemapControls
redbearsam Apr 24, 2019
2a2ee7b
move treemap level calculations to seperate module for improved clarity
redbearsam Apr 24, 2019
814b84c
handle case where wer have only 1 main value
redbearsam Apr 24, 2019
35b8e42
remove unnecessary splitBy variable on treemapSeries component
redbearsam Apr 24, 2019
6e8f884
resdraw on resize when at treemap's root level
redbearsam Apr 24, 2019
4edec9e
Merge pull request #168 from redbearsam/feature/treemap_chart
matt-hooper Apr 25, 2019
6730385
transition treemap to top level upon resize.
redbearsam Apr 25, 2019
9dcfad8
create separate settings object within global settings for each treem…
redbearsam Apr 25, 2019
3eaa5cd
rename module to be more descriptive
redbearsam Apr 25, 2019
5eb0333
always ensure text is fully centered
redbearsam Apr 25, 2019
7278c9c
titling mechanism for gridLayout charts made generic and shared.
redbearsam Apr 18, 2019
28eb871
return the treemap to it's previous level upon resize
redbearsam Apr 26, 2019
44eef9e
Added tests for findBestFromData
Ro4052 Apr 29, 2019
f0442dd
Added treeData tests
Ro4052 Apr 29, 2019
aba50f8
Re-name file
Ro4052 Apr 29, 2019
6861be9
Merge pull request #181 from redbearsam/test/more-unit-tests
Ro4052 Apr 30, 2019
b1648a4
Merge pull request #179 from redbearsam/feature/treemap_resizing
redbearsam Apr 30, 2019
26ed563
provide framework for centering tooltips, and apply to treemap
redbearsam Apr 26, 2019
1f30bf4
Fix label position for sunburst charts
Ro4052 May 1, 2019
78bcc40
Merge pull request #180 from redbearsam/feature/treemap_titles
matt-hooper May 2, 2019
5b20d79
use the native d3 treemap functionality to calculate the new coordina…
redbearsam May 3, 2019
c79026b
merge latest changes
matt-hooper May 3, 2019
47c960c
Add save and restore back in
matt-hooper May 3, 2019
f43a444
center tooltip vertically more precisely.
redbearsam May 3, 2019
961eed5
Merge pull request #184 from redbearsam/d3fc-default
matt-hooper May 3, 2019
923e9da
Merge pull request #183 from redbearsam/feature/treemap_sensible_margins
matt-hooper May 7, 2019
10004e1
Merge pull request #182 from redbearsam/feature/treemap_center_tooltips
matt-hooper May 7, 2019
ec9ca7c
correct testData file reference
matt-hooper May 7, 2019
4d5bff0
Merge pull request #186 from redbearsam/bug/fix_test_spec
matt-hooper May 7, 2019
377f262
rename charts to match Highcharts for consistency
matt-hooper May 7, 2019
d28fd74
Merge pull request #187 from redbearsam/bug/rename_charts
matt-hooper May 7, 2019
5f7f8eb
Update results.json to reflect Scatter name change
matt-hooper May 8, 2019
909846e
Merge pull request #188 from redbearsam/test/overwrite_results
matt-hooper May 8, 2019
f1259f4
Merge pull request #189 from redbearsam/develop
matt-hooper May 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moved xRange call
`xRange` is only used within the `on('click`)` callback, so doesn't need to be initialised until a click event happens.

Also, we need to only check whether the x-axis is date axis if we actually have an x-axis
  • Loading branch information
andy-lee-eng committed Apr 16, 2019
commit 1b802624db3a12b905c979de90a10aa13188d2d2
4 changes: 2 additions & 2 deletions packages/perspective-viewer-d3fc/src/js/zoom/zoomableChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default () => {

function zoomableChart(selection) {
const chartPlotArea = `d3fc-${canvas ? "canvas" : "svg"}.plot-area`;
const dateAxis = xCopy.domain()[0] instanceof Date;
if (xScale || yScale) {
const dateAxis = xCopy && xCopy.domain()[0] instanceof Date;
const zoom = d3.zoom().on("zoom", () => {
const {transform} = d3.event;
settings.zoom = {
Expand All @@ -41,14 +41,14 @@ export default () => {
const zoomControls = getZoomControls(selection).style("display", noZoom ? "none" : "");
zoomControls.select("#zoom-reset").on("click", () => selection.select(chartPlotArea).call(zoom.transform, d3.zoomIdentity));

const xRange = xCopy.range();
const oneYear = zoomControls.select("#one-year").style("display", dateAxis ? "" : "none");
if (dateAxis) {
oneYear.on("click", () => {
const start = new Date(xScale.domain()[0]);
const end = new Date(start);
end.setYear(start.getFullYear() + 1);

const xRange = xCopy.range();
const k = (xRange[1] - xRange[0]) / (xCopy(end) - xCopy(start));
const x = -xCopy(start) * k;
let y = 0;
Expand Down