Skip to content
COMPONENT / CHARTS

3D Chart.

Pilih 3D bar, 3D scatter, 3D line atau 3D surface.

PHP + dl.jsNo build

Preview

Activity in three dimensions

Small, understandable components. Native PHP, ready for the browser.

The chart loads when visible. Its data is available below.

Chart data
XYZ
005
1012
2019
309
4016
016
1113
2120
3110
4117
027
1214
2221
3211
4218
038
1315
235
3312
4319
049
1416
246
3413
4420

Usage

Pilih 3D bar, 3D scatter, 3D line atau 3D surface. Drag untuk rotasi dan scroll untuk zoom; browser harus mendukung WebGL.

  1. Gunakan layout DL yang sudah memuat CSS dan dl.js.
  2. Letakkan kode berikut di view PHP Anda.
  3. Ganti data contoh dengan nilai aplikasi. Teks di-escape otomatis.
PHP view
<?= component('chart-3d', ['title' => 'Activity in three dimensions', 'text' => 'Small, understandable components. Native PHP, ready for the browser.', 'recipe' => '3D bar']) ?>

Examples

Scatter

3D scatter

Drag to rotate. Scroll to zoom. Requires WebGL.

The chart loads when visible. Its data is available below.

Chart data
XYZ
005
1012
2019
309
4016
016
1113
2120
3110
4117
027
1214
2221
3211
4218
038
1315
235
3312
4319
049
1416
246
3413
4420
PHP view
<?= component('chart-3d', ['title' => '3D scatter', 'recipe' => '3D scatter']) ?>

Surface

3D surface

Drag to rotate. Scroll to zoom. Requires WebGL.

The chart loads when visible. Its data is available below.

