This commit is contained in:
Matt 2019-03-10 13:08:47 +00:00
parent 0019a4e1db
commit 6501454424
5 changed files with 21 additions and 12 deletions

View File

@ -359,7 +359,11 @@
"Play Media",
"Remove EXIF",
"Extract EXIF",
"Split Colour Channels"
"Split Colour Channels",
"Hex Density chart",
"Scatter chart",
"Series chart",
"Heatmap chart"
]
},
{

View File

@ -26,8 +26,8 @@ class HeatmapChart extends Operation {
this.name = "Heatmap chart";
this.module = "Charts";
this.description = "";
this.infoURL = "";
this.description = "A heatmap is a graphical representation of data where the individual values contained in a matrix are represented as colors.";
this.infoURL = "https://wikipedia.org/wiki/Heat_map";
this.inputType = "string";
this.outputType = "html";
this.args = [
@ -85,6 +85,8 @@ class HeatmapChart extends Operation {
}
/**
* Heatmap chart operation.
*
* @param {string} input
* @param {Object[]} args
* @returns {html}
@ -99,7 +101,6 @@ class HeatmapChart extends Operation {
minColour = args[8],
maxColour = args[9],
dimension = 500;
if (vBins <= 0) throw new OperationError("Number of vertical bins must be greater than 0");
if (hBins <= 0) throw new OperationError("Number of horizontal bins must be greater than 0");
@ -182,7 +183,7 @@ class HeatmapChart extends Operation {
.attr("stroke-width", drawEdges ? "0.5" : "none")
.append("title")
.text(d => {
let count = d.length,
const count = d.length,
perc = 100.0 * d.length / values.length,
tooltip = `Count: ${count}\n
Percentage: ${perc.toFixed(2)}%\n
@ -218,7 +219,7 @@ class HeatmapChart extends Operation {
/**
* Packs a list of x, y coordinates into a number of bins for use in a heatmap.
*
*
* @param {Object[]} points
* @param {number} number of vertical bins
* @param {number} number of horizontal bins

View File

@ -25,8 +25,7 @@ class HexDensityChart extends Operation {
this.name = "Hex Density chart";
this.module = "Charts";
this.description = "";
this.infoURL = "";
this.description = "Hex density charts are used in a similar way to scatter charts, however rather than rendering tens of thousands of points, it groups the points into a few hundred hexagons to show the distribution.";
this.inputType = "string";
this.outputType = "html";
this.args = [
@ -90,6 +89,8 @@ class HexDensityChart extends Operation {
/**
* Hex Bin chart operation.
*
* @param {string} input
* @param {Object[]} args
* @returns {html}

View File

@ -24,8 +24,8 @@ class ScatterChart extends Operation {
this.name = "Scatter chart";
this.module = "Charts";
this.description = "";
this.infoURL = "";
this.description = "Plots two-variable data as single points on a graph.";
this.infoURL = "https://en.wikipedia.org/wiki/Scatter_plot";
this.inputType = "string";
this.outputType = "html";
this.args = [
@ -73,6 +73,8 @@ class ScatterChart extends Operation {
}
/**
* Scatter chart operation.
*
* @param {string} input
* @param {Object[]} args
* @returns {html}

View File

@ -24,8 +24,7 @@ class SeriesChart extends Operation {
this.name = "Series chart";
this.module = "Charts";
this.description = "";
this.infoURL = "";
this.description = "A time series graph is a line graph of repeated measurements taken over regular time intervals.";
this.inputType = "string";
this.outputType = "html";
this.args = [
@ -58,6 +57,8 @@ class SeriesChart extends Operation {
}
/**
* Series chart operation.
*
* @param {string} input
* @param {Object[]} args
* @returns {html}