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

SCAL-200368 Dynamic Gradient Coloring #89

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thoughtspot/ts-chart-sdk",
"private": false,
"version": "0.0.2-alpha.22",
"version": "0.0.2-alpha.23",
"module": "lib/index",
"main": "lib/index",
"types": "lib/index",
Expand Down
1 change: 1 addition & 0 deletions src/main/custom-chart-context.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe('CustomChartContext', () => {
allowedConfigurations: {
allowColumnNumberFormatting: false,
allowColumnConditionalFormatting: false,
allowGradientColoring: false,
allowMeasureNamesAndValues: false,
},
chartConfigParameters: {
Expand Down
9 changes: 9 additions & 0 deletions src/main/custom-chart-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
*/
allowColumnConditionalFormatting?: boolean;

/**
* Allows Gradient coloring at the column level.
*
* @default false
* @version SDK: 0.1 | ThoughtSpot:
*/
allowGradientColoring?: boolean;

/**
* Enables measure_name and measure_values in the chart configuration.
*
Expand Down Expand Up @@ -269,6 +277,7 @@
allowedConfigurations: {
allowColumnNumberFormatting: false,
allowColumnConditionalFormatting: false,
allowGradientColoring: false,
allowMeasureNamesAndValues: false,
},
chartConfigParameters: {
Expand Down Expand Up @@ -401,7 +410,7 @@
* @version SDK: 0.1 | ThoughtSpot:
*/
public initialize = (): Promise<void> => {
console.log('Chart Context: initialization start');

Check warning on line 413 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
return this.hasInitializedPromise;
};

Expand Down Expand Up @@ -433,7 +442,7 @@
*/
public off<T extends keyof TSToChartEventsPayloadMap>(eventType: T): void {
if (_.isNil(this.eventListeners[eventType])) {
console.log('No event listener found to remove');

Check warning on line 445 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
this.eventListeners[eventType] = [];
return;
}
Expand Down Expand Up @@ -654,7 +663,7 @@
...eventPayload: ChartToTSEventsPayloadMap[T]
): Promise<any> {
if (!globalThis.isInitialized) {
console.log(

Check warning on line 666 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'Chart Context: not initialized the context, something went wrong',
);
return Promise.reject(new Error('Context not initialized'));
Expand All @@ -677,7 +686,7 @@
*/
private registerEventProcessor = () => {
if (globalThis.isInitialized) {
console.error(

Check warning on line 689 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'The context is already initialized. you cannot have multiple contexts',
);
throw new Error(ErrorType.MultipleContextsNotSupported);
Expand All @@ -693,7 +702,7 @@
* @param event : Message Event Object
*/
private eventProcessor = (data: any) => {
console.log('Chart Context: message received:', data.eventType, data);

Check warning on line 705 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement

const messageResponse = this.executeEventListenerCBs(data);

Expand Down Expand Up @@ -878,7 +887,7 @@
isValid: true,
};
} catch (error: unknown) {
console.log(

Check warning on line 890 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'ContextMenuCustomAction: payload recieved:',
payload,
'CustomActionCallbackStore:',
Expand Down Expand Up @@ -921,7 +930,7 @@
isValid: true,
};
} catch (error: unknown) {
console.log(

Check warning on line 933 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'AxisMenuCustomAction: payload recieved:',
payload,
'CustomActionCallbackStore:',
Expand Down Expand Up @@ -1080,7 +1089,7 @@
};
}

console.log(

Check warning on line 1092 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'ChartContext: Response:',
data.eventType,
response,
Expand Down
Loading