Floyd Wang
0e2397cf15
chart(bar): Fix the label is not centered ( #1448 )
2025-10-28 16:53:42 +08:00
Floyd Wang
19a54d6065
chart(pie): Support dynamic inner and outer radius ( #1444 )
...
## ⚠️ Breaking Change
Add `inner_radius` and `outer_radius` options for `Arc` paint function.
```diff
- arc.paint(a, "#9d9d9d", bounds, window)
+ arc.paint(a, "#9d9d9d", Some(20.), Some(30.), bounds, window)
```
## Demo
<img width="410" height="442" alt="SCR-20251028-kohu"
src="https://github.com/user-attachments/assets/8b849053-22e6-4d6f-933f-b9fb2a47f5e3 "
/>
2025-10-28 13:53:28 +08:00
Floyd Wang
1abb6c2222
plot(line_chart): Add missing natural stroke style ( #1366 )
2025-10-14 09:40:10 +08:00
Martí Gimeno Ortí
5f13b49690
plot: Add stroke style per each Y series ( #1364 )
...
Enables the user to set different `stroke_style` to each Y data series,
keeping retrocompatibility with the previous API.
<img width="1300" height="411" alt="Screenshot from 2025-10-13 11-33-28"
src="https://github.com/user-attachments/assets/d665b87c-0d79-479c-9156-15a0f1c8ca10 "
/>
2025-10-14 09:36:30 +08:00
Martí Gimeno Ortí
32b8d65075
plot: Add StepAfter kind to StokeStrike ( #1356 )
...
Implements new `StokeStrike::StepAfter` for plot component
<img width="1700" height="1030" alt="step-after-plot-stoke-style"
src="https://github.com/user-attachments/assets/89252ba9-2834-4c9a-9020-7977ffea6865 "
/>
2025-10-13 09:59:51 +08:00
Floyd Wang
1358b2906e
Bump gpui ( #1324 )
...
* Wireup the `Pixels` change
https://github.com/zed-industries/zed/pull/39367 .
2025-10-03 14:32:29 +08:00
Floyd Wang
c385da56c1
plot(shape): Add multi-label support for Bar ( #1262 )
...
## Breaking Change
```diff
- bar.label(move |_, point| Text::new("foo", point, "#red"));
+ bar.label(move |_, point| vec![Text::new("foo", point, "#red")]);
```
Add support for multiple labels on a single bar.
2025-09-19 14:13:51 +08:00
Floyd Wang
78dccd4d79
plot: Apply linear scale based on the direction of given range ( #1219 )
...
## Breaking Change
- Apply linear scale based on the direction of given range.
```diff
- ScaleLinear::new(vec![1., 2., 3.], vec![0., 100.])
+ ScaleLinear::new(vec![1., 2., 3.], vec![100., 0.])
```
Currently, you can draw the linear scale from minimum to maximum or from
maximum to minimum; it depends on the direction of the range.
2025-09-08 15:56:58 +08:00
Floyd Wang
1267857a8c
plot(scale): Point scale support single point ( #1185 )
...
<img width="447" height="446" alt="image"
src="https://github.com/user-attachments/assets/fff44252-ff5b-4d73-8b98-0eb4c0877563 "
/>
2025-08-29 15:05:51 +08:00
Floyd Wang
3b759cd448
plot: Use f32 instead of f64 ( #1052 )
...
## Break Change
- Convert all `f64` parameters to `f32`.
Since the GPUI geometry module uses f32 for rendering, we are also
switching to f32. This helps avoid many as operators and unnecessary
conversions.
2025-07-08 16:24:59 +08:00
Jason Lee
a3a4f1942d
chart: Update Chart story by use JSON file data. ( #947 )
2025-06-11 21:34:22 +08:00
Floyd Wang
44ec74f1fb
chart: Draw dashed lines using gpui PathBuilder ( #927 )
...
https://github.com/zed-industries/zed/pull/31678
2025-06-09 11:55:32 +08:00
Floyd Wang
516c8fada4
chart: Introduce chart ( #878 )
...
Add a new component called `plot`. It provides a low-level approach to
data analysis and visualization.
Chart is a collection of ready-to-use chart components built with
`plot`.
| Light | Dark |
| - | - |
| <img width="1712" alt="SCR-20250604-qhxb"
src="https://github.com/user-attachments/assets/bf7ce76e-ab7a-42c2-92e7-17cd135de66f "
/> | <img width="1712" alt="SCR-20250604-qhxr"
src="https://github.com/user-attachments/assets/dd3e44ea-bbb5-41a2-8cce-38b316d7d800 "
/> |
2025-06-04 19:22:11 +08:00