@i2analyze/notebook-sdk 1.9.0-dev.13 → 1.9.0-dev.14
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.
|
@@ -1096,6 +1096,23 @@ export declare namespace app {
|
|
|
1096
1096
|
* @i2since 1.1
|
|
1097
1097
|
*/
|
|
1098
1098
|
createGeoPoint(data: data.IGeoPointData): data.IGeoPoint;
|
|
1099
|
+
/**
|
|
1100
|
+
* Creates a color range from a configuration that maps brush indices to CSS color strings.
|
|
1101
|
+
*
|
|
1102
|
+
* @remarks
|
|
1103
|
+
* The returned color range resolves colors for any index within the range of the provided keys.
|
|
1104
|
+
* If an index matches a key exactly, its color is returned directly. If an index falls between
|
|
1105
|
+
* two keys, the color is interpolated linearly between the colors of the two nearest keys.
|
|
1106
|
+
*
|
|
1107
|
+
* This supports both discrete and continuous (gradient) color ranges, depending on the
|
|
1108
|
+
* configuration you provide. See {@link visual.ColorRangeConfig} for details.
|
|
1109
|
+
*
|
|
1110
|
+
* @param config - A mapping of brush indices to CSS color strings.
|
|
1111
|
+
* @returns A new color range.
|
|
1112
|
+
* @throws `Error` if the configuration is empty or contains invalid color strings.
|
|
1113
|
+
* @i2since 1.9
|
|
1114
|
+
*/
|
|
1115
|
+
createBrushColorRange(config: visual.ColorRangeConfig): visual.IBrushColorRange;
|
|
1099
1116
|
}
|
|
1100
1117
|
/**
|
|
1101
1118
|
* A set of methods for performing tracked mutations, which require an entry in the undo stack.
|
|
@@ -6510,12 +6527,35 @@ export declare namespace visual {
|
|
|
6510
6527
|
/**
|
|
6511
6528
|
* Returns the CSS color string for the given brush index.
|
|
6512
6529
|
*
|
|
6530
|
+
* @remarks
|
|
6531
|
+
* The behavior of this method depends on the implementation. For color ranges created with
|
|
6532
|
+
* `app.IValueFactory.createBrushColorRange`, if the index matches a key exactly, the corresponding
|
|
6533
|
+
* color is returned; if it falls between two keys, the color is interpolated linearly between
|
|
6534
|
+
* the colors of the two nearest keys; and if it is outside the range of defined keys, an `Error`
|
|
6535
|
+
* is thrown.
|
|
6536
|
+
*
|
|
6513
6537
|
* @param index - The brush index to get the color for.
|
|
6514
6538
|
* @returns A CSS color string (for example, '#FF0000', 'rgb(255, 0, 0)', 'red').
|
|
6515
6539
|
* @i2since 1.9
|
|
6516
6540
|
*/
|
|
6517
6541
|
getColor(index: BrushIndex): string;
|
|
6518
6542
|
}
|
|
6543
|
+
/**
|
|
6544
|
+
* A configuration for creating a color range, specified as a mapping of brush indices to CSS color strings.
|
|
6545
|
+
*
|
|
6546
|
+
* @remarks
|
|
6547
|
+
* The keys are brush indices and the values are CSS color strings. You must provide at least one entry.
|
|
6548
|
+
*
|
|
6549
|
+
* For a **discrete** color range, provide a color for every index you intend to use.
|
|
6550
|
+
* For example, `{ 0: '#FF0000', 1: '#00FF00', 2: '#0000FF' }` maps index 0 to red, 1 to green, and 2 to blue.
|
|
6551
|
+
*
|
|
6552
|
+
* For a **continuous** (gradient) color range, provide colors only at key indices.
|
|
6553
|
+
* For example, `{ 0: '#FF0000', 100: '#0000FF' }` maps index 0 to red and index 100 to blue;
|
|
6554
|
+
* intermediate indices are interpolated linearly between the two colors.
|
|
6555
|
+
*
|
|
6556
|
+
* @i2since 1.9
|
|
6557
|
+
*/
|
|
6558
|
+
export type ColorRangeConfig = Record<BrushIndex, string>;
|
|
6519
6559
|
/**
|
|
6520
6560
|
* A brush set that maps records to brush indices and applies colors based on a color range.
|
|
6521
6561
|
* @i2since 1.9
|