Chart data
XYZ
-4-40
-4-3.50
-4-30
-4-2.50
-4-20
-4-1.50
-4-10
-4-0.50
-400
-40.50
-410
-41.50
-420
-42.50
-430
-43.50
-440
-3.5-40.982
-3.5-3.50.928
-3.5-30.771
-3.5-2.50.53
-3.5-20.231
-3.5-1.5-0.094
-3.5-1-0.408
-3.5-0.5-0.678
-3.50-0.873
-3.50.5-0.972
-3.51-0.964
-3.51.5-0.849
-3.52-0.642
-3.52.5-0.363
-3.53-0.045
-3.53.50.278
-3.540.571
-3-41.855
-3-3.51.753
-3-31.458
-3-2.51.002
-3-20.436
-3-1.5-0.178
-3-1-0.772
-3-0.5-1.281
-30-1.65
-30.5-1.837
-31-1.821
-31.5-1.605
-32-1.213
-32.5-0.686
-33-0.085
-33.50.526
-341.079
-2.5-42.524
-2.5-3.52.385
-2.5-31.984
-2.5-2.51.364
-2.5-20.594
-2.5-1.5-0.242
-2.5-1-1.051
-2.5-0.5-1.744
-2.50-2.245
-2.50.5-2.499
-2.51-2.478
-2.51.5-2.184
-2.52-1.65
-2.52.5-0.934
-2.53-0.115
-2.53.50.716
-2.541.469
-2-42.916
-2-3.52.755
-2-32.292
-2-2.51.575
-2-20.686
-2-1.5-0.279
-2-1-1.213
-2-0.5-2.014
-20-2.593
-20.5-2.887
-21-2.862
-21.5-2.523
-22-1.906
-22.5-1.079
-23-0.133
-23.50.827
-241.696
-1.5-42.986
-1.5-3.52.822
-1.5-32.347
-1.5-2.51.613
-1.5-20.702
-1.5-1.5-0.286
-1.5-1-1.243
-1.5-0.5-2.063
-1.50-2.656
-1.50.5-2.956
-1.51-2.931
-1.51.5-2.584
-1.52-1.952
-1.52.5-1.105
-1.53-0.136
-1.53.50.847
-1.541.737
-1-42.728
-1-3.52.578
-1-32.144
-1-2.51.474
-1-20.642
-1-1.5-0.261
-1-1-1.135
-1-0.5-1.884
-10-2.426
-10.5-2.701
-11-2.678
-11.5-2.36
-12-1.783
-12.5-1.009
-13-0.125
-13.50.774
-141.587
-0.5-42.169
-0.5-3.52.05
-0.5-31.705
-0.5-2.51.172
-0.5-20.51
-0.5-1.5-0.208
-0.5-1-0.903
-0.5-0.5-1.498
-0.50-1.929
-0.50.5-2.148
-0.51-2.13
-0.51.5-1.877
-0.52-1.418
-0.52.5-0.803
-0.53-0.099
-0.53.50.615
-0.541.262
0-41.372
0-3.51.296
0-31.078
0-2.50.741
0-20.323
0-1.5-0.131
0-1-0.571
0-0.5-0.948
00-1.22
00.5-1.358
01-1.347
01.5-1.187
02-0.897
02.5-0.508
03-0.063
03.50.389
040.798
0.5-40.423
0.5-3.50.4
0.5-30.333
0.5-2.50.229
0.5-20.1
0.5-1.5-0.041
0.5-1-0.176
0.5-0.5-0.292
0.50-0.377
0.50.5-0.419
0.51-0.416
0.51.5-0.366
0.52-0.277
0.52.5-0.157
0.53-0.019
0.53.50.12
0.540.246
1-4-0.572
1-3.5-0.54
1-3-0.449
1-2.5-0.309
1-2-0.134
1-1.50.055
1-10.238
1-0.50.395
100.508
10.50.566
110.561
11.50.495
120.374
12.50.212
130.026
13.5-0.162
14-0.333
1.5-4-1.504
1.5-3.5-1.421
1.5-3-1.182
1.5-2.5-0.813
1.5-2-0.354
1.5-1.50.144
1.5-10.626
1.5-0.51.039
1.501.337
1.50.51.489
1.511.476
1.51.51.301
1.520.983
1.52.50.556
1.530.069
1.53.5-0.427
1.54-0.875
2-4-2.27
2-3.5-2.145
2-3-1.784
2-2.5-1.227
2-2-0.534
2-1.50.217
2-10.945
2-0.51.568
202.019
20.52.248
212.229
21.51.965
221.484
22.50.84
230.104
23.5-0.644
24-1.321
2.5-4-2.787
2.5-3.5-2.634
2.5-3-2.19
2.5-2.5-1.506
2.5-2-0.656
2.5-1.50.267
2.5-11.16
2.5-0.51.925
2.502.479
2.50.52.759
2.512.736
2.51.52.412
2.521.822
2.52.51.031
2.530.127
2.53.5-0.791
2.54-1.622
3-4-2.997
3-3.5-2.832
3-3-2.355
3-2.5-1.619
3-2-0.705
3-1.50.287
3-11.247
3-0.52.07
302.665
30.52.967
312.942
31.52.593
321.959
32.51.109
330.137
33.5-0.85
34-1.744
3.5-4-2.877
3.5-3.5-2.718
3.5-3-2.261
3.5-2.5-1.554
3.5-2-0.677
3.5-1.50.275
3.5-11.197
3.5-0.51.987
3.502.558
3.50.52.848
3.512.824
3.51.52.489
3.521.88
3.52.51.065
3.530.131
3.53.5-0.816
3.54-1.674
4-4-2.44
4-3.5-2.306
4-3-1.918
4-2.5-1.318
4-2-0.574
4-1.50.234
4-11.015
4-0.51.685
402.17
40.52.416
412.395
41.52.111
421.595
42.50.903
430.112
43.5-0.692
44-1.42
PHP view
<?= component('chart-3d', ['title' => '3D surface', 'recipe' => '3D surface']) ?>

API reference

Props PHP yang didukung implementasi DL. Field di dalam array mengikuti bentuk pada kolom Type. Props yang tidak dicantumkan tidak menjadi bagian API komponen.

3D Chart props
PropType / valuesPanduan
titlestringJudul konten yang ditampilkan.
textstringIsi teks biasa; HTML di-escape.
recipestringNama recipe persis sesuai panduan Charts; peka huruf besar/kecil.
optionsarray|nullOpsi ECharts dari kode tepercaya; wajib disertai rows dan columns. Callback JavaScript tidak dapat dikirim sebagai JSON.
rowsarray<array<string|number>>Daftar baris; setiap baris berisi nilai sel sesuai columns.
columnsstring[]Daftar label header sesuai urutan kolom.

Behavior & accessibility

Tabel data selalu tersedia. Bundle GL lokal sudah disesuaikan untuk CSP; jangan menambahkan unsafe-eval.

Uji keyboard, fokus, dan pembaca layar pada halaman aplikasi Anda. Contoh ini tidak menggantikan audit aksesibilitas aplikasi secara menyeluruh.

Source & agent context

Source tersedia di views/components/chart-3d.php. Edit template ini jika membutuhkan perilaku tambahan. API PHP DL berbeda dari API React sumber rujukan.

Terminal
php dl component chart-3d

Component guide · JavaScript & events · Styling

Icons: Solar by 480 Design (CC BY 4.0) & Iconsax (MIT). PHP UI adapted from Coordiation. Logo: DesignLof.