@@ -8126,3 +8126,170 @@ export interface ContextObject {
81268126 objectIds : ObjectIds ;
81278127 }
81288128}
8129+
8130+
8131+ // ─── Visual Overrides ────────────────────────────────────────────────────────
8132+
8133+ export interface FontProperties {
8134+ color ?: string ;
8135+ bold ?: boolean ;
8136+ italic ?: boolean ;
8137+ strikeThrough ?: boolean ;
8138+ underline ?: boolean ;
8139+ }
8140+
8141+ export interface SolidBackgroundAttrs {
8142+ color ?: string ;
8143+ }
8144+
8145+ export interface GradientBackgroundAttrs {
8146+ backgroundFormatMidpoint ?: number ;
8147+ colors ?: string [ ] ;
8148+ backgroundFormatRange ?: number [ ] ;
8149+ isAutoScaled ?: boolean ;
8150+ }
8151+
8152+ export interface ConditionalFormattingRow {
8153+ operator : string ;
8154+ value ?: string ;
8155+ rangeValues ?: { min : number ; max : number } ;
8156+ plotAsBand ?: boolean ;
8157+ isHighlightRow ?: boolean ;
8158+ comparisonType ?: 'VALUE_BASED' | 'COLUMN_BASED' | 'PARAMETER_BASED' ;
8159+ lhsColumnId ?: string ;
8160+ columnToCompare ?: string ;
8161+ comparisonParameterId ?: string ;
8162+ fontProperties ?: FontProperties ;
8163+ backgroundFormatType ?: 'SOLID' | 'GRADIENT' ;
8164+ solidBackgroundAttrs ?: SolidBackgroundAttrs ;
8165+ gradientBackgroundAttrs ?: GradientBackgroundAttrs ;
8166+ }
8167+
8168+ export interface ConditionalFormatting {
8169+ rows ?: ConditionalFormattingRow [ ] ;
8170+ }
8171+
8172+ export interface ColorPalette {
8173+ colors ?: string [ ] ;
8174+ }
8175+
8176+ export interface ChartLegend {
8177+ show ?: boolean ;
8178+ position ?: 'top' | 'bottom' | 'left' | 'right' ;
8179+ colorPalette ?: ColorPalette ;
8180+ }
8181+
8182+ export interface DataLabelFilter {
8183+ value ?: number ;
8184+ operator ?: string ;
8185+ }
8186+
8187+ export interface ColumnDataLabel {
8188+ name : string ;
8189+ visible ?: boolean ;
8190+ filter ?: DataLabelFilter | null ;
8191+ }
8192+
8193+ export interface ChartDataLabel {
8194+ allLabels ?: boolean ;
8195+ stackLabels ?: boolean ;
8196+ columnDataLabel ?: ColumnDataLabel [ ] ;
8197+ }
8198+
8199+ export interface ChartSummaries {
8200+ showRowTotals ?: boolean ;
8201+ showColumnTotals ?: boolean ;
8202+ showRowGrandTotals ?: boolean ;
8203+ showColumnGrandTotals ?: boolean ;
8204+ }
8205+
8206+ export interface GridLine {
8207+ x ?: boolean ;
8208+ y ?: boolean ;
8209+ }
8210+
8211+ export interface ChartDisplay {
8212+ summaries ?: ChartSummaries ;
8213+ regressionLine ?: boolean ;
8214+ gridLine ?: GridLine ;
8215+ }
8216+
8217+ export interface YAxisRange {
8218+ min ?: number ;
8219+ max ?: number ;
8220+ }
8221+
8222+ export interface ChartAxis {
8223+ linkedColumns ?: string [ ] ;
8224+ showName ?: boolean ;
8225+ showLabelValue ?: boolean ;
8226+ yAxisRange ?: YAxisRange ;
8227+ }
8228+
8229+ export interface ChartColumn {
8230+ name : string ;
8231+ color ?: string ;
8232+ conditionalFormatting ?: ConditionalFormatting ;
8233+ }
8234+
8235+ export interface ChartOverrides {
8236+ legend ?: ChartLegend ;
8237+ dataLabel ?: ChartDataLabel ;
8238+ display ?: ChartDisplay ;
8239+ axis ?: ChartAxis [ ] ;
8240+ columns ?: ChartColumn [ ] ;
8241+ updateMaskPaths ?: string [ ] ;
8242+ }
8243+
8244+ export interface TableColumn {
8245+ name : string ;
8246+ wrapText ?: boolean ;
8247+ show ?: boolean ;
8248+ conditionalFormatting ?: ConditionalFormatting ;
8249+ }
8250+
8251+ export interface TableDisplay {
8252+ tableTheme ?: string ;
8253+ tableContentDensity ?: string ;
8254+ }
8255+
8256+ export interface ColumnSummaryVisibility {
8257+ columnId : string ;
8258+ visible : boolean ;
8259+ }
8260+
8261+ export interface DisplaySummaryConfig {
8262+ showAllSummaries ?: boolean ;
8263+ columnVisibility ?: ColumnSummaryVisibility [ ] ;
8264+ }
8265+
8266+ export interface TableOverrides {
8267+ columns ?: TableColumn [ ] ;
8268+ display ?: TableDisplay ;
8269+ displaySummaryConfig ?: DisplaySummaryConfig ;
8270+ updateMaskPaths ?: string [ ] ;
8271+ }
8272+
8273+ /**
8274+ * Visual overrides payload to customize chart and table rendering
8275+ * within embedded ThoughtSpot components.
8276+ *
8277+ * @example
8278+ * ```js
8279+ * const embed = new AppEmbed('#tsEmbed', {
8280+ * visualOverrides: {
8281+ * chart: {
8282+ * legend: { show: true, position: 'bottom' },
8283+ * columns: [{ name: 'Revenue', color: '#1f77b4' }],
8284+ * },
8285+ * table: {
8286+ * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
8287+ * },
8288+ * },
8289+ * });
8290+ * ```
8291+ */
8292+ export interface VisualOverridesPayload {
8293+ chart ?: ChartOverrides ;
8294+ table ?: TableOverrides ;
8295+ }
0 commit comments