@@ -8214,3 +8214,170 @@ export interface ContextObject {
82148214 objectIds : ObjectIds ;
82158215 } ;
82168216}
8217+
8218+
8219+ // ─── Visual Overrides ────────────────────────────────────────────────────────
8220+
8221+ export interface FontProperties {
8222+ color ?: string ;
8223+ bold ?: boolean ;
8224+ italic ?: boolean ;
8225+ strikeThrough ?: boolean ;
8226+ underline ?: boolean ;
8227+ }
8228+
8229+ export interface SolidBackgroundAttrs {
8230+ color ?: string ;
8231+ }
8232+
8233+ export interface GradientBackgroundAttrs {
8234+ backgroundFormatMidpoint ?: number ;
8235+ colors ?: string [ ] ;
8236+ backgroundFormatRange ?: number [ ] ;
8237+ isAutoScaled ?: boolean ;
8238+ }
8239+
8240+ export interface ConditionalFormattingRow {
8241+ operator : string ;
8242+ value ?: string ;
8243+ rangeValues ?: { min : number ; max : number } ;
8244+ plotAsBand ?: boolean ;
8245+ isHighlightRow ?: boolean ;
8246+ comparisonType ?: 'VALUE_BASED' | 'COLUMN_BASED' | 'PARAMETER_BASED' ;
8247+ lhsColumnId ?: string ;
8248+ columnToCompare ?: string ;
8249+ comparisonParameterId ?: string ;
8250+ fontProperties ?: FontProperties ;
8251+ backgroundFormatType ?: 'SOLID' | 'GRADIENT' ;
8252+ solidBackgroundAttrs ?: SolidBackgroundAttrs ;
8253+ gradientBackgroundAttrs ?: GradientBackgroundAttrs ;
8254+ }
8255+
8256+ export interface ConditionalFormatting {
8257+ rows ?: ConditionalFormattingRow [ ] ;
8258+ }
8259+
8260+ export interface ColorPalette {
8261+ colors ?: string [ ] ;
8262+ }
8263+
8264+ export interface ChartLegend {
8265+ show ?: boolean ;
8266+ position ?: 'top' | 'bottom' | 'left' | 'right' ;
8267+ colorPalette ?: ColorPalette ;
8268+ }
8269+
8270+ export interface DataLabelFilter {
8271+ value ?: number ;
8272+ operator ?: string ;
8273+ }
8274+
8275+ export interface ColumnDataLabel {
8276+ name : string ;
8277+ visible ?: boolean ;
8278+ filter ?: DataLabelFilter | null ;
8279+ }
8280+
8281+ export interface ChartDataLabel {
8282+ allLabels ?: boolean ;
8283+ stackLabels ?: boolean ;
8284+ columnDataLabel ?: ColumnDataLabel [ ] ;
8285+ }
8286+
8287+ export interface ChartSummaries {
8288+ showRowTotals ?: boolean ;
8289+ showColumnTotals ?: boolean ;
8290+ showRowGrandTotals ?: boolean ;
8291+ showColumnGrandTotals ?: boolean ;
8292+ }
8293+
8294+ export interface GridLine {
8295+ x ?: boolean ;
8296+ y ?: boolean ;
8297+ }
8298+
8299+ export interface ChartDisplay {
8300+ summaries ?: ChartSummaries ;
8301+ regressionLine ?: boolean ;
8302+ gridLine ?: GridLine ;
8303+ }
8304+
8305+ export interface YAxisRange {
8306+ min ?: number ;
8307+ max ?: number ;
8308+ }
8309+
8310+ export interface ChartAxis {
8311+ linkedColumns ?: string [ ] ;
8312+ showName ?: boolean ;
8313+ showLabelValue ?: boolean ;
8314+ yAxisRange ?: YAxisRange ;
8315+ }
8316+
8317+ export interface ChartColumn {
8318+ name : string ;
8319+ color ?: string ;
8320+ conditionalFormatting ?: ConditionalFormatting ;
8321+ }
8322+
8323+ export interface ChartOverrides {
8324+ legend ?: ChartLegend ;
8325+ dataLabel ?: ChartDataLabel ;
8326+ display ?: ChartDisplay ;
8327+ axis ?: ChartAxis [ ] ;
8328+ columns ?: ChartColumn [ ] ;
8329+ updateMaskPaths ?: string [ ] ;
8330+ }
8331+
8332+ export interface TableColumn {
8333+ name : string ;
8334+ wrapText ?: boolean ;
8335+ show ?: boolean ;
8336+ conditionalFormatting ?: ConditionalFormatting ;
8337+ }
8338+
8339+ export interface TableDisplay {
8340+ tableTheme ?: string ;
8341+ tableContentDensity ?: string ;
8342+ }
8343+
8344+ export interface ColumnSummaryVisibility {
8345+ columnId : string ;
8346+ visible : boolean ;
8347+ }
8348+
8349+ export interface DisplaySummaryConfig {
8350+ showAllSummaries ?: boolean ;
8351+ columnVisibility ?: ColumnSummaryVisibility [ ] ;
8352+ }
8353+
8354+ export interface TableOverrides {
8355+ columns ?: TableColumn [ ] ;
8356+ display ?: TableDisplay ;
8357+ displaySummaryConfig ?: DisplaySummaryConfig ;
8358+ updateMaskPaths ?: string [ ] ;
8359+ }
8360+
8361+ /**
8362+ * Visual overrides payload to customize chart and table rendering
8363+ * within embedded ThoughtSpot components.
8364+ *
8365+ * @example
8366+ * ```js
8367+ * const embed = new AppEmbed('#tsEmbed', {
8368+ * visualOverrides: {
8369+ * chart: {
8370+ * legend: { show: true, position: 'bottom' },
8371+ * columns: [{ name: 'Revenue', color: '#1f77b4' }],
8372+ * },
8373+ * table: {
8374+ * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
8375+ * },
8376+ * },
8377+ * });
8378+ * ```
8379+ */
8380+ export interface VisualOverridesPayload {
8381+ chart ?: ChartOverrides ;
8382+ table ?: TableOverrides ;
8383+ }
0 commit comments