tickup 1.0.0
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.
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/branding/TickUpAttribution.d.ts +11 -0
- package/dist/branding/TickUpMark.d.ts +15 -0
- package/dist/branding/tickupBrandAssets.d.ts +12 -0
- package/dist/branding/tickupWatermark.d.ts +28 -0
- package/dist/components/Canvas/Axes/XAxis.d.ts +18 -0
- package/dist/components/Canvas/Axes/YAxis.d.ts +12 -0
- package/dist/components/Canvas/ChartCanvas.d.ts +40 -0
- package/dist/components/Canvas/ChartStage.d.ts +5 -0
- package/dist/components/Canvas/TickUpStage.d.ts +122 -0
- package/dist/components/Canvas/utils/GraphDraw.d.ts +13 -0
- package/dist/components/Canvas/utils/GraphHelpers.d.ts +60 -0
- package/dist/components/Canvas/utils/drawDrawings.d.ts +4 -0
- package/dist/components/Canvas/utils/drawOverlay.d.ts +44 -0
- package/dist/components/Canvas/utils/formatters.d.ts +34 -0
- package/dist/components/Canvas/utils/generateTicks.d.ts +9 -0
- package/dist/components/Canvas/utils/helpers.d.ts +6 -0
- package/dist/components/Common/AlertModal.d.ts +13 -0
- package/dist/components/Common/AlertModal.styles.d.ts +13 -0
- package/dist/components/DefaultData.d.ts +3 -0
- package/dist/components/Drawing/AngleShape.d.ts +37 -0
- package/dist/components/Drawing/ArrowShape.d.ts +32 -0
- package/dist/components/Drawing/CircleShape.d.ts +29 -0
- package/dist/components/Drawing/CustomSymbolShape.d.ts +31 -0
- package/dist/components/Drawing/IDrawingShape.d.ts +32 -0
- package/dist/components/Drawing/LineShape.d.ts +29 -0
- package/dist/components/Drawing/Polyline.d.ts +29 -0
- package/dist/components/Drawing/RectangleShape.d.ts +29 -0
- package/dist/components/Drawing/TriangleShape.d.ts +34 -0
- package/dist/components/Drawing/drawHelper.d.ts +35 -0
- package/dist/components/Drawing/drawingQuery.d.ts +44 -0
- package/dist/components/Drawing/types.d.ts +21 -0
- package/dist/components/SettingsModal/SettingsModal.d.ts +73 -0
- package/dist/components/SettingsModal/SettingsModal.styles.d.ts +62 -0
- package/dist/components/ShapePropertiesModal/ShapePropertiesModal.d.ts +13 -0
- package/dist/components/ShapePropertiesModal/applyShapeProperties.d.ts +16 -0
- package/dist/components/TickUpHost.d.ts +162 -0
- package/dist/components/TickUpProducts.d.ts +23 -0
- package/dist/components/Toolbar/Buttons.d.ts +4 -0
- package/dist/components/Toolbar/ChartTypeSelectDropdown.d.ts +9 -0
- package/dist/components/Toolbar/IntervalSelect.d.ts +15 -0
- package/dist/components/Toolbar/RangeSelector.d.ts +9 -0
- package/dist/components/Toolbar/SettingsToolbar.d.ts +50 -0
- package/dist/components/Toolbar/Toolbar.d.ts +10 -0
- package/dist/components/Toolbar/icons.d.ts +79 -0
- package/dist/components/Tooltip.d.ts +17 -0
- package/dist/contexts/ModeContext.d.ts +24 -0
- package/dist/engines/TickUpEngine.d.ts +12 -0
- package/dist/engines/prime/PrimeRenderer.d.ts +4 -0
- package/dist/engines/prime/TickUpPrime.d.ts +15 -0
- package/dist/full.d.ts +71 -0
- package/dist/hooks/useChartData.d.ts +15 -0
- package/dist/hooks/useElementSize.d.ts +13 -0
- package/dist/hooks/usePanAndZoom.d.ts +12 -0
- package/dist/index.d.ts +47 -0
- package/dist/main.d.ts +1 -0
- package/dist/services/FormattingService.d.ts +36 -0
- package/dist/styles/App.styles.d.ts +11 -0
- package/dist/styles/ChartCanvas.styles.d.ts +26 -0
- package/dist/styles/ChartTypeSelectDropdown.styles.d.ts +13 -0
- package/dist/styles/IntervalSelect.styles.d.ts +25 -0
- package/dist/styles/RangeSelector.styles.d.ts +10 -0
- package/dist/styles/SettingsToolbar.styles.d.ts +19 -0
- package/dist/styles/TickUpStage.styles.d.ts +31 -0
- package/dist/styles/Toolbar.styles.d.ts +12 -0
- package/dist/styles/Tooltip.styles.d.ts +22 -0
- package/dist/styles/XAxis.styles.d.ts +5 -0
- package/dist/styles/YAxis.styles.d.ts +6 -0
- package/dist/test-utils/assetUrlStub.d.ts +3 -0
- package/dist/test-utils/svgRawStub.d.ts +3 -0
- package/dist/tickup-full.cjs.js +1417 -0
- package/dist/tickup-full.es.js +6699 -0
- package/dist/tickup-icon.svg +5 -0
- package/dist/tickup.cjs.js +1417 -0
- package/dist/tickup.es.js +6427 -0
- package/dist/types/Drawings.d.ts +54 -0
- package/dist/types/Graph.d.ts +45 -0
- package/dist/types/Interval.d.ts +11 -0
- package/dist/types/buttons.d.ts +30 -0
- package/dist/types/chartContext.d.ts +52 -0
- package/dist/types/chartOptions.d.ts +161 -0
- package/dist/types/liveData.d.ts +14 -0
- package/dist/types/overlay.d.ts +64 -0
- package/dist/types/tickupProducts.d.ts +18 -0
- package/dist/types/types.d.ts +36 -0
- package/dist/utils/LocaleResolver.d.ts +15 -0
- package/dist/utils/captureChartRegion.d.ts +34 -0
- package/dist/utils/deepEqual.d.ts +1 -0
- package/dist/utils/deepMerge.d.ts +2 -0
- package/dist/utils/i18n.d.ts +26 -0
- package/dist/utils/liveDataMerge.d.ts +21 -0
- package/dist/utils/marketData.d.ts +8 -0
- package/dist/utils/timeUtils.d.ts +9 -0
- package/dist/vite.svg +1 -0
- package/documentation/01-glossary.md +61 -0
- package/documentation/01-introduction.md +7 -0
- package/documentation/02-installation.md +48 -0
- package/documentation/03-quick-start.md +86 -0
- package/documentation/04-products-and-layout.md +51 -0
- package/documentation/05-props-and-chart-options.md +109 -0
- package/documentation/06-imperative-api.md +117 -0
- package/documentation/07-data-and-live-updates.md +62 -0
- package/documentation/08-drawings-and-shapes.md +132 -0
- package/documentation/09-settings-modal.md +37 -0
- package/documentation/10-toolbar-and-interactions.md +85 -0
- package/documentation/11-exports-and-advanced.md +142 -0
- package/documentation/12-overlays-and-indicators.md +65 -0
- package/documentation/13-internationalization-and-axes.md +56 -0
- package/documentation/14-legal-and-policies.md +32 -0
- package/documentation/README.md +33 -0
- package/legal/ACCEPTABLE_USE_POLICY.md +79 -0
- package/legal/PRIVACY_POLICY.md +131 -0
- package/legal/README.md +21 -0
- package/legal/TERMS_OF_SERVICE.md +153 -0
- package/package.json +98 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Drawings & shapes
|
|
2
|
+
|
|
3
|
+
## Supported shape types (`ShapeType`)
|
|
4
|
+
|
|
5
|
+
| Type | Points / usage |
|
|
6
|
+
|------|----------------|
|
|
7
|
+
| **Line** | 2 points: start and end (time/price). |
|
|
8
|
+
| **Rectangle** | 2 corners (diagonal). |
|
|
9
|
+
| **Circle** | 2 points: center and rim (or bounding logic per implementation). |
|
|
10
|
+
| **Triangle** | 3 vertices (polyline workflow may add progressively). |
|
|
11
|
+
| **Angle** | Vertex + two rays (two-phase placement in UI). |
|
|
12
|
+
| **Arrow** | 2 points: tail and head. |
|
|
13
|
+
| **Polyline** | Multiple vertices; double-click to finish in UI. |
|
|
14
|
+
| **CustomSymbol** | 1 anchor point + `symbol` string + `size`. |
|
|
15
|
+
|
|
16
|
+
## Toolbar (Command / Desk / custom host with sidebar)
|
|
17
|
+
|
|
18
|
+
The visible **sidebar** exposes these tools only:
|
|
19
|
+
|
|
20
|
+
| Tool | Mode |
|
|
21
|
+
|------|------|
|
|
22
|
+
| Line | `drawLine` |
|
|
23
|
+
| Rectangle | `drawRectangle` |
|
|
24
|
+
| Circle | `drawCircle` |
|
|
25
|
+
| Triangle | `drawTriangle` |
|
|
26
|
+
| Angle | `drawAngle` |
|
|
27
|
+
| Select | `select` |
|
|
28
|
+
| Edit | `editShape` |
|
|
29
|
+
|
|
30
|
+
**Not on the toolbar** (but fully supported via **code**): **Arrow**, **Polyline**, **Custom symbol** (`ShapeType.Arrow` / `Polyline` / `CustomSymbol`). Use `addShape` / `DrawingSpec` for those.
|
|
31
|
+
|
|
32
|
+
The enum also includes **`Mode.drawText`** for future use; there is no text drawing tool in the default toolbar today.
|
|
33
|
+
|
|
34
|
+
Click the active tool again to return to default navigation (`Mode.none`).
|
|
35
|
+
|
|
36
|
+
### Creating shapes with the mouse
|
|
37
|
+
|
|
38
|
+
1. Choose a draw tool.
|
|
39
|
+
2. Click (and drag or multi-click per tool) on the plot.
|
|
40
|
+
3. Shapes commit when enough points are placed (tool-specific).
|
|
41
|
+
|
|
42
|
+
**Polyline** (programmatic / custom UI only in the default product): add vertices with clicks; **double-click** finishes the path. **Angle** uses a two-step flow (first ray, then second ray) before committing.
|
|
43
|
+
|
|
44
|
+
### Select & edit
|
|
45
|
+
|
|
46
|
+
- **Select** — Click a shape to highlight (top-most hit wins).
|
|
47
|
+
- **Edit** — Adjust handles where implemented.
|
|
48
|
+
- **Double-click** a shape (in select/navigation modes) or **right‑click** a **selected** shape to open **Shape properties** — modal fields include line color/width/style, fill, selection styling, and for custom symbols: text + size (`ShapePropertiesFormState`).
|
|
49
|
+
|
|
50
|
+
The shell uses the exported **`ShapePropertiesModal`** component wired to `onRequestShapeProperties` on the canvas; you can reuse it in custom hosts.
|
|
51
|
+
|
|
52
|
+
size?: number;
|
|
53
|
+
};
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Minimum points per type are enforced in `drawingFromSpec` (e.g. 2 for line/rect/circle/arrow).
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
chartRef.current?.addShape({
|
|
60
|
+
type: ShapeType.Rectangle,
|
|
61
|
+
points: [{ time: t0, price: p0 }, { time: t1, price: p1 }],
|
|
62
|
+
style: { lineColor: '#0af', fillColor: 'rgba(0,170,255,0.15)' },
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Programmatic tools & drawing by code
|
|
67
|
+
|
|
68
|
+
You can trigger any drawing tool programmatically (as if the user clicked the toolbar) using **`setInteractionMode(Mode)`**:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { Mode } from 'tickup/full';
|
|
72
|
+
|
|
73
|
+
// Start the rectangle tool
|
|
74
|
+
chartRef.current?.setInteractionMode(Mode.drawRectangle);
|
|
75
|
+
|
|
76
|
+
// Cancel/return to navigation
|
|
77
|
+
chartRef.current?.setInteractionMode(Mode.none);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Direct insertion
|
|
81
|
+
Use **`addShape(DrawingSpec)`** to instantly place a shape on the chart without user interaction (e.g., loading saved annotations).
|
|
82
|
+
|
|
83
|
+
## Programmatic selection and management
|
|
84
|
+
|
|
85
|
+
In addition to UI interaction, you can fully control the selection state via the API:
|
|
86
|
+
|
|
87
|
+
* **`selectShape(id)`**: Highlights and selects a specific drawing by its ID.
|
|
88
|
+
* **`unselectShape()`**: Clears the current selection.
|
|
89
|
+
* **`getSelectedDrawing()`**: Returns the plain data snapshot of the currently active drawing (or `null`).
|
|
90
|
+
* **`getSelectedDrawingId()`**: Returns the ID of the selected drawing.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
const selected = chartRef.current?.getSelectedDrawing();
|
|
94
|
+
if (selected) {
|
|
95
|
+
console.log("Editing shape of type:", selected.type);
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Programmatic updates \& deletion
|
|
100
|
+
|
|
101
|
+
### Specific shape (by ID)
|
|
102
|
+
* **`updateShape(id, data)`**: Full replacement.
|
|
103
|
+
* **`patchShape(id, patch)`**: Partial property update (color, width, points).
|
|
104
|
+
* **`deleteShape(id)`**: Remove the shape.
|
|
105
|
+
|
|
106
|
+
### Selection-centric (Convenience)
|
|
107
|
+
* **`updateSelectedShape(patch)`**: Updates the properties of whichever shape is currently selected.
|
|
108
|
+
* **`deleteSelectedDrawing()`**: Removes the current selection from the chart.
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
// Force the selected shape to be red
|
|
112
|
+
chartRef.current?.updateSelectedShape({
|
|
113
|
+
style: { lineColor: '#ff0000' }
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Bulk replace
|
|
118
|
+
|
|
119
|
+
`setDrawingsFromSpecs(specs: DrawingSpec[])` rebuilds the entire overlay stack from JSON-friendly specs (e.g. after loading a layout from your server).
|
|
120
|
+
|
|
121
|
+
## Query & persistence
|
|
122
|
+
|
|
123
|
+
- `getDrawings(query?)` — Filter by `types`, `ids`, `idPrefix`, time/price bounds, or custom `predicate`.
|
|
124
|
+
- `shapeToSnapshot` / `queryDrawingsToSnapshots` — Export plain objects for storage.
|
|
125
|
+
|
|
126
|
+
## Coordinate space
|
|
127
|
+
|
|
128
|
+
`DrawingPoint` uses **time** (unix seconds) and **price** (Y value), not pixels. The canvas maps these using the current visible ranges.
|
|
129
|
+
|
|
130
|
+
## Shape properties UI
|
|
131
|
+
|
|
132
|
+
`ShapePropertiesModal` is exported for advanced hosts who want to embed the same form outside the default flow. The shell wires it from the chart when editing.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Settings modal
|
|
2
|
+
|
|
3
|
+
The gear icon in the top toolbar (when enabled) opens the **Chart Settings** modal. Values apply to the current chart instance and merge into internal `chartOptions` state on **Save**.
|
|
4
|
+
|
|
5
|
+
**Shell theme:** modal framing and surfaces follow **`TickUpHost`** **`themeVariant`** (controlled) or **`defaultThemeVariant`** (uncontrolled), the same as **`GlobalStyle`** — see [Props & chart options](./05-props-and-chart-options.md). Changing colors inside the modal affects **`chartOptions`**, not the outer app theme unless you also update props.
|
|
6
|
+
|
|
7
|
+
## Categories
|
|
8
|
+
|
|
9
|
+
| Category | What users can change |
|
|
10
|
+
|----------|------------------------|
|
|
11
|
+
| **Chart Style** | Histogram on/off, grid on/off, **hover**: candle tooltip, crosshair lines, crosshair time & price labels |
|
|
12
|
+
| **Axes** | Y-axis side (left/right), number of Y ticks |
|
|
13
|
+
| **Time** | 12-hour vs 24-hour time display |
|
|
14
|
+
| **Layout** | Show side toolbar, show top bar (hidden when product chrome is **locked** by `productId`) |
|
|
15
|
+
| **Colors** | Background, axis text, bull/bear (and related histogram/bar colors), line chart color |
|
|
16
|
+
| **Drawing shapes** | Default line/fill/selection styles for new drawings |
|
|
17
|
+
| **Regional** | Locale, language (with sensible defaults linkage) |
|
|
18
|
+
| **Financial** | Currency code, use-currency toggle, currency display mode, number notation, tick size, min/max fraction & significant digits, auto precision, unit + placement |
|
|
19
|
+
|
|
20
|
+
## Locked layout (product tiers)
|
|
21
|
+
|
|
22
|
+
For `TickUpPulse`, `TickUpFlow`, `TickUpCommand`, and `TickUpDesk`, toolbar visibility is fixed by the product. The Layout section either hides the toggles or explains that chrome is product-controlled (`lockToolbarLayout` on the modal).
|
|
23
|
+
|
|
24
|
+
## Persistence
|
|
25
|
+
|
|
26
|
+
The modal does **not** persist to `localStorage` by default. The host app can:
|
|
27
|
+
|
|
28
|
+
- Read merged options from `getChartContext()` / custom hooks, or
|
|
29
|
+
- Re-hydrate `chartOptions` prop on next mount from your own store.
|
|
30
|
+
|
|
31
|
+
## Related options in code
|
|
32
|
+
|
|
33
|
+
Several toggles map to `chartOptions.base` and `base.style`:
|
|
34
|
+
|
|
35
|
+
- `showCandleTooltip`, `showCrosshair`, `showCrosshairValues`
|
|
36
|
+
- `showHistogram`, `showGrid`
|
|
37
|
+
- Axes, colors, drawings defaults as described in [Props & chart options](./05-props-and-chart-options.md).
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Toolbar & interactions
|
|
2
|
+
|
|
3
|
+
## Compact symbol strip (no top bar)
|
|
4
|
+
|
|
5
|
+
When **`showTopBar`** is **`false`**, there is no symbol text field in the toolbar. If the host passes a non-empty **`symbol`** (after trim) or, when `symbol` is omitted, a non-empty **`defaultSymbol`**, the stage renders a **single read-only row** above the plot showing that ticker. Styling follows **`chartOptions.base.style.axes`** (font, text color, line color for a bottom border) and **`base.style.backgroundColor`**.
|
|
6
|
+
|
|
7
|
+
- Used automatically by **`TickUpPulse`** when you set `symbol` / `defaultSymbol`.
|
|
8
|
+
- Same behavior for **`TickUpHost`** / **`TickUpStage`** with `showTopBar={false}`.
|
|
9
|
+
|
|
10
|
+
If the resolved string is empty, no strip is shown (minimal embed stays plot + axes only).
|
|
11
|
+
|
|
12
|
+
## Floating settings (no top bar)
|
|
13
|
+
|
|
14
|
+
If the stage is configured with **`showTopBar: false`** and **`showSettingsBar: true`**, a **floating gear** appears over the plot area (position depends on Y-axis side) to open the same settings modal. **Pulse** keeps **`showSettingsBar` false**, so there is no gear unless you use a custom host layout.
|
|
15
|
+
|
|
16
|
+
## Top bar (Flow, Command, Desk)
|
|
17
|
+
|
|
18
|
+
Typical controls (some may hide on very narrow widths):
|
|
19
|
+
|
|
20
|
+
| Control | Action |
|
|
21
|
+
|---------|--------|
|
|
22
|
+
| **Symbol** field | Edit ticker; Enter / search button triggers `onSymbolSearch` if provided. |
|
|
23
|
+
| **Search** | Focus/select symbol or run `onSymbolSearch`. If the handler returns **`false`** or a **rejected Promise**, the field reverts to the last good symbol and `onSymbolChange` runs with that value (see [Props & chart options](./05-props-and-chart-options.md)). |
|
|
24
|
+
| **Interval** selector | Searchable, categorized dropdown (Minutes, Hours, Days, etc.). Triggers `onIntervalSearch` if provided. |
|
|
25
|
+
| **Chart type** | Dropdown: Candlestick, Line, Area, Bar (menu is portaled for correct hit-testing). |
|
|
26
|
+
| **Settings** | Opens [settings modal](./09-settings-modal.md). |
|
|
27
|
+
| **Snapshot** | Captures chart region or main canvas to PNG (implementation may use `captureChartRegionToPngDataUrl`). |
|
|
28
|
+
| **Range** | `fitVisibleRangeToData`. |
|
|
29
|
+
| **Export** | CSV download of series. |
|
|
30
|
+
| **Refresh** | `onRefreshRequest` callback. |
|
|
31
|
+
| **Theme** | Toggles **shell** light/dark (**`GlobalStyle`**, settings modal chrome). Notify the app via **`onThemeVariantChange`** on **`TickUpHost`**; keep **`themeVariant`** controlled in sync. Plot styling still follows **`chartOptions`** — align **`base.theme`** (and use **`getTickUpPrimeThemePatch`** / **`createTickUpPrimeEngine`** for Prime) so grid, axes, and watermarks match. See [Props & chart options](./05-props-and-chart-options.md) and [Prime engine](https://github.com/BARDAMRI/tickup-prime/blob/main/documentation/15-prime-engine-and-pro-roadmap.md). |
|
|
32
|
+
|
|
33
|
+
## Interval selection & search flow
|
|
34
|
+
|
|
35
|
+
The top bar features a searchable **Interval Selection Dropdown** that handles a large variety of timeframes categorized by duration (Short-term Intraday to Long-term Monthly).
|
|
36
|
+
|
|
37
|
+
### `onIntervalSearch` (Async Data-Feed Replacement)
|
|
38
|
+
|
|
39
|
+
When the user selects a new interval from the dropdown:
|
|
40
|
+
|
|
41
|
+
1. The chart enters a **searching state**.
|
|
42
|
+
2. If provided, the **`onIntervalSearch(newTf)`** handler is invoked.
|
|
43
|
+
3. The handler can perform asynchronous operations (e.g., fetching new historical data for the requested timeframe).
|
|
44
|
+
4. **Success**: If the handler returns `true` (or a Promise resolving to `true`), the UI commits to the new interval.
|
|
45
|
+
5. **Failure/Revert**: If the handler returns `false` or rejects, the UI **reverts** to the previous "committed" interval automatically, preventing the user from being stuck on an invalid data state.
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<TickUpHost
|
|
49
|
+
onIntervalSearch={async (tf) => {
|
|
50
|
+
try {
|
|
51
|
+
await myDataFeed.switchTo(tf);
|
|
52
|
+
return true; // Commit the UI change
|
|
53
|
+
} catch (e) {
|
|
54
|
+
showErrorToast(`Failed to load ${tf}`);
|
|
55
|
+
return false; // Revert the UI to the old timeframe
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Pan & zoom
|
|
62
|
+
|
|
63
|
+
With default mode (no draw tool active), wheel and drag behaviors follow the chart stage configuration (pan/zoom on the main plot). **Select** and **edit** modes use a **default** cursor and intentionally **do not** pan on drag so clicks hit-test shapes. Drawing modes use crosshair/drag semantics appropriate to the tool.
|
|
64
|
+
|
|
65
|
+
## Crosshair & tooltip
|
|
66
|
+
|
|
67
|
+
When enabled in options or settings:
|
|
68
|
+
|
|
69
|
+
- **Crosshair** — Vertical and horizontal lines following the pointer.
|
|
70
|
+
- **Crosshair values** — Time label near the bottom track, price label near the Y-axis side.
|
|
71
|
+
- **Candle tooltip** — Compact OHLC / change / volume panel (grid layout on small charts; scrollable cap).
|
|
72
|
+
|
|
73
|
+
Branding: low-opacity **TickUp watermark** (bundled **transparent** PNGs; strength depends on plot **`base.theme`**) is drawn inside the plot/histogram buffers (not a separate footer), unless disabled via **`showAttribution`** (**Desk** forces on).
|
|
74
|
+
|
|
75
|
+
## Keyboard
|
|
76
|
+
|
|
77
|
+
- **Escape** — Clears in-progress polyline points, exits active draw tools (except select/edit), and returns toward neutral navigation.
|
|
78
|
+
|
|
79
|
+
## Canvas stack (conceptual)
|
|
80
|
+
|
|
81
|
+
From back to front: main OHLC (and grid, session shading, watermark), optional histogram, persistent drawings layer, interaction/hover/crosshair layer. Histogram opacity and height ratio come from `chartOptions.base.style.histogram`.
|
|
82
|
+
|
|
83
|
+
## Copy
|
|
84
|
+
|
|
85
|
+
Selected axis or formatted numbers may normalize to clipboard-friendly representation when copying from the app (formatting service integration).
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Public exports & advanced topics
|
|
2
|
+
|
|
3
|
+
Published API is split across **`tickup`** (default) and **`tickup/full`**. Symbols not listed here are **internal** (not semver-stable as public API).
|
|
4
|
+
|
|
5
|
+
## `tickup` (default — basic charts)
|
|
6
|
+
|
|
7
|
+
| Export | Role |
|
|
8
|
+
|--------|------|
|
|
9
|
+
| `TickUpStage` | Chart + axes + toolbars (when enabled via props) + optional **compact symbol strip** when `showTopBar` is false and `symbol` / `defaultSymbol` is set + imperative handle. |
|
|
10
|
+
| `TickUpMark` | DOM wordmark; **`TickUpThemeVariant`**: `light` \| `dark` \| `grey` — uses bundled **transparent** PNGs per variant. |
|
|
11
|
+
| `TickUpAttribution` | DOM attribution strip (wordmark + legal line); theme follows props. |
|
|
12
|
+
| `GlobalStyle` | Styled global CSS fragment (optional for hosts). |
|
|
13
|
+
| `ModeProvider`, `useMode` | Drawing mode context. |
|
|
14
|
+
| `ChartOptions`, `DeepRequired` | Configuration typing helpers. |
|
|
15
|
+
| Plus | Intervals, live-data utils, overlays builders, drawing specs/factories/query helpers, snapshot helpers, graph math (`timeToX`, …), `ShapeType` & shape arg types, `IDrawingShape`, enums (`ChartType`, `AxesPosition`, overlay keys), branding types, **`TickUpPrime`** / **`TickUpStandardEngine`** / **`createTickUpPrimeEngine`** / **`getTickUpPrimeThemePatch`** / **`TickUpChartEngine`**, Prime palette constants. |
|
|
16
|
+
|
|
17
|
+
## `tickup/full` (product shells + extended)
|
|
18
|
+
|
|
19
|
+
Everything in **`tickup`**, **plus**:
|
|
20
|
+
|
|
21
|
+
### Components
|
|
22
|
+
|
|
23
|
+
| Export | Role |
|
|
24
|
+
|--------|------|
|
|
25
|
+
| `TickUpHost` | Full application shell (toolbar, settings, stage). |
|
|
26
|
+
| `TickUpHost` | **Alias** of `TickUpHost`. |
|
|
27
|
+
| `TickUpPulse` | Minimal product (plot + axes); symbol via compact strip when provided. |
|
|
28
|
+
| `TickUpFlow` | Top bar, no drawing sidebar. |
|
|
29
|
+
| `TickUpCommand` | Full trader UI. |
|
|
30
|
+
| `TickUpDesk` | Same as Command; watermark on. |
|
|
31
|
+
| `TickUpPrimeTier` | Licensed/eval shell: same chrome as Command; `productId: 'prime'`. |
|
|
32
|
+
| `TickUpPrime`, `TickUpStandardEngine` | Engine profiles for **`setEngine`** / **`chartOptions.base.engine`**. **`TickUpPrime`** = dark Prime plot. |
|
|
33
|
+
| `createTickUpPrimeEngine`, `getTickUpPrimeThemePatch` | **`'light' \| 'dark'`** Prime patches so the plot (and Prime **light glass** toolbars when `base.theme === 'light'`) match the host. |
|
|
34
|
+
| `TICKUP_PRIME_PRIMARY`, `TICKUP_PRIME_SECONDARY`, `TICKUP_PRIME_TEXT` | Default Prime palette strings (hex / CSS color). |
|
|
35
|
+
| `TickUpChartEngine` | Type for custom engines: `{ id, getChartOptionsPatch(): DeepPartial<ChartOptions> }`. |
|
|
36
|
+
| `ChartStage` | **Deprecated** — use `TickUpStage`. |
|
|
37
|
+
| `ShapePropertiesModal` | Shape property editor UI. |
|
|
38
|
+
|
|
39
|
+
### Component prop / handle types (full)
|
|
40
|
+
|
|
41
|
+
`TickUpHostProps`, `TickUpHostHandle`, `TickUpPulseProps`, `TickUpFlowProps`, `TickUpCommandProps`, `TickUpDeskProps`, `TickUpPrimeTierProps`, `TickUpStageProps`, `TickUpStageHandle`, `ChartStageProps`, `ChartStageHandle` (deprecated), `TickUpAttributionProps`, `ShapePropertiesFormState`, `ModalThemeVariant`, `TickUpThemeVariant`, `TickUpProductId`.
|
|
42
|
+
|
|
43
|
+
## Context
|
|
44
|
+
|
|
45
|
+
| Export | Role |
|
|
46
|
+
|--------|------|
|
|
47
|
+
| `ModeProvider` | Wraps tree so drawing toolbar modes work. |
|
|
48
|
+
| `useMode` | Access `{ mode, setMode }` inside provider. |
|
|
49
|
+
|
|
50
|
+
The **`Mode` enum** is exported from **`tickup`** and **`tickup/full`** (used by the drawing toolbar and **`setInteractionMode`**). Hosts can still prefer **`DrawingSpec`** + ref APIs for programmatic shapes.
|
|
51
|
+
|
|
52
|
+
## Core data types
|
|
53
|
+
|
|
54
|
+
| Export | Role |
|
|
55
|
+
|--------|------|
|
|
56
|
+
| `Interval` | OHLCV bar. |
|
|
57
|
+
| `TimeRange`, `VisibleViewRanges`, `ChartDimensionsData` | Time window; **visible time + price snapshot** (`getVisibleRanges()`); layout metrics. |
|
|
58
|
+
| `LiveDataPlacement`, `LiveDataApplyResult` | Live merge contract. |
|
|
59
|
+
| `ChartContextInfo` | `getChartContext()` snapshot. |
|
|
60
|
+
| `TickUpProductId` | Product id union — **`tickup/full` only**: `pulse` \| `flow` \| `command` \| `desk` \| `prime`. |
|
|
61
|
+
|
|
62
|
+
## Chart configuration types
|
|
63
|
+
|
|
64
|
+
| Export | Role |
|
|
65
|
+
|--------|------|
|
|
66
|
+
| `ChartType`, `TimeDetailLevel` | Chart mode & axis tick density. |
|
|
67
|
+
| `AxesPosition` | Y-axis left/right. |
|
|
68
|
+
| `OverlayWithCalc`, `OverlaySeries`, `OverlayOptions` | Indicator configuration. |
|
|
69
|
+
| `OverlayKind`, `OverlayPriceKey` | Enum keys for overlays. |
|
|
70
|
+
|
|
71
|
+
## Drawings
|
|
72
|
+
|
|
73
|
+
| Export | Role |
|
|
74
|
+
|--------|------|
|
|
75
|
+
| `ShapeType` | String enum for spec `type`. |
|
|
76
|
+
| `ShapeBaseArgs`, `Drawing` | Internal drawing description types. |
|
|
77
|
+
| `DrawingSpec`, `DrawingPatch`, `DrawingInput` | Spec / patch / instance union for APIs. |
|
|
78
|
+
| `drawingFromSpec`, `applyDrawingPatch`, `isDrawingPatch` | Build & merge helpers. |
|
|
79
|
+
| `DrawingSnapshot`, `DrawingQuery`, `DrawingWithZIndex` | Query & serialization. |
|
|
80
|
+
| `shapeToSnapshot`, `queryDrawingsToSnapshots`, `filterDrawingInstances`, `filterDrawingsWithMeta` | Snapshot pipelines. |
|
|
81
|
+
| `IDrawingShape` | Instance interface. |
|
|
82
|
+
| `LineShapeArgs`, `RectangleShapeArgs`, … `CustomSymbolShapeArgs` | Per-shape argument types. |
|
|
83
|
+
| **Shape classes** | `LineShape`, `RectangleShape`, … — advanced/tests; **`tickup/full` only**. |
|
|
84
|
+
| `generateDrawingShapeId` | Id factory. |
|
|
85
|
+
|
|
86
|
+
## Overlay builders
|
|
87
|
+
|
|
88
|
+
| Export | Role |
|
|
89
|
+
|--------|------|
|
|
90
|
+
| `OverlaySpecs`, `withOverlayStyle`, `overlay` | Build `OverlayWithCalc` entries. |
|
|
91
|
+
|
|
92
|
+
Details: [Overlays & indicators](./12-overlays-and-indicators.md).
|
|
93
|
+
|
|
94
|
+
## Live data utilities
|
|
95
|
+
|
|
96
|
+
| Export | Role |
|
|
97
|
+
|--------|------|
|
|
98
|
+
| `applyLiveDataMerge` | Same merge as ref `applyLiveData` (pure function). |
|
|
99
|
+
| `normalizeInterval`, `normalizeIntervals` | Validate/clamp bars. |
|
|
100
|
+
| `dedupeByTimePreferLast` | Collapse duplicate timestamps. |
|
|
101
|
+
|
|
102
|
+
## Snapshot / export helpers
|
|
103
|
+
|
|
104
|
+
| Export | Role |
|
|
105
|
+
|--------|------|
|
|
106
|
+
| `captureChartRegionToPngDataUrl` | Rasterize a DOM region. |
|
|
107
|
+
| `buildChartSnapshotFileName`, `sanitizeChartSnapshotToken`, `contrastingFooterTextColor` | Filename & contrast helpers. |
|
|
108
|
+
| `ChartSnapshotMeta` | Metadata type for snapshots. |
|
|
109
|
+
|
|
110
|
+
## Graph math (coordinate helpers)
|
|
111
|
+
|
|
112
|
+
`timeToX`, `xToTime`, `priceToY`, `yToPrice`, `interpolatedCloseAtTime`, `lerp`, `xFromCenter`, `xFromStart` — align custom logic with chart scales.
|
|
113
|
+
|
|
114
|
+
## Not exported (internal)
|
|
115
|
+
|
|
116
|
+
Examples: `FormattingService`, `deepMerge`, `deepEqual`, toolbar `Tooltip`, most styled wrappers. Do not import these from deep paths in apps if you want upgrade safety.
|
|
117
|
+
|
|
118
|
+
## `TickUpStage` usage sketch
|
|
119
|
+
|
|
120
|
+
Wrap with **`ModeProvider`**. Pass **all** required `TickUpStageProps` from TypeScript (intervals, `chartOptions`, tick count, `timeDetailLevel`, `timeFormat12h`, selection state, chart-type handler, settings opener, toolbar flags, etc.). Many hosts use a **product component** or **`TickUpHost`** from **`tickup/full`** instead of wiring `TickUpStage` alone.
|
|
121
|
+
|
|
122
|
+
## Init process (summary)
|
|
123
|
+
|
|
124
|
+
1. Mount product or `TickUpHost` / `TickUpStage`.
|
|
125
|
+
2. Merge `chartOptions` with defaults (stable prop reference recommended).
|
|
126
|
+
3. Load `intervalsArray`; derive visible time and price ranges.
|
|
127
|
+
4. Allocate canvases; draw grid, session shading, series, histogram, watermark, overlays (if enabled), drawings.
|
|
128
|
+
5. After mount, the **ref** is non-null — run imperative calls in `useEffect` or callbacks. **`getViewInfo()` / `getChartContext()`** may still return **`null`** until the inner stage is ready; use optional chaining or retry briefly (see the [`example/`](../example/) app for patterns).
|
|
129
|
+
|
|
130
|
+
## Updating (summary)
|
|
131
|
+
|
|
132
|
+
| Concern | Mechanism |
|
|
133
|
+
|---------|-----------|
|
|
134
|
+
| Series | `intervalsArray` or `applyLiveData` / `addInterval` / index update |
|
|
135
|
+
| Styles | `chartOptions` (deep merge on real changes) or Settings modal |
|
|
136
|
+
| Drawings | Toolbar, or `addShape` / `updateShape` / `patchShape` / `setDrawingsFromSpecs` |
|
|
137
|
+
| View | Pan/zoom, `fitVisibleRangeToData`, `redrawCanvas`, `reloadCanvas` |
|
|
138
|
+
| Theme | **`themeVariant` / `defaultThemeVariant` / `onThemeVariantChange`** on **`TickUpHost`** + `chartOptions.base.theme` (and Prime helpers above). |
|
|
139
|
+
|
|
140
|
+
## Deprecated
|
|
141
|
+
|
|
142
|
+
- `ChartStage`, `ChartStageProps`, `ChartStageHandle` → use `TickUpStage*`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Overlays and indicators
|
|
2
|
+
|
|
3
|
+
Technical indicator lines are drawn **on top of** the main series when overlays are enabled in chart options.
|
|
4
|
+
|
|
5
|
+
## Enable drawing
|
|
6
|
+
|
|
7
|
+
Set **`base.showOverlayLine`** to `true` (via `chartOptions` or defaults). Style defaults for stroke live under **`base.style.overlay`** (`lineColor`, `lineWidth`, `lineStyle`: solid | dashed | dotted).
|
|
8
|
+
|
|
9
|
+
## Two configuration styles
|
|
10
|
+
|
|
11
|
+
### 1. `base.overlays` — full control (`OverlayWithCalc[]`)
|
|
12
|
+
|
|
13
|
+
Each entry combines:
|
|
14
|
+
|
|
15
|
+
- **Style** — line color, width, style (merged with defaults).
|
|
16
|
+
- **`calc`** — an `OverlayCalcSpec` describing the math (see below).
|
|
17
|
+
- **`connectNulls`** (optional) — draw through gaps in computed values (default true in helpers).
|
|
18
|
+
- **`useCenterX`** (optional) — plot at bar center vs edge (default true in helpers).
|
|
19
|
+
|
|
20
|
+
Build entries with exported helpers:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
withOverlayStyle,
|
|
25
|
+
OverlaySpecs,
|
|
26
|
+
overlay,
|
|
27
|
+
type OverlayWithCalc,
|
|
28
|
+
} from 'tickup';
|
|
29
|
+
|
|
30
|
+
const overlays: OverlayWithCalc[] = [
|
|
31
|
+
withOverlayStyle({ lineColor: '#ff9800', lineWidth: 2 })(OverlaySpecs.ema(12)),
|
|
32
|
+
overlay(OverlaySpecs.sma(20), { lineColor: '#2962ff' }),
|
|
33
|
+
];
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`OverlaySpecs` includes: `close`, `open`, `high`, `low`, `sma`, `ema`, `wma`, `vwap`, `bbandsMid`, `bbandsUpper`, `bbandsLower`.
|
|
37
|
+
|
|
38
|
+
### 2. `base.overlayKinds` — shorthand
|
|
39
|
+
|
|
40
|
+
An array of **`OverlayKind`** string keys (or calc specs in the type definition; the renderer maps kinds through the same `overlay()` factory with **default periods**, e.g. SMA/EMA/WMA period 20, Bollinger period 20 / stddev 2). Useful for quick demos; prefer **`overlays`** for explicit periods and prices.
|
|
41
|
+
|
|
42
|
+
## Calculation kinds (`OverlayCalcSpec`)
|
|
43
|
+
|
|
44
|
+
| Kind | Role |
|
|
45
|
+
|------|------|
|
|
46
|
+
| `OverlayPriceKey` (`close`, `open`, `high`, `low`) | Raw price series. |
|
|
47
|
+
| `sma`, `ema`, `wma` | Moving averages; `period` + optional `price` key. |
|
|
48
|
+
| `vwap` | Volume-weighted average price (uses interval volume when present). |
|
|
49
|
+
| `bbands_mid`, `bbands_upper`, `bbands_lower` | Bollinger mid/upper/lower; `period`, optional `stddev`, optional `price`. |
|
|
50
|
+
|
|
51
|
+
## Exported API (from `tickup`)
|
|
52
|
+
|
|
53
|
+
| Export | Role |
|
|
54
|
+
|--------|------|
|
|
55
|
+
| `OverlaySpecs` | Factory for calc specs. |
|
|
56
|
+
| `withOverlayStyle` | Curried builder: shared style → many overlays. |
|
|
57
|
+
| `overlay(kindOrSpec?, style?, extras?)` | Single `OverlayWithCalc` with defaults. |
|
|
58
|
+
| `OverlayKind`, `OverlayPriceKey` | Enums. |
|
|
59
|
+
| Types: `OverlayWithCalc`, `OverlaySeries`, `OverlayOptions` | Typing and advanced use. |
|
|
60
|
+
|
|
61
|
+
Lower-level functions such as `computeSeriesBySpec`, `drawOverlays`, `drawOverlay` exist in source for maintainers; the **supported host integration path** is configuring **`chartOptions.base.overlays`** / **`overlayKinds`** and **`showOverlayLine`**.
|
|
62
|
+
|
|
63
|
+
## Chart types
|
|
64
|
+
|
|
65
|
+
Overlays are wired in **candlestick**, **line**, **area**, and **bar** draw paths when `showOverlayLine` is true.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Internationalization, axes, and sessions
|
|
2
|
+
|
|
3
|
+
## Locale and language
|
|
4
|
+
|
|
5
|
+
Axis labels, dates, and many settings strings follow **`chartOptions.base.style.axes`**:
|
|
6
|
+
|
|
7
|
+
| Field | Role |
|
|
8
|
+
|-------|------|
|
|
9
|
+
| `locale` | BCP 47 tag (e.g. `en-US`, `he-IL`). Drives date/number formatting and default direction. |
|
|
10
|
+
| `language` | UI language key for built-in labels (toolbar tooltips, settings, etc.). |
|
|
11
|
+
|
|
12
|
+
The in-app **Settings → Regional** category updates these fields. The library ships multiple locale presets (decimal/thousands separators, date patterns, default currency, **RTL** vs LTR) in internal locale tables.
|
|
13
|
+
|
|
14
|
+
### RTL
|
|
15
|
+
|
|
16
|
+
When the active locale defaults specify `direction: 'rtl'`, toolbar and settings layout flip appropriately (`dir` on toolbars/modals).
|
|
17
|
+
|
|
18
|
+
## Numeric and currency display
|
|
19
|
+
|
|
20
|
+
Axes support:
|
|
21
|
+
|
|
22
|
+
- Fraction digits, min/max significant digits, `tickSize`, `autoPrecision`
|
|
23
|
+
- `currency`, `useCurrency`, `currencyDisplay`
|
|
24
|
+
- `numberNotation`: `standard` | `scientific` | `compact`
|
|
25
|
+
- `unit` / `unitPlacement`
|
|
26
|
+
- Optional **`displayCurrency`** / **`conversionRate`** for converted display (host-defined semantics)
|
|
27
|
+
|
|
28
|
+
## Time axis
|
|
29
|
+
|
|
30
|
+
- **`timezone`** — string such as `UTC` or `America/New_York` for session logic and labeling where used.
|
|
31
|
+
- **`dateFormat`** — pattern consumed by the formatting layer.
|
|
32
|
+
- Shell prop **`initialTimeFormat12h`** and settings **12-hour toggle** affect time presentation.
|
|
33
|
+
- **`TimeDetailLevel`** (`Auto` / `Low` / `Medium` / `High`) controls tick density (prop `initialTimeDetailLevel`).
|
|
34
|
+
|
|
35
|
+
## Trading sessions and holidays
|
|
36
|
+
|
|
37
|
+
`axes` options include:
|
|
38
|
+
|
|
39
|
+
- **`tradingSessions`** — array of `{ dayOfWeek, start, end }` with `start`/`end` as `'HH:mm'` strings; used to **shade off-session** periods on the chart.
|
|
40
|
+
- **`holidays`** — ISO `YYYY-MM-DD` strings for calendar context (where integrated).
|
|
41
|
+
- **`exchange`** — display/metadata string.
|
|
42
|
+
|
|
43
|
+
## Grid and background
|
|
44
|
+
|
|
45
|
+
- **`base.style.showGrid`** — toggles grid lines (`grid` sub-style: colors, dash, spacing).
|
|
46
|
+
- **`base.style.backgroundColor`** — plot background.
|
|
47
|
+
|
|
48
|
+
## Y axis layout
|
|
49
|
+
|
|
50
|
+
- **`axes.yAxisPosition`** — `AxesPosition.left` or `.right`.
|
|
51
|
+
- **`axes.numberOfYTicks`** — count (also `initialNumberOfYTicks` on the shell).
|
|
52
|
+
- **`initialYAxisWidth`** / **`initialXAxisHeight`** — layout hints passed into the stage.
|
|
53
|
+
|
|
54
|
+
## Clipboard (shell behavior)
|
|
55
|
+
|
|
56
|
+
When users copy selected text, the host shell may **normalize** numbers to a canonical plain form using the same axis parsing rules (implemented inside the chart app wrapper). This is a UX nicety for spreadsheets, not a separate public API export.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Legal and policies
|
|
2
|
+
|
|
3
|
+
TickUp ships as **open-source software** (see the **LICENSE** file in the repository root when present) and may also be described, demoed, or offered through **websites, accounts, or hosted services**. **Legal terms for those offerings**—including intellectual property, acceptable use, suspension or termination of access, privacy, and standard limitations of liability—are maintained as **templates** in the repository for you to customize with your lawyer.
|
|
4
|
+
|
|
5
|
+
## Where to read the documents
|
|
6
|
+
|
|
7
|
+
Policy templates ship **next to** this folder in the npm package (`node_modules/tickup/legal/`) and in the Git clone. All files live under **[`../legal/`](../legal/)**:
|
|
8
|
+
|
|
9
|
+
| Document | File |
|
|
10
|
+
|----------|------|
|
|
11
|
+
| Index & disclaimer | [`../legal/README.md`](../legal/README.md) |
|
|
12
|
+
| **Terms of Service** | [`../legal/TERMS_OF_SERVICE.md`](../legal/TERMS_OF_SERVICE.md) |
|
|
13
|
+
| **Privacy Policy** | [`../legal/PRIVACY_POLICY.md`](../legal/PRIVACY_POLICY.md) |
|
|
14
|
+
| **Acceptable Use Policy** | [`../legal/ACCEPTABLE_USE_POLICY.md`](../legal/ACCEPTABLE_USE_POLICY.md) |
|
|
15
|
+
|
|
16
|
+
## What the Terms of Service cover (summary)
|
|
17
|
+
|
|
18
|
+
The Terms of Service template is written so you can:
|
|
19
|
+
|
|
20
|
+
- **Retain ownership** of TickUp branding, product, documentation, and proprietary parts of the Services.
|
|
21
|
+
- **Suspend or terminate** user access, change or discontinue features, and refuse service where appropriate, subject to applicable law and any stricter promises you make elsewhere.
|
|
22
|
+
- Use **standard protections**: disclaimers of warranty, caps on liability, indemnity where appropriate, governing law and venue placeholders, and rules for changes to the terms.
|
|
23
|
+
|
|
24
|
+
**Open-source code** released under the repo **LICENSE** is called out separately so the license for that code and the Terms for hosted products can coexist without confusion.
|
|
25
|
+
|
|
26
|
+
## Not legal advice
|
|
27
|
+
|
|
28
|
+
These markdown files are **starting points**, not a substitute for counsel. Replace all bracketed placeholders (`[Legal Entity Name]`, `[Contact Email]`, `[Jurisdiction]`, etc.) and adapt clauses for your entity, products, and regions before publication.
|
|
29
|
+
|
|
30
|
+
## Older stub
|
|
31
|
+
|
|
32
|
+
A short legacy note lives in the repo under **`docs/Documentation/Terms_of_Use.md`** (that tree is **not** bundled on npm). [View on GitHub](https://github.com/BARDAMRI/TickUp/blob/main/docs/Documentation/Terms_of_Use.md) — it points here and to **`legal/`**.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# TickUp Charts documentation
|
|
2
|
+
|
|
3
|
+
Complete guides for integrating and operating the TickUp Charts React charting library.
|
|
4
|
+
|
|
5
|
+
The **npm package** has **`tickup`** (default — `TickUpStage` and chart helpers) and **`tickup/full`** (e.g. `TickUpCommand`, `TickUpHost`, extended exports). Product-focused guides import from **`tickup/full`**.
|
|
6
|
+
|
|
7
|
+
Published tarballs **include this `documentation/` folder** and the sibling **`legal/`** policy templates (see root `package.json` **`files`**) so links in **[14-legal-and-policies.md](./14-legal-and-policies.md)** resolve under `node_modules/tickup/`. Type declarations ship in **`dist/*.d.ts`**. This documentation covers the open-source core package.
|
|
8
|
+
|
|
9
|
+
The **reference example app** in [`../example/`](../example/) (Vite + React) exercises all product tiers, `chartOptions`, the compact symbol strip on Pulse, host symbol callbacks, and the imperative ref API; see [`../example/README.md`](../example/README.md). The example app itself is **not** published to npm.
|
|
10
|
+
|
|
11
|
+
## Contents
|
|
12
|
+
|
|
13
|
+
| # | Guide | Description |
|
|
14
|
+
|---|--------|-------------|
|
|
15
|
+
| 1 | [Introduction](./01-introduction.md) | Overview, package scope, and Prime upgrade path |
|
|
16
|
+
| 2 | [Glossary](./01-glossary.md) | Terms: intervals, ranges, products, placements, etc. |
|
|
17
|
+
| 3 | [Installation](./02-installation.md) | Peer dependencies, package install, styled-components |
|
|
18
|
+
| 4 | [Quick start](./03-quick-start.md) | Minimal embed, ref, controlled data |
|
|
19
|
+
| 5 | [Products & layout](./04-products-and-layout.md) | Pulse, Flow, Command, Desk; toolbars (public line) |
|
|
20
|
+
| 6 | [Props & chart options](./05-props-and-chart-options.md) | `TickUpHost`, `chartOptions`, shell theme + chart theme |
|
|
21
|
+
| 7 | [Imperative API](./06-imperative-api.md) | Ref handle: shapes, data, **`getVisibleRanges()`**, **`getCanvasSize()`**, view, context |
|
|
22
|
+
| 8 | [Data & live updates](./07-data-and-live-updates.md) | `intervalsArray`, `applyLiveData`, merge helpers |
|
|
23
|
+
| 9 | [Drawings & shapes](./08-drawings-and-shapes.md) | Toolbar tools, select/edit, programmatic shapes & patches |
|
|
24
|
+
| 10 | [Settings modal](./09-settings-modal.md) | In-app settings categories and persistence |
|
|
25
|
+
| 11 | [Toolbar & interactions](./10-toolbar-and-interactions.md) | Chart type, snapshot, crosshair, tooltip, pan/zoom |
|
|
26
|
+
| 12 | [Exports & advanced](./11-exports-and-advanced.md) | Full export list, `TickUpStage`, branding, init/update |
|
|
27
|
+
| 13 | [Overlays & indicators](./12-overlays-and-indicators.md) | SMA/EMA/VWAP/Bollinger, `overlays` / `overlayKinds` |
|
|
28
|
+
| 14 | [i18n & axes](./13-internationalization-and-axes.md) | Locale, RTL, currency, sessions, grid |
|
|
29
|
+
| 15 | [Legal & policies](./14-legal-and-policies.md) | Terms of Service, Privacy, Acceptable Use templates (`legal/`) |
|
|
30
|
+
|
|
31
|
+
## Older material
|
|
32
|
+
|
|
33
|
+
Additional notes and legacy pages may still live under [`../docs/`](../docs/) (roadmap, contributing, design). The **authoritative integration reference** is this `documentation/` folder.
|