Skip to content

Commit

Permalink
tooltip config changes update
Browse files Browse the repository at this point in the history
  • Loading branch information
harshmeetTS committed Nov 19, 2024
1 parent 42dc735 commit 0516949
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 220 deletions.
8 changes: 7 additions & 1 deletion example/custom-bar-chart/custom-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,18 @@ const renderChart = async (ctx: CustomChartContext): Promise<void> => {
const { visualProps } = currentVisualProps;
const elements = [
{
key: 'color',
key: 'coloraaa',
type: 'radio',
defaultValue: 'red',
values: ['red', 'green', 'yellow'],
label: 'Colors',
},
{
key: 'tooltipconfig1',
type: 'tooltipconfig',
defaultValue: 'true',
label: 'ToolTip',
},
{
type: 'section',
key: 'accordion',
Expand Down
2 changes: 1 addition & 1 deletion example/custom-bar-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"vite": "^4.3.5"
},
"dependencies": {
"@thoughtspot/ts-chart-sdk": "0.0.2-alpha.20",
"@thoughtspot/ts-chart-sdk": "link:/Users/harshmeet.singh/Desktop/ts-chart-sdk",
"chart.js": "^4.3.0",
"chartjs-plugin-datalabels": "^2.2.0",
"lodash": "^4.17.21"
Expand Down
220 changes: 3 additions & 217 deletions example/custom-bar-chart/pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions src/types/ts-to-chart-event.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export enum TSToChartEvent {
* @version SDK: 0.1 | ThoughtSpot:
*/
AxisMenuActionClick = 'AxisMenuActionClick',

GetColumnData = 'GetColumnData',
}

/**
Expand Down
11 changes: 10 additions & 1 deletion src/types/visual-prop.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
import type { CustomChartContext } from '../main/custom-chart-context';
import { ColumnType } from './answer-column.types';
import { ChartModel } from './common.types';

export type TSTooltipConfig = {
columnIds: Array<string>;
};

/**
* Configuration for input validation rules
*/
Expand Down Expand Up @@ -408,7 +413,11 @@ export interface NativeEditToolTip {
*/
key: string;

defaultValue?: string;
/*
List of column ids that are present in ToolTipConfig by default
*/

defaultValue?: TSTooltipConfig;

/**
* I18n'ed string to show on the form label
Expand Down

0 comments on commit 0516949

Please sign in to comment.