@pie-element/graphing 3.5.4-next.1169 → 3.5.4-next.1173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/lib/configure.js +3 -0
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/defaults.js +191 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/graphing-config.js +90 -35
- package/configure/lib/graphing-config.js.map +1 -1
- package/docs/config-schema.json +553 -1
- package/docs/config-schema.json.md +349 -1
- package/docs/pie-schema.json +337 -129
- package/docs/pie-schema.json.md +212 -80
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphing-config.jsx"],"names":["styles","theme","container","display","flexWrap","marginBottom","spacing","unit","gridConfig","flexDirection","marginRight","graphConfig","subtitleText","marginTop","GraphingConfig","props","backgroundMarks","model","onChange","labels","title","config","state","oldGridValues","gridValues","oldLabelValues","labelValues","updatedModel","domain","includeAxes","graph","range","standardGrid","domainConstraints","width","step","labelStep","rangeConstraints","height","setState","event","expanded","graphDimensions","enabled","showPixelGuides","authoring","availableTools","classes","labelsPlaceholders","showLabels","showTitle","titlePlaceholder","arrows","coordinatesOnHover","dimensionsEnabled","min","max","sizeConstraints","Math","displayedFields","axisLabel","includeAxesEnabled","standardGridEnabled","displayGridSetup","Object","values","some","field","onConfigChange","onChangeView","includeArrows","changeLabels","changeBackgroundMarks","changeTitle","React","Component","PropTypes","object","isRequired","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,SAAS,EAAE;AACTC,MAAAA,OAAO,EAAE,MADA;AAETC,MAAAA,QAAQ,EAAE,MAFD;AAGTC,MAAAA,YAAY,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB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AAKC,qBAZtB;AAaE,QAAA,aAAa,EAAE,KAAKC,WAbtB;AAcE,QAAA,KAAK,EAAE1C,KAdT;AAeE,QAAA,UAAU,EAAEkB,UAfd;AAgBE,QAAA,eAAe,EAAEL,eAhBnB;AAiBE,QAAA,SAAS,EAAEM,SAjBb;AAkBE,QAAA,IAAI,EAAE;AAAEhB,UAAAA,KAAK,EAAEJ,KAAK,CAACI,KAAf;AAAsBI,UAAAA,MAAM,EAAER,KAAK,CAACQ;AAApC,SAlBR;AAmBE,QAAA,KAAK,EAAElB,KAnBT;AAoBE,QAAA,gBAAgB,EAAE+B,gBApBpB;AAqBE,QAAA,YAAY,EAAEL;AArBhB,QATF,CApBF,CADF;AAwDD;;;EA3LiC4B,KAAK,CAACC,S;;;iCAA7B7D,c,eACQ;AACjBiC,EAAAA,OAAO,EAAE6B,sBAAUC,MAAV,CAAiBC,UADT;AAEjBjC,EAAAA,SAAS,EAAE+B,sBAAUC,MAFJ;AAGjBnC,EAAAA,eAAe,EAAEkC,sBAAUC,MAHV;AAIjB5D,EAAAA,KAAK,EAAE2D,sBAAUC,MAAV,CAAiBC,UAJP;AAKjB5D,EAAAA,QAAQ,EAAE0D,sBAAUG,IAAV,CAAeD;AALR,C;AA2LpB;;eAEc,wBAAW9E,MAAX,EAAmBc,cAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GraphContainer, GridSetup } from '@pie-lib/graphing';\nimport { Typography } from '@material-ui/core';\nimport { withStyles } from '@material-ui/core/styles';\nimport { applyConstraints, getGridValues, getLabelValues } from './utils';\n\nconst styles = theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: theme.spacing.unit * 7\n },\n gridConfig: {\n display: 'flex',\n flexDirection: 'column',\n marginRight: theme.spacing.unit * 4,\n marginBottom: theme.spacing.unit * 3\n },\n graphConfig: {\n display: 'flex',\n flexDirection: 'column'\n },\n subtitleText: {\n marginTop: theme.spacing.unit * 1.5,\n marginBottom: theme.spacing.unit\n }\n});\n\nexport class GraphingConfig extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n authoring: PropTypes.object,\n graphDimensions: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { domain, range, graph } = props.model || {};\n\n const gridValues = {\n domain: getGridValues(domain, graph.width, true),\n range: getGridValues(range, graph.height, true)\n };\n const labelValues = {\n domain: getLabelValues(domain.step),\n range: getLabelValues(range.step)\n };\n\n this.state = { gridValues, labelValues, showPixelGuides: false };\n };\n\n changeBackgroundMarks = backgroundMarks => {\n const model = { ...this.props.model, backgroundMarks };\n\n this.props.onChange(model);\n };\n\n changeLabels = labels => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, labels });\n };\n\n changeTitle = title => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, title });\n };\n\n onConfigChange = config => {\n const { model, onChange } = this.props;\n const { gridValues: oldGridValues, labelValues: oldLabelValues } = this.state;\n const updatedModel = { ...model, ...config };\n const { domain, includeAxes, graph, range, standardGrid } = updatedModel;\n const gridValues = { domain: [], range: [] };\n const labelValues = { domain: [], range: [] };\n\n if (includeAxes) {\n const domainConstraints = applyConstraints(domain, graph.width, oldGridValues.domain, oldLabelValues.domain);\n\n gridValues.domain = domainConstraints.gridValues || [];\n labelValues.domain = domainConstraints.labelValues || [];\n }\n\n if (standardGrid) {\n gridValues.range = gridValues.domain;\n labelValues.range = labelValues.domain;\n range.step = domain.step;\n range.labelStep = domain.labelStep;\n } else {\n if (includeAxes) {\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues || [];\n labelValues.range = rangeConstraints.labelValues || [];\n }\n }\n\n this.setState({ gridValues, labelValues });\n onChange(updatedModel);\n };\n\n onChangeView = (event, expanded) => {\n const { graphDimensions: { enabled } = {}} = this.props;\n\n if (enabled) {\n this.setState({ showPixelGuides: expanded });\n }\n };\n\n render() {\n const {\n authoring = {},\n availableTools = [],\n classes,\n graphDimensions = {},\n labelsPlaceholders,\n model,\n showLabels,\n showTitle,\n titlePlaceholder\n } = this.props;\n const {\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n domain,\n includeAxes,\n labels,\n range,\n standardGrid,\n title\n } = model || {};\n const graph = (model || {}).graph || {};\n const { enabled: dimensionsEnabled, min, max, step } = graphDimensions || {};\n const { gridValues, labelValues, showPixelGuides } = this.state;\n\n const sizeConstraints = {\n min: Math.max(150, min),\n max: Math.min(800, max),\n step: step >= 1 ? Math.min(200, step) : 20\n };\n\n const displayedFields = {\n axisLabel: authoring.axisLabel,\n dimensionsEnabled,\n includeAxesEnabled: authoring.includeAxesEnabled,\n labelStep: authoring.labelStep,\n min: authoring.min,\n max: authoring.max,\n standardGridEnabled: authoring.standardGridEnabled,\n step: authoring.step\n };\n\n const displayGridSetup = authoring.enabled &&\n Object.values(displayedFields).some(field => typeof field === 'object' ? field.enabled : field);\n\n return (\n <div className={classes.container}>\n <div className={classes.gridConfig}>\n {displayGridSetup && (\n <GridSetup\n displayedFields={displayedFields}\n domain={domain}\n dimensionsEnabled={dimensionsEnabled}\n gridValues={gridValues}\n includeAxes={includeAxes}\n labelValues={labelValues}\n range={range}\n size={graph}\n sizeConstraints={sizeConstraints}\n standardGrid={standardGrid}\n onChange={this.onConfigChange}\n onChangeView={this.onChangeView}\n />\n )}\n </div>\n\n <div className={classes.graphConfig} key=\"graph\">\n <Typography component=\"div\" variant=\"subheading\">\n <span>Define Graph Attributes</span>\n </Typography>\n\n <Typography component=\"div\" variant=\"body1\" className={classes.subtitleText}>\n <span>Use this interface to add/edit a title and/or labels, and to set background shapes</span>\n </Typography>\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={[]}\n coordinatesOnHover={coordinatesOnHover}\n collapsibleToolbar={true}\n collapsibleToolbarTitle={'Add Background Shapes to Graph'}\n domain={domain}\n key=\"graphing-config\"\n labels={labels}\n labelsPlaceholders={labelsPlaceholders}\n marks={backgroundMarks}\n onChangeLabels={this.changeLabels}\n onChangeMarks={this.changeBackgroundMarks}\n onChangeTitle={this.changeTitle}\n range={range}\n showLabels={showLabels}\n showPixelGuides={showPixelGuides}\n showTitle={showTitle}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n titlePlaceholder={titlePlaceholder}\n toolbarTools={availableTools}\n />\n </div>\n </div>\n );\n }\n};\n\nexport default withStyles(styles)(GraphingConfig);\n"],"file":"graphing-config.js"}
|
|
1
|
+
{"version":3,"sources":["../src/graphing-config.jsx"],"names":["styles","theme","container","display","flexWrap","marginBottom","spacing","unit","gridConfigWrapper","flexDirection","marginRight","graphConfig","subtitleText","marginTop","gridConfig","alignItems","width","gridConfigLabel","padding","gridConfigSelect","flex","GraphingConfig","props","backgroundMarks","model","onChange","labels","title","config","state","oldGridValues","gridValues","oldLabelValues","labelValues","updatedModel","domain","includeAxes","graph","range","standardGrid","domainConstraints","step","labelStep","rangeConstraints","height","setState","event","expanded","graphDimensions","enabled","showPixelGuides","gridConfigurations","value","target","label","selectedGrid","authoring","availableTools","classes","labelsPlaceholders","showLabels","showTitle","titlePlaceholder","arrows","coordinatesOnHover","dimensionsEnabled","min","max","sizeConstraints","Math","displayedFields","axisLabel","includeAxesEnabled","standardGridEnabled","displayGridSetup","Object","values","some","field","length","changeGridConfiguration","map","index","onConfigChange","onChangeView","includeArrows","changeLabels","changeBackgroundMarks","changeTitle","React","Component","PropTypes","object","isRequired","array","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,SAAS,EAAE;AACTC,MAAAA,OAAO,EAAE,MADA;AAETC,MAAAA,QAAQ,EAAE,MAFD;AAGTC,MAAAA,YAAY,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IA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AAeF;AANR,C;AAwNpB;;eAEc,wBAAW7F,MAAX,EAAmBqB,cAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GraphContainer, GridSetup } from '@pie-lib/graphing';\nimport { MenuItem, Select, Typography, OutlinedInput } from '@material-ui/core';\nimport { withStyles } from '@material-ui/core/styles';\nimport { applyConstraints, getGridValues, getLabelValues } from './utils';\n\nconst styles = theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: theme.spacing.unit * 7\n },\n gridConfigWrapper: {\n display: 'flex',\n flexDirection: 'column',\n marginRight: theme.spacing.unit * 4,\n marginBottom: theme.spacing.unit * 3\n },\n graphConfig: {\n display: 'flex',\n flexDirection: 'column'\n },\n subtitleText: {\n marginTop: theme.spacing.unit * 1.5,\n marginBottom: theme.spacing.unit\n },\n gridConfig: {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n marginBottom: '16px'\n },\n gridConfigLabel: {\n padding: '0 8px'\n },\n gridConfigSelect: {\n flex: '1'\n }\n});\n\nexport class GraphingConfig extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n authoring: PropTypes.object,\n graphDimensions: PropTypes.object,\n gridConfigurations: PropTypes.array,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { domain, range, graph } = props.model || {};\n\n const gridValues = {\n domain: getGridValues(domain, graph.width, true),\n range: getGridValues(range, graph.height, true)\n };\n const labelValues = {\n domain: getLabelValues(domain.step),\n range: getLabelValues(range.step)\n };\n\n this.state = { gridValues, labelValues, selectedGrid: 0, showPixelGuides: false };\n };\n\n changeBackgroundMarks = backgroundMarks => {\n const model = { ...this.props.model, backgroundMarks };\n\n this.props.onChange(model);\n };\n\n changeLabels = labels => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, labels });\n };\n\n changeTitle = title => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, title });\n };\n\n onConfigChange = config => {\n const { model, onChange } = this.props;\n const { gridValues: oldGridValues, labelValues: oldLabelValues } = this.state;\n const updatedModel = { ...model, ...config };\n const { domain, includeAxes, graph, range, standardGrid } = updatedModel;\n const gridValues = { domain: [], range: [] };\n const labelValues = { domain: [], range: [] };\n\n if (includeAxes) {\n const domainConstraints = applyConstraints(domain, graph.width, oldGridValues.domain, oldLabelValues.domain);\n\n gridValues.domain = domainConstraints.gridValues || [];\n labelValues.domain = domainConstraints.labelValues || [];\n }\n\n if (standardGrid) {\n gridValues.range = gridValues.domain;\n labelValues.range = labelValues.domain;\n range.step = domain.step;\n range.labelStep = domain.labelStep;\n } else {\n if (includeAxes) {\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues || [];\n labelValues.range = rangeConstraints.labelValues || [];\n }\n }\n\n this.setState({ gridValues, labelValues });\n onChange(updatedModel);\n };\n\n onChangeView = (event, expanded) => {\n const { graphDimensions: { enabled } = {}} = this.props;\n\n if (enabled) {\n this.setState({ showPixelGuides: expanded });\n }\n };\n\n changeGridConfiguration = (event) => {\n const { gridConfigurations, model, onChange } = this.props;\n const { value } = event.target;\n const { label, ...updatedModel } = gridConfigurations[value] || {};\n\n this.setState({ selectedGrid: value });\n onChange({ ...model, ...updatedModel });\n };\n\n render() {\n const {\n authoring = {},\n availableTools = [],\n classes,\n gridConfigurations = [],\n graphDimensions = {},\n labelsPlaceholders,\n model,\n showLabels,\n showTitle,\n titlePlaceholder\n } = this.props;\n const {\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n domain,\n includeAxes,\n labels,\n range,\n standardGrid,\n title\n } = model || {};\n const graph = (model || {}).graph || {};\n const { enabled: dimensionsEnabled, min, max, step } = graphDimensions || {};\n const { gridValues, labelValues, selectedGrid, showPixelGuides } = this.state;\n\n const sizeConstraints = {\n min: Math.max(150, min),\n max: Math.min(800, max),\n step: step >= 1 ? Math.min(200, step) : 20\n };\n\n const displayedFields = {\n axisLabel: authoring.axisLabel,\n dimensionsEnabled,\n includeAxesEnabled: authoring.includeAxesEnabled,\n labelStep: authoring.labelStep,\n min: authoring.min,\n max: authoring.max,\n standardGridEnabled: authoring.standardGridEnabled,\n step: authoring.step\n };\n\n const displayGridSetup = authoring.enabled &&\n Object.values(displayedFields).some(field => typeof field === 'object' ? field.enabled : field);\n\n return (\n <div className={classes.container}>\n <div className={classes.gridConfigWrapper}>\n {gridConfigurations && gridConfigurations.length ? (\n <div className={classes.gridConfig}>\n <Typography component=\"div\" variant=\"subheading\" className={classes.gridConfigLabel}>\n <span>Grid Configuration</span>\n </Typography>\n <Select\n input={<OutlinedInput />}\n className={classes.gridConfigSelect}\n displayEmpty\n onChange={this.changeGridConfiguration}\n value={selectedGrid}\n >\n {(gridConfigurations || []).map((config, index) =>\n <MenuItem key={index} value={index}>{config.label}</MenuItem>\n )}\n </Select>\n </div>\n ) : null}\n {displayGridSetup && (\n <GridSetup\n displayedFields={displayedFields}\n domain={domain}\n dimensionsEnabled={dimensionsEnabled}\n gridValues={gridValues}\n includeAxes={includeAxes}\n labelValues={labelValues}\n range={range}\n size={graph}\n sizeConstraints={sizeConstraints}\n standardGrid={standardGrid}\n onChange={this.onConfigChange}\n onChangeView={this.onChangeView}\n />\n )}\n </div>\n\n <div className={classes.graphConfig} key=\"graph\">\n <Typography component=\"div\" variant=\"subheading\">\n <span>Define Graph Attributes</span>\n </Typography>\n\n <Typography component=\"div\" variant=\"body1\" className={classes.subtitleText}>\n <span>Use this interface to add/edit a title and/or labels, and to set background shapes</span>\n </Typography>\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={[]}\n coordinatesOnHover={coordinatesOnHover}\n collapsibleToolbar={true}\n collapsibleToolbarTitle={'Add Background Shapes to Graph'}\n domain={domain}\n key=\"graphing-config\"\n labels={labels}\n labelsPlaceholders={labelsPlaceholders}\n marks={backgroundMarks}\n onChangeLabels={this.changeLabels}\n onChangeMarks={this.changeBackgroundMarks}\n onChangeTitle={this.changeTitle}\n range={range}\n showLabels={showLabels}\n showPixelGuides={showPixelGuides}\n showTitle={showTitle}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n titlePlaceholder={titlePlaceholder}\n toolbarTools={availableTools}\n />\n </div>\n </div>\n );\n }\n};\n\nexport default withStyles(styles)(GraphingConfig);\n"],"file":"graphing-config.js"}
|
package/docs/config-schema.json
CHANGED
|
@@ -234,6 +234,219 @@
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
},
|
|
237
|
+
"gridConfigurations": {
|
|
238
|
+
"description": "Grid default configurations",
|
|
239
|
+
"type": "array",
|
|
240
|
+
"items": {
|
|
241
|
+
"title": "GridConfigurationsProp",
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"label": {
|
|
245
|
+
"description": "Indicates the label for the configuration",
|
|
246
|
+
"type": "string",
|
|
247
|
+
"title": "label"
|
|
248
|
+
},
|
|
249
|
+
"arrows": {
|
|
250
|
+
"title": "Arrows",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"left": {
|
|
254
|
+
"description": "Indicates if left arrow is enabled",
|
|
255
|
+
"type": "boolean",
|
|
256
|
+
"title": "left"
|
|
257
|
+
},
|
|
258
|
+
"right": {
|
|
259
|
+
"description": "Indicates if right arrow is enabled",
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"title": "right"
|
|
262
|
+
},
|
|
263
|
+
"up": {
|
|
264
|
+
"description": "Indicates if up arrow is enabled",
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"title": "up"
|
|
267
|
+
},
|
|
268
|
+
"down": {
|
|
269
|
+
"description": "Indicates if down arrow is enabled",
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"title": "down"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": [
|
|
275
|
+
"down",
|
|
276
|
+
"left",
|
|
277
|
+
"right",
|
|
278
|
+
"up"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"domain": {
|
|
282
|
+
"title": "GraphSettings",
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"min": {
|
|
286
|
+
"description": "Min value",
|
|
287
|
+
"type": "number",
|
|
288
|
+
"title": "min"
|
|
289
|
+
},
|
|
290
|
+
"max": {
|
|
291
|
+
"description": "Max value",
|
|
292
|
+
"type": "number",
|
|
293
|
+
"title": "max"
|
|
294
|
+
},
|
|
295
|
+
"padding": {
|
|
296
|
+
"description": "Padding value",
|
|
297
|
+
"type": "number",
|
|
298
|
+
"title": "padding"
|
|
299
|
+
},
|
|
300
|
+
"step": {
|
|
301
|
+
"description": "Step value",
|
|
302
|
+
"type": "number",
|
|
303
|
+
"title": "step"
|
|
304
|
+
},
|
|
305
|
+
"labelStep": {
|
|
306
|
+
"description": "Label step value",
|
|
307
|
+
"type": "number",
|
|
308
|
+
"title": "labelStep"
|
|
309
|
+
},
|
|
310
|
+
"axisLabel": {
|
|
311
|
+
"description": "Axis Label",
|
|
312
|
+
"type": "string",
|
|
313
|
+
"title": "axisLabel"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"required": [
|
|
317
|
+
"axisLabel",
|
|
318
|
+
"labelStep",
|
|
319
|
+
"max",
|
|
320
|
+
"min",
|
|
321
|
+
"padding",
|
|
322
|
+
"step"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"graph": {
|
|
326
|
+
"title": "Graph",
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"width": {
|
|
330
|
+
"description": "Width for graph representation",
|
|
331
|
+
"type": "number",
|
|
332
|
+
"title": "width"
|
|
333
|
+
},
|
|
334
|
+
"height": {
|
|
335
|
+
"description": "Height for graph representation",
|
|
336
|
+
"type": "number",
|
|
337
|
+
"title": "height"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"required": [
|
|
341
|
+
"height",
|
|
342
|
+
"width"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"includeAxes": {
|
|
346
|
+
"description": "Indicates if the graph axes and labels are enabled",
|
|
347
|
+
"type": "boolean",
|
|
348
|
+
"title": "includeAxes"
|
|
349
|
+
},
|
|
350
|
+
"labels": {
|
|
351
|
+
"title": "Labels",
|
|
352
|
+
"type": "object",
|
|
353
|
+
"properties": {
|
|
354
|
+
"top": {
|
|
355
|
+
"description": "Label for top side of the graph",
|
|
356
|
+
"type": "string",
|
|
357
|
+
"title": "top"
|
|
358
|
+
},
|
|
359
|
+
"bottom": {
|
|
360
|
+
"description": "Label for bottom side of the graph",
|
|
361
|
+
"type": "string",
|
|
362
|
+
"title": "bottom"
|
|
363
|
+
},
|
|
364
|
+
"left": {
|
|
365
|
+
"description": "Label for left side of the graph",
|
|
366
|
+
"type": "string",
|
|
367
|
+
"title": "left"
|
|
368
|
+
},
|
|
369
|
+
"right": {
|
|
370
|
+
"description": "Label for right side of the graph",
|
|
371
|
+
"type": "string",
|
|
372
|
+
"title": "right"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"required": [
|
|
376
|
+
"bottom",
|
|
377
|
+
"left",
|
|
378
|
+
"right",
|
|
379
|
+
"top"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"padding": {
|
|
383
|
+
"description": "Indicates if padding is enabled",
|
|
384
|
+
"type": "boolean",
|
|
385
|
+
"title": "padding"
|
|
386
|
+
},
|
|
387
|
+
"range": {
|
|
388
|
+
"title": "GraphSettings",
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"min": {
|
|
392
|
+
"description": "Min value",
|
|
393
|
+
"type": "number",
|
|
394
|
+
"title": "min"
|
|
395
|
+
},
|
|
396
|
+
"max": {
|
|
397
|
+
"description": "Max value",
|
|
398
|
+
"type": "number",
|
|
399
|
+
"title": "max"
|
|
400
|
+
},
|
|
401
|
+
"padding": {
|
|
402
|
+
"description": "Padding value",
|
|
403
|
+
"type": "number",
|
|
404
|
+
"title": "padding"
|
|
405
|
+
},
|
|
406
|
+
"step": {
|
|
407
|
+
"description": "Step value",
|
|
408
|
+
"type": "number",
|
|
409
|
+
"title": "step"
|
|
410
|
+
},
|
|
411
|
+
"labelStep": {
|
|
412
|
+
"description": "Label step value",
|
|
413
|
+
"type": "number",
|
|
414
|
+
"title": "labelStep"
|
|
415
|
+
},
|
|
416
|
+
"axisLabel": {
|
|
417
|
+
"description": "Axis Label",
|
|
418
|
+
"type": "string",
|
|
419
|
+
"title": "axisLabel"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"required": [
|
|
423
|
+
"axisLabel",
|
|
424
|
+
"labelStep",
|
|
425
|
+
"max",
|
|
426
|
+
"min",
|
|
427
|
+
"padding",
|
|
428
|
+
"step"
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
"standardGrid": {
|
|
432
|
+
"description": "Indicates if some domain values will be synched to the range values",
|
|
433
|
+
"type": "boolean",
|
|
434
|
+
"title": "standardGrid"
|
|
435
|
+
},
|
|
436
|
+
"title": {
|
|
437
|
+
"description": "Indicates graph title",
|
|
438
|
+
"type": "string",
|
|
439
|
+
"title": "title"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"domain",
|
|
444
|
+
"graph",
|
|
445
|
+
"range"
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
"title": "gridConfigurations"
|
|
449
|
+
},
|
|
237
450
|
"padding": {
|
|
238
451
|
"title": "ConfigureProp",
|
|
239
452
|
"type": "object",
|
|
@@ -474,6 +687,9 @@
|
|
|
474
687
|
"title": "settingsPartialScoring"
|
|
475
688
|
}
|
|
476
689
|
},
|
|
690
|
+
"required": [
|
|
691
|
+
"gridConfigurations"
|
|
692
|
+
],
|
|
477
693
|
"definitions": {
|
|
478
694
|
"AuthoringConfigProp": {
|
|
479
695
|
"title": "AuthoringConfigProp",
|
|
@@ -725,6 +941,342 @@
|
|
|
725
941
|
}
|
|
726
942
|
}
|
|
727
943
|
},
|
|
944
|
+
"GridConfigurationsProp": {
|
|
945
|
+
"title": "GridConfigurationsProp",
|
|
946
|
+
"type": "object",
|
|
947
|
+
"properties": {
|
|
948
|
+
"label": {
|
|
949
|
+
"description": "Indicates the label for the configuration",
|
|
950
|
+
"type": "string",
|
|
951
|
+
"title": "label"
|
|
952
|
+
},
|
|
953
|
+
"arrows": {
|
|
954
|
+
"title": "Arrows",
|
|
955
|
+
"type": "object",
|
|
956
|
+
"properties": {
|
|
957
|
+
"left": {
|
|
958
|
+
"description": "Indicates if left arrow is enabled",
|
|
959
|
+
"type": "boolean",
|
|
960
|
+
"title": "left"
|
|
961
|
+
},
|
|
962
|
+
"right": {
|
|
963
|
+
"description": "Indicates if right arrow is enabled",
|
|
964
|
+
"type": "boolean",
|
|
965
|
+
"title": "right"
|
|
966
|
+
},
|
|
967
|
+
"up": {
|
|
968
|
+
"description": "Indicates if up arrow is enabled",
|
|
969
|
+
"type": "boolean",
|
|
970
|
+
"title": "up"
|
|
971
|
+
},
|
|
972
|
+
"down": {
|
|
973
|
+
"description": "Indicates if down arrow is enabled",
|
|
974
|
+
"type": "boolean",
|
|
975
|
+
"title": "down"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"required": [
|
|
979
|
+
"down",
|
|
980
|
+
"left",
|
|
981
|
+
"right",
|
|
982
|
+
"up"
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
"domain": {
|
|
986
|
+
"title": "GraphSettings",
|
|
987
|
+
"type": "object",
|
|
988
|
+
"properties": {
|
|
989
|
+
"min": {
|
|
990
|
+
"description": "Min value",
|
|
991
|
+
"type": "number",
|
|
992
|
+
"title": "min"
|
|
993
|
+
},
|
|
994
|
+
"max": {
|
|
995
|
+
"description": "Max value",
|
|
996
|
+
"type": "number",
|
|
997
|
+
"title": "max"
|
|
998
|
+
},
|
|
999
|
+
"padding": {
|
|
1000
|
+
"description": "Padding value",
|
|
1001
|
+
"type": "number",
|
|
1002
|
+
"title": "padding"
|
|
1003
|
+
},
|
|
1004
|
+
"step": {
|
|
1005
|
+
"description": "Step value",
|
|
1006
|
+
"type": "number",
|
|
1007
|
+
"title": "step"
|
|
1008
|
+
},
|
|
1009
|
+
"labelStep": {
|
|
1010
|
+
"description": "Label step value",
|
|
1011
|
+
"type": "number",
|
|
1012
|
+
"title": "labelStep"
|
|
1013
|
+
},
|
|
1014
|
+
"axisLabel": {
|
|
1015
|
+
"description": "Axis Label",
|
|
1016
|
+
"type": "string",
|
|
1017
|
+
"title": "axisLabel"
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"required": [
|
|
1021
|
+
"axisLabel",
|
|
1022
|
+
"labelStep",
|
|
1023
|
+
"max",
|
|
1024
|
+
"min",
|
|
1025
|
+
"padding",
|
|
1026
|
+
"step"
|
|
1027
|
+
]
|
|
1028
|
+
},
|
|
1029
|
+
"graph": {
|
|
1030
|
+
"title": "Graph",
|
|
1031
|
+
"type": "object",
|
|
1032
|
+
"properties": {
|
|
1033
|
+
"width": {
|
|
1034
|
+
"description": "Width for graph representation",
|
|
1035
|
+
"type": "number",
|
|
1036
|
+
"title": "width"
|
|
1037
|
+
},
|
|
1038
|
+
"height": {
|
|
1039
|
+
"description": "Height for graph representation",
|
|
1040
|
+
"type": "number",
|
|
1041
|
+
"title": "height"
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"required": [
|
|
1045
|
+
"height",
|
|
1046
|
+
"width"
|
|
1047
|
+
]
|
|
1048
|
+
},
|
|
1049
|
+
"includeAxes": {
|
|
1050
|
+
"description": "Indicates if the graph axes and labels are enabled",
|
|
1051
|
+
"type": "boolean",
|
|
1052
|
+
"title": "includeAxes"
|
|
1053
|
+
},
|
|
1054
|
+
"labels": {
|
|
1055
|
+
"title": "Labels",
|
|
1056
|
+
"type": "object",
|
|
1057
|
+
"properties": {
|
|
1058
|
+
"top": {
|
|
1059
|
+
"description": "Label for top side of the graph",
|
|
1060
|
+
"type": "string",
|
|
1061
|
+
"title": "top"
|
|
1062
|
+
},
|
|
1063
|
+
"bottom": {
|
|
1064
|
+
"description": "Label for bottom side of the graph",
|
|
1065
|
+
"type": "string",
|
|
1066
|
+
"title": "bottom"
|
|
1067
|
+
},
|
|
1068
|
+
"left": {
|
|
1069
|
+
"description": "Label for left side of the graph",
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"title": "left"
|
|
1072
|
+
},
|
|
1073
|
+
"right": {
|
|
1074
|
+
"description": "Label for right side of the graph",
|
|
1075
|
+
"type": "string",
|
|
1076
|
+
"title": "right"
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
"required": [
|
|
1080
|
+
"bottom",
|
|
1081
|
+
"left",
|
|
1082
|
+
"right",
|
|
1083
|
+
"top"
|
|
1084
|
+
]
|
|
1085
|
+
},
|
|
1086
|
+
"padding": {
|
|
1087
|
+
"description": "Indicates if padding is enabled",
|
|
1088
|
+
"type": "boolean",
|
|
1089
|
+
"title": "padding"
|
|
1090
|
+
},
|
|
1091
|
+
"range": {
|
|
1092
|
+
"title": "GraphSettings",
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"properties": {
|
|
1095
|
+
"min": {
|
|
1096
|
+
"description": "Min value",
|
|
1097
|
+
"type": "number",
|
|
1098
|
+
"title": "min"
|
|
1099
|
+
},
|
|
1100
|
+
"max": {
|
|
1101
|
+
"description": "Max value",
|
|
1102
|
+
"type": "number",
|
|
1103
|
+
"title": "max"
|
|
1104
|
+
},
|
|
1105
|
+
"padding": {
|
|
1106
|
+
"description": "Padding value",
|
|
1107
|
+
"type": "number",
|
|
1108
|
+
"title": "padding"
|
|
1109
|
+
},
|
|
1110
|
+
"step": {
|
|
1111
|
+
"description": "Step value",
|
|
1112
|
+
"type": "number",
|
|
1113
|
+
"title": "step"
|
|
1114
|
+
},
|
|
1115
|
+
"labelStep": {
|
|
1116
|
+
"description": "Label step value",
|
|
1117
|
+
"type": "number",
|
|
1118
|
+
"title": "labelStep"
|
|
1119
|
+
},
|
|
1120
|
+
"axisLabel": {
|
|
1121
|
+
"description": "Axis Label",
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"title": "axisLabel"
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
"required": [
|
|
1127
|
+
"axisLabel",
|
|
1128
|
+
"labelStep",
|
|
1129
|
+
"max",
|
|
1130
|
+
"min",
|
|
1131
|
+
"padding",
|
|
1132
|
+
"step"
|
|
1133
|
+
]
|
|
1134
|
+
},
|
|
1135
|
+
"standardGrid": {
|
|
1136
|
+
"description": "Indicates if some domain values will be synched to the range values",
|
|
1137
|
+
"type": "boolean",
|
|
1138
|
+
"title": "standardGrid"
|
|
1139
|
+
},
|
|
1140
|
+
"title": {
|
|
1141
|
+
"description": "Indicates graph title",
|
|
1142
|
+
"type": "string",
|
|
1143
|
+
"title": "title"
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"required": [
|
|
1147
|
+
"domain",
|
|
1148
|
+
"graph",
|
|
1149
|
+
"range"
|
|
1150
|
+
]
|
|
1151
|
+
},
|
|
1152
|
+
"Arrows": {
|
|
1153
|
+
"title": "Arrows",
|
|
1154
|
+
"type": "object",
|
|
1155
|
+
"properties": {
|
|
1156
|
+
"left": {
|
|
1157
|
+
"description": "Indicates if left arrow is enabled",
|
|
1158
|
+
"type": "boolean",
|
|
1159
|
+
"title": "left"
|
|
1160
|
+
},
|
|
1161
|
+
"right": {
|
|
1162
|
+
"description": "Indicates if right arrow is enabled",
|
|
1163
|
+
"type": "boolean",
|
|
1164
|
+
"title": "right"
|
|
1165
|
+
},
|
|
1166
|
+
"up": {
|
|
1167
|
+
"description": "Indicates if up arrow is enabled",
|
|
1168
|
+
"type": "boolean",
|
|
1169
|
+
"title": "up"
|
|
1170
|
+
},
|
|
1171
|
+
"down": {
|
|
1172
|
+
"description": "Indicates if down arrow is enabled",
|
|
1173
|
+
"type": "boolean",
|
|
1174
|
+
"title": "down"
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
"required": [
|
|
1178
|
+
"down",
|
|
1179
|
+
"left",
|
|
1180
|
+
"right",
|
|
1181
|
+
"up"
|
|
1182
|
+
]
|
|
1183
|
+
},
|
|
1184
|
+
"GraphSettings": {
|
|
1185
|
+
"title": "GraphSettings",
|
|
1186
|
+
"type": "object",
|
|
1187
|
+
"properties": {
|
|
1188
|
+
"min": {
|
|
1189
|
+
"description": "Min value",
|
|
1190
|
+
"type": "number",
|
|
1191
|
+
"title": "min"
|
|
1192
|
+
},
|
|
1193
|
+
"max": {
|
|
1194
|
+
"description": "Max value",
|
|
1195
|
+
"type": "number",
|
|
1196
|
+
"title": "max"
|
|
1197
|
+
},
|
|
1198
|
+
"padding": {
|
|
1199
|
+
"description": "Padding value",
|
|
1200
|
+
"type": "number",
|
|
1201
|
+
"title": "padding"
|
|
1202
|
+
},
|
|
1203
|
+
"step": {
|
|
1204
|
+
"description": "Step value",
|
|
1205
|
+
"type": "number",
|
|
1206
|
+
"title": "step"
|
|
1207
|
+
},
|
|
1208
|
+
"labelStep": {
|
|
1209
|
+
"description": "Label step value",
|
|
1210
|
+
"type": "number",
|
|
1211
|
+
"title": "labelStep"
|
|
1212
|
+
},
|
|
1213
|
+
"axisLabel": {
|
|
1214
|
+
"description": "Axis Label",
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"title": "axisLabel"
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
"required": [
|
|
1220
|
+
"axisLabel",
|
|
1221
|
+
"labelStep",
|
|
1222
|
+
"max",
|
|
1223
|
+
"min",
|
|
1224
|
+
"padding",
|
|
1225
|
+
"step"
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
"Graph": {
|
|
1229
|
+
"title": "Graph",
|
|
1230
|
+
"type": "object",
|
|
1231
|
+
"properties": {
|
|
1232
|
+
"width": {
|
|
1233
|
+
"description": "Width for graph representation",
|
|
1234
|
+
"type": "number",
|
|
1235
|
+
"title": "width"
|
|
1236
|
+
},
|
|
1237
|
+
"height": {
|
|
1238
|
+
"description": "Height for graph representation",
|
|
1239
|
+
"type": "number",
|
|
1240
|
+
"title": "height"
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"required": [
|
|
1244
|
+
"height",
|
|
1245
|
+
"width"
|
|
1246
|
+
]
|
|
1247
|
+
},
|
|
1248
|
+
"Labels": {
|
|
1249
|
+
"title": "Labels",
|
|
1250
|
+
"type": "object",
|
|
1251
|
+
"properties": {
|
|
1252
|
+
"top": {
|
|
1253
|
+
"description": "Label for top side of the graph",
|
|
1254
|
+
"type": "string",
|
|
1255
|
+
"title": "top"
|
|
1256
|
+
},
|
|
1257
|
+
"bottom": {
|
|
1258
|
+
"description": "Label for bottom side of the graph",
|
|
1259
|
+
"type": "string",
|
|
1260
|
+
"title": "bottom"
|
|
1261
|
+
},
|
|
1262
|
+
"left": {
|
|
1263
|
+
"description": "Label for left side of the graph",
|
|
1264
|
+
"type": "string",
|
|
1265
|
+
"title": "left"
|
|
1266
|
+
},
|
|
1267
|
+
"right": {
|
|
1268
|
+
"description": "Label for right side of the graph",
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"title": "right"
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"required": [
|
|
1274
|
+
"bottom",
|
|
1275
|
+
"left",
|
|
1276
|
+
"right",
|
|
1277
|
+
"top"
|
|
1278
|
+
]
|
|
1279
|
+
},
|
|
728
1280
|
"LabelsConfigProp": {
|
|
729
1281
|
"title": "LabelsConfigProp",
|
|
730
1282
|
"type": "object",
|
|
@@ -815,4 +1367,4 @@
|
|
|
815
1367
|
}
|
|
816
1368
|
},
|
|
817
1369
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
818
|
-
}
|
|
1370
|
+
}
|