diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json index 8235ab10..f8f29be9 100755 --- a/src/core/config/Categories.json +++ b/src/core/config/Categories.json @@ -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" ] }, { diff --git a/src/core/operations/HeatmapChart.mjs b/src/core/operations/HeatmapChart.mjs index 9852a4ad..6620e7aa 100644 --- a/src/core/operations/HeatmapChart.mjs +++ b/src/core/operations/HeatmapChart.mjs @@ -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 diff --git a/src/core/operations/HexDensityChart.mjs b/src/core/operations/HexDensityChart.mjs index dc04bf33..c9912599 100644 --- a/src/core/operations/HexDensityChart.mjs +++ b/src/core/operations/HexDensityChart.mjs @@ -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} diff --git a/src/core/operations/ScatterChart.mjs b/src/core/operations/ScatterChart.mjs index 6898a91e..fa642449 100644 --- a/src/core/operations/ScatterChart.mjs +++ b/src/core/operations/ScatterChart.mjs @@ -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} diff --git a/src/core/operations/SeriesChart.mjs b/src/core/operations/SeriesChart.mjs index 548aa7f2..bccbc7ed 100644 --- a/src/core/operations/SeriesChart.mjs +++ b/src/core/operations/SeriesChart.mjs @@ -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}