Skip to content

Commit 4189065

Browse files
committed
Updates
1 parent b4e900e commit 4189065

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

public/pages/d3/scatter-plot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script>
1111
createScatterPlot().then(function(svg) {
1212
d3.select('#container').node().appendChild(svg);
13-
divi.hydrate(svg);
13+
divi.hydrate(svg, { url: 'https://raw.githubusercontent.com/holtzy/D3-graph-gallery/master/DATA/iris.csv' });
1414
});
1515
</script>
1616
</body>

src/handlers/brush.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function brushEnd(event) {
4141
brush.remove();
4242
}
4343

44-
4544
function brusher(event) {
4645
let x1, x2, y1, y2;
4746
function bMove(event) {

src/parsers/helpers/axis-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function describeAxis(axis, container) {
4646
sortByViewPos('label', container.ticks);
4747
}
4848

49-
// Computer axis domain (data space) extents.
49+
// Compute axis domain (data space) extents.
5050
function computeAxisDomain(axis) {
5151
let isDate = true;
5252

src/parsers/helpers/data-parser.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ export async function parseDataset(options) {
1313
if (!options || !Object.keys(options).length) return { };
1414
const { url } = options;
1515
const type = url.split('.').pop();
16-
const _table = await (type === 'json' ? loadJSON(url) : loadCSV(url));
16+
const _table = await (type === 'json'
17+
? loadJSON(url)
18+
: type === 'tsv'
19+
? loadCSV(url, { delimiter: '\t' })
20+
: loadCSV(url)
21+
);
1722

1823
return new DataState(_table.assign(table({ [tableIndexField]: range(_table.numRows()) })));
1924
}
@@ -68,8 +73,8 @@ export function inferMarkAttributes(state) {
6873

6974
for (const point of points) {
7075
let [x, y] = point;
71-
x = x - svgRect.left;
72-
y = y - svgRect.top;
76+
// x = x - svgRect.left;
77+
// y = y - svgRect.top;
7378

7479
const iterable = { };
7580
iterable[state.xAxis.title ? state.xAxis.title.innerHTML.toLowerCase() : 'x'] = state.xAxis.scale.invert(x);

src/parsers/multi-view/link-parser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ function storeLink(type, link, to, from, storeTable = false) {
343343
}
344344

345345
function linkExternalDatasets(states, extState, aggregated) {
346+
console.log(extState)
346347
const { table: extTable } = extState;
347348
if (!extTable) return;
348349
const stored = new Map();

0 commit comments

Comments
 (0)