@lightdash/common 0.2399.2 → 0.2399.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1434,6 +1434,666 @@
1434
1434
  }
1435
1435
  }
1436
1436
  }
1437
+ },
1438
+ "pieChart": {
1439
+ "type": ["object", "null"],
1440
+ "description": "Configuration for pie and donut charts",
1441
+ "additionalProperties": false,
1442
+ "properties": {
1443
+ "groupFieldIds": {
1444
+ "type": "array",
1445
+ "description": "Field IDs used for grouping/slicing the pie",
1446
+ "items": { "type": "string" }
1447
+ },
1448
+ "metricId": {
1449
+ "type": "string",
1450
+ "description": "Field ID of the metric to display"
1451
+ },
1452
+ "isDonut": {
1453
+ "type": "boolean",
1454
+ "description": "Display as donut chart with hole in center"
1455
+ },
1456
+ "valueLabel": {
1457
+ "type": "string",
1458
+ "enum": ["hidden", "inside", "outside"],
1459
+ "description": "Position of value labels on slices"
1460
+ },
1461
+ "showValue": {
1462
+ "type": "boolean",
1463
+ "description": "Show the actual value on slices"
1464
+ },
1465
+ "showPercentage": {
1466
+ "type": "boolean",
1467
+ "description": "Show percentage on slices"
1468
+ },
1469
+ "groupLabelOverrides": {
1470
+ "type": "object",
1471
+ "description": "Custom labels for each group/slice",
1472
+ "additionalProperties": { "type": "string" }
1473
+ },
1474
+ "groupColorOverrides": {
1475
+ "type": "object",
1476
+ "description": "Custom colors for each group/slice",
1477
+ "additionalProperties": { "type": "string" }
1478
+ },
1479
+ "groupValueOptionOverrides": {
1480
+ "type": "object",
1481
+ "description": "Per-slice value display options",
1482
+ "additionalProperties": {
1483
+ "type": "object",
1484
+ "additionalProperties": false,
1485
+ "properties": {
1486
+ "valueLabel": {
1487
+ "type": "string",
1488
+ "enum": ["hidden", "inside", "outside"]
1489
+ },
1490
+ "showValue": { "type": "boolean" },
1491
+ "showPercentage": { "type": "boolean" }
1492
+ }
1493
+ }
1494
+ },
1495
+ "groupSortOverrides": {
1496
+ "type": "array",
1497
+ "description": "Custom sort order for groups/slices",
1498
+ "items": { "type": "string" }
1499
+ },
1500
+ "showLegend": {
1501
+ "type": "boolean",
1502
+ "description": "Show the chart legend"
1503
+ },
1504
+ "legendPosition": {
1505
+ "type": "string",
1506
+ "enum": ["horizontal", "vertical"],
1507
+ "description": "Legend orientation"
1508
+ },
1509
+ "legendMaxItemLength": {
1510
+ "type": "number",
1511
+ "description": "Maximum character length for legend items"
1512
+ },
1513
+ "metadata": {
1514
+ "type": "object",
1515
+ "description": "Metadata for series (colors, etc.)",
1516
+ "additionalProperties": {
1517
+ "type": "object",
1518
+ "properties": {
1519
+ "color": { "type": "string" }
1520
+ }
1521
+ }
1522
+ }
1523
+ }
1524
+ },
1525
+ "funnelChart": {
1526
+ "type": ["object", "null"],
1527
+ "description": "Configuration for funnel charts",
1528
+ "additionalProperties": false,
1529
+ "properties": {
1530
+ "dataInput": {
1531
+ "type": "string",
1532
+ "enum": ["row", "column"],
1533
+ "description": "How data is structured (row-based or column-based)"
1534
+ },
1535
+ "fieldId": {
1536
+ "type": "string",
1537
+ "description": "Field ID to display in funnel"
1538
+ },
1539
+ "metadata": {
1540
+ "type": "object",
1541
+ "description": "Metadata for series (colors, etc.)",
1542
+ "additionalProperties": {
1543
+ "type": "object",
1544
+ "properties": {
1545
+ "color": { "type": "string" }
1546
+ }
1547
+ }
1548
+ },
1549
+ "labelOverrides": {
1550
+ "type": "object",
1551
+ "description": "Custom labels for funnel stages",
1552
+ "additionalProperties": { "type": "string" }
1553
+ },
1554
+ "colorOverrides": {
1555
+ "type": "object",
1556
+ "description": "Custom colors for funnel stages",
1557
+ "additionalProperties": { "type": "string" }
1558
+ },
1559
+ "labels": {
1560
+ "type": "object",
1561
+ "description": "Label display configuration",
1562
+ "additionalProperties": false,
1563
+ "properties": {
1564
+ "position": {
1565
+ "type": "string",
1566
+ "enum": ["inside", "left", "right", "hidden"],
1567
+ "description": "Position of labels"
1568
+ },
1569
+ "showValue": {
1570
+ "type": "boolean",
1571
+ "description": "Show the actual value"
1572
+ },
1573
+ "showPercentage": {
1574
+ "type": "boolean",
1575
+ "description": "Show percentage"
1576
+ }
1577
+ }
1578
+ },
1579
+ "showLegend": {
1580
+ "type": "boolean",
1581
+ "description": "Show the chart legend"
1582
+ },
1583
+ "legendPosition": {
1584
+ "type": "string",
1585
+ "enum": ["horizontal", "vertical"],
1586
+ "description": "Legend orientation"
1587
+ }
1588
+ }
1589
+ },
1590
+ "bigNumber": {
1591
+ "type": ["object", "null"],
1592
+ "description": "Configuration for big number (single value) displays",
1593
+ "additionalProperties": false,
1594
+ "properties": {
1595
+ "label": {
1596
+ "type": "string",
1597
+ "description": "Custom label for the big number"
1598
+ },
1599
+ "selectedField": {
1600
+ "type": "string",
1601
+ "description": "Field ID to display as the big number"
1602
+ },
1603
+ "style": {
1604
+ "type": "string",
1605
+ "enum": [
1606
+ "thousands",
1607
+ "millions",
1608
+ "billions",
1609
+ "trillions",
1610
+ "K",
1611
+ "M",
1612
+ "B",
1613
+ "T"
1614
+ ],
1615
+ "description": "Number formatting style (compact notation)"
1616
+ },
1617
+ "showBigNumberLabel": {
1618
+ "type": "boolean",
1619
+ "description": "Show the label above the number"
1620
+ },
1621
+ "showTableNamesInLabel": {
1622
+ "type": "boolean",
1623
+ "description": "Include table name in the label"
1624
+ },
1625
+ "showComparison": {
1626
+ "type": "boolean",
1627
+ "description": "Show comparison with previous value"
1628
+ },
1629
+ "comparisonFormat": {
1630
+ "type": "string",
1631
+ "enum": ["raw", "percentage"],
1632
+ "description": "Format for comparison value"
1633
+ },
1634
+ "flipColors": {
1635
+ "type": "boolean",
1636
+ "description": "Flip positive/negative colors (red for increase, green for decrease)"
1637
+ },
1638
+ "comparisonLabel": {
1639
+ "type": "string",
1640
+ "description": "Custom label for the comparison value"
1641
+ }
1642
+ }
1643
+ },
1644
+ "gaugeChart": {
1645
+ "type": ["object", "null"],
1646
+ "description": "Configuration for gauge charts",
1647
+ "additionalProperties": false,
1648
+ "properties": {
1649
+ "selectedField": {
1650
+ "type": "string",
1651
+ "description": "Field ID for the gauge value"
1652
+ },
1653
+ "min": {
1654
+ "type": "number",
1655
+ "description": "Minimum value for the gauge"
1656
+ },
1657
+ "max": {
1658
+ "type": "number",
1659
+ "description": "Maximum value for the gauge"
1660
+ },
1661
+ "maxFieldId": {
1662
+ "type": "string",
1663
+ "description": "Field ID to use as the max value"
1664
+ },
1665
+ "showAxisLabels": {
1666
+ "type": "boolean",
1667
+ "description": "Show min/max labels on the gauge"
1668
+ },
1669
+ "sections": {
1670
+ "type": "array",
1671
+ "description": "Color sections/ranges for the gauge",
1672
+ "items": { "$ref": "#/$defs/gaugeSection" }
1673
+ },
1674
+ "customLabel": {
1675
+ "type": "string",
1676
+ "description": "Custom label for the gauge value"
1677
+ },
1678
+ "showPercentage": {
1679
+ "type": "boolean",
1680
+ "description": "Show value as percentage"
1681
+ },
1682
+ "customPercentageLabel": {
1683
+ "type": "string",
1684
+ "description": "Custom label for the percentage display"
1685
+ }
1686
+ }
1687
+ },
1688
+ "gaugeSection": {
1689
+ "type": "object",
1690
+ "description": "A colored section/range in a gauge chart",
1691
+ "additionalProperties": false,
1692
+ "required": ["min", "max", "color"],
1693
+ "properties": {
1694
+ "min": {
1695
+ "type": "number",
1696
+ "description": "Start value for this section"
1697
+ },
1698
+ "max": {
1699
+ "type": "number",
1700
+ "description": "End value for this section"
1701
+ },
1702
+ "minFieldId": {
1703
+ "type": "string",
1704
+ "description": "Field ID to use as min value"
1705
+ },
1706
+ "maxFieldId": {
1707
+ "type": "string",
1708
+ "description": "Field ID to use as max value"
1709
+ },
1710
+ "color": {
1711
+ "type": "string",
1712
+ "description": "Color for this section (hex code)"
1713
+ }
1714
+ }
1715
+ },
1716
+ "treemapChart": {
1717
+ "type": ["object", "null"],
1718
+ "description": "Configuration for treemap charts",
1719
+ "additionalProperties": false,
1720
+ "properties": {
1721
+ "visibleMin": {
1722
+ "type": "number",
1723
+ "description": "Minimum size for visible nodes"
1724
+ },
1725
+ "leafDepth": {
1726
+ "type": "number",
1727
+ "description": "Depth of leaf nodes to display"
1728
+ },
1729
+ "groupFieldIds": {
1730
+ "type": "array",
1731
+ "description": "Field IDs for hierarchical grouping",
1732
+ "items": { "type": "string" }
1733
+ },
1734
+ "sizeMetricId": {
1735
+ "type": "string",
1736
+ "description": "Field ID for node size"
1737
+ },
1738
+ "colorMetricId": {
1739
+ "type": "string",
1740
+ "description": "Field ID for node color value"
1741
+ },
1742
+ "startColor": {
1743
+ "type": "string",
1744
+ "description": "Start color for color gradient (hex code)"
1745
+ },
1746
+ "endColor": {
1747
+ "type": "string",
1748
+ "description": "End color for color gradient (hex code)"
1749
+ },
1750
+ "useDynamicColors": {
1751
+ "type": "boolean",
1752
+ "description": "Use dynamic color scaling based on values"
1753
+ },
1754
+ "startColorThreshold": {
1755
+ "type": "number",
1756
+ "description": "Value threshold for start color"
1757
+ },
1758
+ "endColorThreshold": {
1759
+ "type": "number",
1760
+ "description": "Value threshold for end color"
1761
+ }
1762
+ }
1763
+ },
1764
+ "customVis": {
1765
+ "type": ["object", "null"],
1766
+ "description": "Configuration for custom visualizations",
1767
+ "additionalProperties": false,
1768
+ "properties": {
1769
+ "spec": {
1770
+ "type": "object",
1771
+ "description": "Custom visualization specification (Vega-Lite or other)"
1772
+ }
1773
+ }
1774
+ },
1775
+ "tableChart": {
1776
+ "type": ["object", "null"],
1777
+ "description": "Configuration for table visualizations",
1778
+ "additionalProperties": false,
1779
+ "properties": {
1780
+ "showColumnCalculation": {
1781
+ "type": "boolean",
1782
+ "description": "Show column totals/calculations"
1783
+ },
1784
+ "showRowCalculation": {
1785
+ "type": "boolean",
1786
+ "description": "Show row totals/calculations"
1787
+ },
1788
+ "showTableNames": {
1789
+ "type": "boolean",
1790
+ "description": "Show table names in column headers"
1791
+ },
1792
+ "hideRowNumbers": {
1793
+ "type": "boolean",
1794
+ "description": "Hide row number column"
1795
+ },
1796
+ "showResultsTotal": {
1797
+ "type": "boolean",
1798
+ "description": "Show total results count"
1799
+ },
1800
+ "showSubtotals": {
1801
+ "type": "boolean",
1802
+ "description": "Show subtotal rows"
1803
+ },
1804
+ "metricsAsRows": {
1805
+ "type": "boolean",
1806
+ "description": "Display metrics as rows instead of columns"
1807
+ },
1808
+ "columns": {
1809
+ "type": "object",
1810
+ "description": "Column-specific configuration",
1811
+ "additionalProperties": {
1812
+ "$ref": "#/$defs/columnProperties"
1813
+ }
1814
+ },
1815
+ "conditionalFormattings": {
1816
+ "type": "array",
1817
+ "description": "Conditional formatting rules",
1818
+ "items": { "$ref": "#/$defs/conditionalFormattingConfig" }
1819
+ }
1820
+ }
1821
+ },
1822
+ "columnProperties": {
1823
+ "type": "object",
1824
+ "description": "Configuration for a table column",
1825
+ "additionalProperties": false,
1826
+ "properties": {
1827
+ "visible": {
1828
+ "type": "boolean",
1829
+ "description": "Whether the column is visible"
1830
+ },
1831
+ "name": {
1832
+ "type": "string",
1833
+ "description": "Custom display name for the column"
1834
+ },
1835
+ "frozen": {
1836
+ "type": "boolean",
1837
+ "description": "Freeze the column (stick to left side)"
1838
+ },
1839
+ "displayStyle": {
1840
+ "type": "string",
1841
+ "enum": ["text", "bar"],
1842
+ "description": "How to display the cell value"
1843
+ },
1844
+ "color": {
1845
+ "type": "string",
1846
+ "description": "Color for bar display style (hex code)"
1847
+ }
1848
+ }
1849
+ },
1850
+ "conditionalFormattingConfig": {
1851
+ "type": "object",
1852
+ "description": "Conditional formatting rule configuration",
1853
+ "additionalProperties": false,
1854
+ "properties": {
1855
+ "target": {
1856
+ "type": ["object", "null"],
1857
+ "description": "Target field for the formatting rule",
1858
+ "additionalProperties": false,
1859
+ "properties": {
1860
+ "fieldId": {
1861
+ "type": "string",
1862
+ "description": "Field ID to apply formatting to"
1863
+ }
1864
+ }
1865
+ },
1866
+ "color": {
1867
+ "description": "Color for formatting (string for single color, object for range)",
1868
+ "oneOf": [
1869
+ { "type": "string" },
1870
+ {
1871
+ "type": "object",
1872
+ "additionalProperties": false,
1873
+ "properties": {
1874
+ "start": {
1875
+ "type": "string",
1876
+ "description": "Start color for gradient"
1877
+ },
1878
+ "end": {
1879
+ "type": "string",
1880
+ "description": "End color for gradient"
1881
+ }
1882
+ }
1883
+ }
1884
+ ]
1885
+ },
1886
+ "rules": {
1887
+ "type": "array",
1888
+ "description": "Rules for single-color conditional formatting",
1889
+ "items": { "$ref": "#/$defs/conditionalFormattingRule" }
1890
+ },
1891
+ "rule": {
1892
+ "type": "object",
1893
+ "description": "Rule for color range formatting",
1894
+ "additionalProperties": false,
1895
+ "properties": {
1896
+ "min": {
1897
+ "description": "Minimum value (number or 'auto')"
1898
+ },
1899
+ "max": {
1900
+ "description": "Maximum value (number or 'auto')"
1901
+ }
1902
+ }
1903
+ },
1904
+ "applyTo": {
1905
+ "type": "string",
1906
+ "enum": ["cell", "text"],
1907
+ "description": "Apply formatting to cell background or text"
1908
+ }
1909
+ }
1910
+ },
1911
+ "conditionalFormattingRule": {
1912
+ "type": "object",
1913
+ "description": "A single conditional formatting rule",
1914
+ "additionalProperties": false,
1915
+ "properties": {
1916
+ "id": {
1917
+ "type": "string",
1918
+ "description": "Unique identifier for the rule"
1919
+ },
1920
+ "operator": {
1921
+ "type": "string",
1922
+ "description": "Comparison operator",
1923
+ "enum": [
1924
+ "isNull",
1925
+ "notNull",
1926
+ "equals",
1927
+ "notEquals",
1928
+ "startsWith",
1929
+ "endsWith",
1930
+ "include",
1931
+ "doesNotInclude",
1932
+ "lessThan",
1933
+ "lessThanOrEqual",
1934
+ "greaterThan",
1935
+ "greaterThanOrEqual",
1936
+ "inThePast",
1937
+ "notInThePast",
1938
+ "inTheNext",
1939
+ "inTheCurrent",
1940
+ "notInTheCurrent",
1941
+ "inBetween",
1942
+ "notInBetween"
1943
+ ]
1944
+ },
1945
+ "values": {
1946
+ "type": "array",
1947
+ "description": "Values to compare against"
1948
+ },
1949
+ "compareTarget": {
1950
+ "type": ["object", "null"],
1951
+ "description": "Target field to compare against",
1952
+ "additionalProperties": false,
1953
+ "properties": {
1954
+ "fieldId": {
1955
+ "type": "string",
1956
+ "description": "Field ID to compare against"
1957
+ }
1958
+ }
1959
+ }
1960
+ }
1961
+ },
1962
+ "mapChart": {
1963
+ "type": ["object", "null"],
1964
+ "description": "Configuration for map visualizations",
1965
+ "additionalProperties": false,
1966
+ "properties": {
1967
+ "mapType": {
1968
+ "type": "string",
1969
+ "enum": ["USA", "world", "europe", "custom"],
1970
+ "description": "Type of map to display"
1971
+ },
1972
+ "locationType": {
1973
+ "type": "string",
1974
+ "enum": ["scatter", "area", "heatmap"],
1975
+ "description": "How to display location data"
1976
+ },
1977
+ "tileBackground": {
1978
+ "type": "string",
1979
+ "enum": [
1980
+ "none",
1981
+ "openstreetmap",
1982
+ "light",
1983
+ "dark",
1984
+ "satellite"
1985
+ ],
1986
+ "description": "Map tile background style"
1987
+ },
1988
+ "customGeoJsonUrl": {
1989
+ "type": "string",
1990
+ "description": "URL to custom GeoJSON file"
1991
+ },
1992
+ "geoJsonPropertyKey": {
1993
+ "type": "string",
1994
+ "description": "Property key in GeoJSON to match against data"
1995
+ },
1996
+ "backgroundColor": {
1997
+ "type": "string",
1998
+ "description": "Background color for the map (hex code)"
1999
+ },
2000
+ "noDataColor": {
2001
+ "type": "string",
2002
+ "description": "Color for regions with no data (hex code)"
2003
+ },
2004
+ "latitudeFieldId": {
2005
+ "type": "string",
2006
+ "description": "Field ID for latitude values"
2007
+ },
2008
+ "longitudeFieldId": {
2009
+ "type": "string",
2010
+ "description": "Field ID for longitude values"
2011
+ },
2012
+ "locationFieldId": {
2013
+ "type": "string",
2014
+ "description": "Field ID for location/region names (area maps)"
2015
+ },
2016
+ "valueFieldId": {
2017
+ "type": "string",
2018
+ "description": "Field ID for the value to display"
2019
+ },
2020
+ "sizeFieldId": {
2021
+ "type": "string",
2022
+ "description": "Field ID for bubble size (scatter maps)"
2023
+ },
2024
+ "showLegend": {
2025
+ "type": "boolean",
2026
+ "description": "Show the map legend"
2027
+ },
2028
+ "saveMapExtent": {
2029
+ "type": "boolean",
2030
+ "description": "Save the current map zoom/position"
2031
+ },
2032
+ "colorRange": {
2033
+ "type": "array",
2034
+ "description": "Array of colors for the value gradient",
2035
+ "items": { "type": "string" }
2036
+ },
2037
+ "defaultZoom": {
2038
+ "type": "number",
2039
+ "description": "Default zoom level"
2040
+ },
2041
+ "defaultCenterLat": {
2042
+ "type": "number",
2043
+ "description": "Default center latitude"
2044
+ },
2045
+ "defaultCenterLon": {
2046
+ "type": "number",
2047
+ "description": "Default center longitude"
2048
+ },
2049
+ "minBubbleSize": {
2050
+ "type": "number",
2051
+ "description": "Minimum bubble size for scatter maps"
2052
+ },
2053
+ "maxBubbleSize": {
2054
+ "type": "number",
2055
+ "description": "Maximum bubble size for scatter maps"
2056
+ },
2057
+ "heatmapConfig": {
2058
+ "type": "object",
2059
+ "description": "Configuration for heatmap visualization",
2060
+ "additionalProperties": false,
2061
+ "properties": {
2062
+ "radius": {
2063
+ "type": "number",
2064
+ "description": "Radius of heat points"
2065
+ },
2066
+ "blur": {
2067
+ "type": "number",
2068
+ "description": "Blur amount for heat points"
2069
+ },
2070
+ "opacity": {
2071
+ "type": "number",
2072
+ "description": "Opacity of the heatmap layer"
2073
+ }
2074
+ }
2075
+ },
2076
+ "fieldConfig": {
2077
+ "type": "object",
2078
+ "description": "Field-specific configuration for tooltips",
2079
+ "additionalProperties": { "$ref": "#/$defs/mapFieldConfig" }
2080
+ }
2081
+ }
2082
+ },
2083
+ "mapFieldConfig": {
2084
+ "type": "object",
2085
+ "description": "Configuration for a field in map tooltips",
2086
+ "additionalProperties": false,
2087
+ "properties": {
2088
+ "visible": {
2089
+ "type": "boolean",
2090
+ "description": "Whether to show this field in tooltips"
2091
+ },
2092
+ "label": {
2093
+ "type": "string",
2094
+ "description": "Custom label for the field"
2095
+ }
2096
+ }
1437
2097
  }
1438
2098
  }
1439
2099
  }