Found a different dom implementation that removes 6MB
This commit is contained in:
1 parent
f8874fc586
commit
0019a4e1db
6 files changed
+14
-8
No files matched your search
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import * as d3 from "d3";
|
||||
import jsdom from "jsdom";
|
||||
import * as nodom from "nodom";
|
||||
import { getScatterValues, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class HeatmapChart extends Operation {
|
||||
yLabel = headings.y;
|
||||
}
|
||||
|
||||
const document = new jsdom.JSDOM().window.document;
|
||||
const document = new nodom.Document();
|
||||
let svg = document.createElement("svg");
|
||||
svg = d3.select(svg)
|
||||
.attr("width", "100%")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import * as d3 from "d3";
|
||||
import * as d3hexbin from "d3-hexbin";
|
||||
import jsdom from "jsdom";
|
||||
import * as nodom from "nodom";
|
||||
import { getScatterValues, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||
|
||||
import Operation from "../Operation";
|
||||
@@ -120,7 +120,7 @@ class HexDensityChart extends Operation {
|
||||
yLabel = headings.y;
|
||||
}
|
||||
|
||||
const document = new jsdom.JSDOM().window.document;
|
||||
const document = new nodom.Document();
|
||||
let svg = document.createElement("svg");
|
||||
svg = d3.select(svg)
|
||||
.attr("width", "100%")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import * as d3 from "d3";
|
||||
import jsdom from "jsdom";
|
||||
import * as nodom from "nodom";
|
||||
import { getScatterValues, getScatterValuesWithColour, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||
|
||||
import Operation from "../Operation";
|
||||
@@ -101,7 +101,8 @@ class ScatterChart extends Operation {
|
||||
xLabel = headings.x;
|
||||
yLabel = headings.y;
|
||||
}
|
||||
const document = new jsdom.JSDOM().window.document;
|
||||
|
||||
const document = new nodom.Document();
|
||||
let svg = document.createElement("svg");
|
||||
svg = d3.select(svg)
|
||||
.attr("width", "100%")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import * as d3 from "d3";
|
||||
import jsdom from "jsdom";
|
||||
import * as nodom from "nodom";
|
||||
import { getSeriesValues, RECORD_DELIMITER_OPTIONS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||
|
||||
import Operation from "../Operation";
|
||||
@@ -79,7 +79,7 @@ class SeriesChart extends Operation {
|
||||
allSeriesHeight = Object.keys(series).length * (interSeriesPadding + seriesHeight),
|
||||
svgHeight = allSeriesHeight + xAxisHeight + interSeriesPadding;
|
||||
|
||||
const document = new jsdom.JSDOM().window.document;
|
||||
const document = new nodom.Document();
|
||||
let svg = document.createElement("svg");
|
||||
svg = d3.select(svg)
|
||||
.attr("width", "100%")
|
||||
|
||||
Reference in new issue
Block a user