Fixed coments
This commit is contained in:
Родитель
e32fa68aab
Коммит
e29c668898
|
@ -65,7 +65,7 @@ chartHelper.draw(queryResultData, chartOptions);
|
|||
| onFinishDataTransformation | Function(dataTransformationInfo: IDataTransformationInfo) : Promise<boolean> | Callback that is called when all the data transformations required to draw the chart are finished<br/>Callback inputs:<br/> [IDataTransformationInfo](#IDataTransformationInfo) - The information regarding the applied transformations on the original query results<br/>Callback return value:<br/> The promise that is used to continue/stop drawing the chart<br/> When provided, the drawing of the chart will be suspended until this promise will be resolved<br/> When resolved with true - the chart will continue the drawing<br/> When resolved with false - the chart drawing will be canceled | |
|
||||
| onFinishDrawing | Function(chartInfo: IChartInfo) : void | Callback that is called when the chart drawing is finished <br/>Callback inputs:<br/> [IChartInfo](#IChartInfo) - The information regarding the chart | | |
|
||||
| onFinishChartAnimation | Function(chartInfo: IChartInfo) : void | Callback that is called when the chart animation is finished <br/>Callback inputs:<br/> [IChartInfo](#IChartInfo) - The information regarding the chart | | |
|
||||
| onDataPointClicked | Function(dataPoint: IDataPoint) : void | When this callback is provided, the chart data points will be clickable.<br/>The callback will be called after a click on a certain data point in the chart.<br/>Callback inputs:<br/> [IDataPoint](#IDataPoint) - The information regarding the values of the clicked data point.<br/> <b>Note</b> that the value of a date-time column in the dataPoint object will be its numeric value - Date.valueOf(). | | |
|
||||
| onDataPointClicked | Function(dataPoint: IDataPoint) : void | When this callback is provided, the chart data points will be clickable.<br/>The callback will be called when chart's data point will be clicked, providing the clicked data point information.<br/>Callback inputs:<br/> [IDataPoint](#IDataPoint) - The information regarding the columns and values of the clicked data point.<br/> <b>Note</b> that the value of a date-time column in the dataPoint object will be its numeric value - Date.valueOf(). | | |
|
||||
|
||||
### IDataTransformationInfo
|
||||
| Option name: | Type: | Details: |
|
||||
|
|
|
@ -324,9 +324,9 @@ export interface IChartOptions {
|
|||
|
||||
/**
|
||||
* When this callback is provided, the chart data points will be clickable.
|
||||
* The callback will be called after a click on a certain data point in the chart.
|
||||
* The callback will be called when chart's data point will be clicked, providing the clicked data point information.
|
||||
* Callback inputs:
|
||||
* @param dataPoint - The information regarding the values of the clicked data point.
|
||||
* @param dataPoint - The information regarding the columns and values of the clicked data point.
|
||||
* Note that the value of a date-time column in the dataPoint object will be its numeric value - Date.valueOf().
|
||||
*/
|
||||
onDataPointClicked?: (dataPoint: IDataPoint) => void;
|
||||
|
|
|
@ -185,14 +185,6 @@ export abstract class Chart {
|
|||
}
|
||||
}
|
||||
|
||||
public /*virtual*/ verifyInput(options: IVisualizerOptions): void {
|
||||
const columnSelection = options.chartOptions.columnsSelection;
|
||||
|
||||
if(columnSelection.splitBy && columnSelection.splitBy.length > 1) {
|
||||
throw new InvalidInputError(`Multiple split-by columns selection isn't allowed for ${options.chartOptions.chartType}`, ErrorCode.InvalidColumnsSelection);
|
||||
}
|
||||
}
|
||||
|
||||
public /*virtual*/ getDataPoint(chartOptions: IChartOptions, point: Highcharts.Point): IDataPoint {
|
||||
// Y axis
|
||||
const yAxes = chartOptions.columnsSelection.yAxes;
|
||||
|
@ -232,6 +224,14 @@ export abstract class Chart {
|
|||
return dataPointInfo;
|
||||
}
|
||||
|
||||
public /*virtual*/ verifyInput(options: IVisualizerOptions): void {
|
||||
const columnSelection = options.chartOptions.columnsSelection;
|
||||
|
||||
if(columnSelection.splitBy && columnSelection.splitBy.length > 1) {
|
||||
throw new InvalidInputError(`Multiple split-by columns selection isn't allowed for ${options.chartOptions.chartType}`, ErrorCode.InvalidColumnsSelection);
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion Virtual methods
|
||||
|
||||
//#region Abstract methods
|
||||
|
|
|
@ -154,14 +154,6 @@ export class Pie extends Chart {
|
|||
}
|
||||
}
|
||||
|
||||
public /*override*/ verifyInput(options: IVisualizerOptions): void {
|
||||
const columnSelection = options.chartOptions.columnsSelection;
|
||||
|
||||
if(columnSelection.yAxes.length > 1) {
|
||||
throw new InvalidInputError(`Multiple y-axis columns selection isn't allowed for ${options.chartOptions.chartType}`, ErrorCode.InvalidColumnsSelection);
|
||||
}
|
||||
}
|
||||
|
||||
public /*virtual*/ getDataPoint(chartOptions: IChartOptions, point: Highcharts.Point): IDataPoint {
|
||||
const seriesColumnName: string = point.series.name;
|
||||
const xColumn: IColumn = chartOptions.columnsSelection.xAxis;
|
||||
|
@ -197,6 +189,14 @@ export class Pie extends Chart {
|
|||
return dataPointInfo;
|
||||
}
|
||||
|
||||
public /*override*/ verifyInput(options: IVisualizerOptions): void {
|
||||
const columnSelection = options.chartOptions.columnsSelection;
|
||||
|
||||
if(columnSelection.yAxes.length > 1) {
|
||||
throw new InvalidInputError(`Multiple y-axis columns selection isn't allowed for ${options.chartOptions.chartType}`, ErrorCode.InvalidColumnsSelection);
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion Methods override
|
||||
|
||||
protected getInnerSize(): string {
|
||||
|
|
Загрузка…
Ссылка в новой задаче