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

WIP: Charts module #143

Closed
wants to merge 11 commits into from
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"bootstrap-switch": "^3.3.4",
"crypto-api": "^0.6.2",
"crypto-js": "^3.1.9-1",
"d3": "^4.9.1",
"d3-hexbin": "^0.2.2",
"diff": "^3.2.0",
"escodegen": "^1.8.1",
"esmangle": "^1.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/core/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ const Utils = {
"Comma": ",",
"Semi-colon": ";",
"Colon": ":",
"Tab": "\t",
"Line feed": "\n",
"CRLF": "\r\n",
"Forward slash": "/",
Expand Down
211 changes: 211 additions & 0 deletions src/core/config/OperationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Base64 from "../operations/Base64.js";
import BitwiseOp from "../operations/BitwiseOp.js";
import ByteRepr from "../operations/ByteRepr.js";
import CharEnc from "../operations/CharEnc.js";
import Charts from "../operations/Charts.js";
import Checksum from "../operations/Checksum.js";
import Cipher from "../operations/Cipher.js";
import Code from "../operations/Code.js";
Expand Down Expand Up @@ -3388,6 +3389,216 @@ const OperationConfig = {
}
]
},
"Hex Density chart": {
description: [].join("\n"),
run: Charts.runHexDensityChart,
inputType: "string",
outputType: "html",
args: [
{
name: "Record delimiter",
type: "option",
value: Charts.RECORD_DELIMITER_OPTIONS,
},
{
name: "Field delimiter",
type: "option",
value: Charts.FIELD_DELIMITER_OPTIONS,
},
{
name: "Pack radius",
type: "number",
value: 25,
},
{
name: "Draw radius",
type: "number",
value: 15,
},
{
name: "Use column headers as labels",
type: "boolean",
value: true,
},
{
name: "X label",
type: "string",
value: "",
},
{
name: "Y label",
type: "string",
value: "",
},
{
name: "Draw hexagon edges",
type: "boolean",
value: false,
},
{
name: "Min colour value",
type: "string",
value: Charts.COLOURS.min,
},
{
name: "Max colour value",
type: "string",
value: Charts.COLOURS.max,
},
{
name: "Draw empty hexagons within data boundaries",
type: "boolean",
value: false,
},
]
},
"Heatmap chart": {
description: [].join("\n"),
run: Charts.runHeatmapChart,
inputType: "string",
outputType: "html",
args: [
{
name: "Record delimiter",
type: "option",
value: Charts.RECORD_DELIMITER_OPTIONS,
},
{
name: "Field delimiter",
type: "option",
value: Charts.FIELD_DELIMITER_OPTIONS,
},
{
name: "Number of vertical bins",
type: "number",
value: 25,
},
{
name: "Number of horizontal bins",
type: "number",
value: 25,
},
{
name: "Use column headers as labels",
type: "boolean",
value: true,
},
{
name: "X label",
type: "string",
value: "",
},
{
name: "Y label",
type: "string",
value: "",
},
{
name: "Draw bin edges",
type: "boolean",
value: false,
},
{
name: "Min colour value",
type: "string",
value: Charts.COLOURS.min,
},
{
name: "Max colour value",
type: "string",
value: Charts.COLOURS.max,
},
]
},
"Scatter chart": {
description: [].join("\n"),
run: Charts.runScatterChart,
inputType: "string",
outputType: "html",
args: [
{
name: "Record delimiter",
type: "option",
value: Charts.RECORD_DELIMITER_OPTIONS,
},
{
name: "Field delimiter",
type: "option",
value: Charts.FIELD_DELIMITER_OPTIONS,
},
{
name: "Use column headers as labels",
type: "boolean",
value: true,
},
{
name: "X label",
type: "string",
value: "",
},
{
name: "Y label",
type: "string",
value: "",
},
{
name: "Colour",
type: "string",
value: Charts.COLOURS.max,
},
{
name: "Point radius",
type: "number",
value: 10,
},
{
name: "Use colour from third column",
type: "boolean",
value: false,
},
]
},
"Series chart": {
description: [].join("\n"),
run: Charts.runSeriesChart,
inputType: "string",
outputType: "html",
args: [
{
name: "Record delimiter",
type: "option",
value: Charts.RECORD_DELIMITER_OPTIONS,
},
{
name: "Field delimiter",
type: "option",
value: Charts.FIELD_DELIMITER_OPTIONS,
},
{
name: "X label",
type: "string",
value: "",
},
{
name: "Point radius",
type: "number",
value: 1,
},
{
name: "Series colours",
type: "string",
value: "mediumseagreen, dodgerblue, tomato",
},
]
},
"HTML to Text": {
description: [].join("\n"),
run: HTML.runHTMLToText,
inputType: "html",
outputType: "string",
args: [
]
}
};

export default OperationConfig;
Loading