Measure candle marker labels within chart bounds
This commit is contained in:
1 parent
8618c1ada5
commit
fc94c9c39c
5 files changed
+21
-8
No files matched your search
@@ -27,7 +27,7 @@ make dashboard-zx # ZX build of the dashboard cookbook
|
||||
## Pins
|
||||
|
||||
- Ziran toolchain: `bbaac5e493973e616e90f1f7ac84dfeb32134194`
|
||||
- Kryon: `de391af5e59ed1ff45f3b3ae2bbd14352e986c54`
|
||||
- Kryon: `18a629debbe88e8b114651c10a4c25bf3fb0b0f8`
|
||||
|
||||
Public module names use `UpperCamelCase`; lowercase names are implementation
|
||||
modules. Commit as Waozi <waozi@proton.me>; ordinary changes stay in
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Measure candle marker buttons from their themed labels and keep them inside
|
||||
the chart, so event names remain readable and their hit bounds match.
|
||||
- Select the shared Kryon revision with native Go desktop processes and bounded
|
||||
idle picture caches, keeping optional chart consumers on one dependency graph.
|
||||
|
||||
- Keep retained chart composition package-private behind the typed TSX
|
||||
components. Native data, calculations, hit tests and drawing hooks remain
|
||||
available. Add TSX components for interactive candle markers and price levels.
|
||||
|
||||
+9
-1
@@ -542,8 +542,16 @@ CandleMarkers :: (session: Session, props: CandleChartProps,
|
||||
markers[index].color)
|
||||
marker: ButtonWidget.Props
|
||||
marker.key = props.key + cast(u64)1000 + cast(u64)index
|
||||
marker.bounds = Rectangle.{x - 11.0, price.y + 2.0, 22.0, 20.0}
|
||||
marker.label = markers[index].label
|
||||
marker.bounds.height = 20.0
|
||||
marker.bounds = ButtonWidget.ButtonMeasure(marker)
|
||||
if marker.bounds.width > price.width { marker.bounds.width = price.width }
|
||||
marker.bounds.x = x - marker.bounds.width * 0.5
|
||||
marker.bounds.y = price.y + 2.0
|
||||
if marker.bounds.x < price.x { marker.bounds.x = price.x }
|
||||
if marker.bounds.x + marker.bounds.width > price.x + price.width {
|
||||
marker.bounds.x = price.x + price.width - marker.bounds.width
|
||||
}
|
||||
if ButtonView.Button(.{session = session, props = marker}) { selected = index }
|
||||
}
|
||||
index += 1
|
||||
|
||||
+5
-5
@@ -65,12 +65,12 @@
|
||||
"url": "https://github.com/xiph/opus.git"
|
||||
},
|
||||
{
|
||||
"commit": "de391af5e59ed1ff45f3b3ae2bbd14352e986c54",
|
||||
"commit": "18a629debbe88e8b114651c10a4c25bf3fb0b0f8",
|
||||
"dependencies": {"audio": "waozi_xyz_ziranlang_audio_b5c6b56b7117", "avif": "waozi_xyz_ziranlang_avif_6ff696d436b6", "image_codec": "waozi_xyz_ziranlang_image_codec_3017f0d1cc56", "libaom": "src_aomedia_googlesource_com_aom_b141d9c45db2", "libavif": "src_github_com_AOMediaCodec_libavif_1aadfad932c9", "libwebp": "src_github_com_webmproject_libwebp_1844042d1ca7", "sdl3": "src_github_com_libsdl_org_SDL_829a65d769d9", "webp": "waozi_xyz_ziranlang_webp_4b9a61d32460"},
|
||||
"dependency_refs": {"audio": "b5c6b56b71172c4361ae01e3afdd2118bdac0975", "avif": "6ff696d436b6b4f142eb1e3ecf210de7adfa048f", "image_codec": "3017f0d1cc56975aa29c600a1f55a62e1193cf7b", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "4b9a61d32460d481624fe0f83996a7de50327dfe"},
|
||||
"id": "waozi_xyz_kryonlabs_kryon_de391af5e59e",
|
||||
"id": "waozi_xyz_kryonlabs_kryon_18a629debbe8",
|
||||
"name": "kryon",
|
||||
"ref": "de391af5e59ed1ff45f3b3ae2bbd14352e986c54",
|
||||
"ref": "18a629debbe88e8b114651c10a4c25bf3fb0b0f8",
|
||||
"url": "https://git.waozi.xyz/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
@@ -119,8 +119,8 @@
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"kryon": "waozi_xyz_kryonlabs_kryon_de391af5e59e"},
|
||||
"dependency_refs": {"kryon": "de391af5e59ed1ff45f3b3ae2bbd14352e986c54"},
|
||||
"dependencies": {"kryon": "waozi_xyz_kryonlabs_kryon_18a629debbe8"},
|
||||
"dependency_refs": {"kryon": "18a629debbe88e8b114651c10a4c25bf3fb0b0f8"},
|
||||
"name": "plot"
|
||||
},
|
||||
"toolchain": {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ ref = "bbaac5e493973e616e90f1f7ac84dfeb32134194"
|
||||
|
||||
[dependencies.kryon]
|
||||
git = "https://git.waozi.xyz/kryonlabs/kryon.git"
|
||||
ref = "de391af5e59ed1ff45f3b3ae2bbd14352e986c54"
|
||||
ref = "18a629debbe88e8b114651c10a4c25bf3fb0b0f8"
|
||||
|
||||
[exports]
|
||||
# Public module is Plot; the lowercase export is retained for older imports.
|
||||
|
||||
Reference in new issue
Block a user