Skip to content

Commit 1bdfd7c

Browse files
authored
Merge pull request #43 from VisionKernel/dev
Dev
2 parents dd06686 + 66d1ef9 commit 1bdfd7c

15 files changed

Lines changed: 1339 additions & 256 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# VisionCharts
22

3-
A modern, high-performance JavaScript charting library optimized for financial and economic data visualization. Built specifically to replace multiple charting libraries in the VisionKernel platform.
3+
A modern, high-performance JavaScript charting library optimized for economic and financial time-series data visualization with 0 dependencies. Built specifically to be the core charting library of VisionKernel, VisionCharts offers customizable features that give the ability to create professional grade graphics for reports & analysis.
44

5-
![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)
5+
![Version](https://img.shields.io/badge/version-1.2.1-blue.svg)
66
![License](https://img.shields.io/badge/license-MIT-green.svg)
77

88
## Overview
@@ -29,8 +29,8 @@ All chart types in VisionCharts support these essential capabilities:
2929
- **Zero Line Display**: Emphasize the zero threshold with a reference line
3030
- **Average Line Display**: Shows a horizontal line that is the cumulative average of all datasets
3131
- **Median Line Display**: Shows a horizontal line that is the cumulative median of all datasets
32-
- **Customizable Line Properties**: Adjust width, color, and style for each dataset
33-
- **Technical Studies/Indicators**: Add common technical analysis tools (SMA, EMA, etc.)
32+
- **Customizable Line Properties**: Adjust width, color, curve type & styles for each dataset
33+
- **Technical Studies/Indicators**: Add and customize common technical analysis tools (SMA, EMA, etc.)
3434
- **Area fill for line charts**: Add a shaded gradient under the dataset lines for line charts
3535

3636
## Chart Types

examples/data/daily-returns.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[
2+
{"x": 1704067200000, "y": 0.0234},
3+
{"x": 1704153600000, "y": -0.0156},
4+
{"x": 1704240000000, "y": 0.0089},
5+
{"x": 1704326400000, "y": 0.0234},
6+
{"x": 1704412800000, "y": -0.0078},
7+
{"x": 1704499200000, "y": 0.0156},
8+
{"x": 1704585600000, "y": -0.0234},
9+
{"x": 1704672000000, "y": 0.0098},
10+
{"x": 1704758400000, "y": 0.0187},
11+
{"x": 1704844800000, "y": -0.0065},
12+
{"x": 1704931200000, "y": 0.0134},
13+
{"x": 1705017600000, "y": -0.0198},
14+
{"x": 1705104000000, "y": 0.0076},
15+
{"x": 1705190400000, "y": 0.0223},
16+
{"x": 1705276800000, "y": -0.0145},
17+
{"x": 1705363200000, "y": 0.0087},
18+
{"x": 1705449600000, "y": -0.0234},
19+
{"x": 1705536000000, "y": 0.0178},
20+
{"x": 1705622400000, "y": 0.0056},
21+
{"x": 1705708800000, "y": -0.0123},
22+
{"x": 1705795200000, "y": 0.0198},
23+
{"x": 1705881600000, "y": -0.0087},
24+
{"x": 1705968000000, "y": 0.0134},
25+
{"x": 1706054400000, "y": 0.0076},
26+
{"x": 1706140800000, "y": -0.0156},
27+
{"x": 1706227200000, "y": 0.0234},
28+
{"x": 1706313600000, "y": -0.0098},
29+
{"x": 1706400000000, "y": 0.0145},
30+
{"x": 1706486400000, "y": 0.0087},
31+
{"x": 1706572800000, "y": -0.0234},
32+
{"x": 1706659200000, "y": 0.0156},
33+
{"x": 1706745600000, "y": -0.0076},
34+
{"x": 1706832000000, "y": 0.0198},
35+
{"x": 1706918400000, "y": 0.0123},
36+
{"x": 1707004800000, "y": -0.0187},
37+
{"x": 1707091200000, "y": 0.0078},
38+
{"x": 1707177600000, "y": 0.0234},
39+
{"x": 1707264000000, "y": -0.0145},
40+
{"x": 1707350400000, "y": 0.0089},
41+
{"x": 1707436800000, "y": -0.0156},
42+
{"x": 1707523200000, "y": 0.0187},
43+
{"x": 1707609600000, "y": 0.0076},
44+
{"x": 1707696000000, "y": -0.0098},
45+
{"x": 1707782400000, "y": 0.0134},
46+
{"x": 1707868800000, "y": -0.0234},
47+
{"x": 1707955200000, "y": 0.0178},
48+
{"x": 1708041600000, "y": 0.0087},
49+
{"x": 1708128000000, "y": -0.0123},
50+
{"x": 1708214400000, "y": 0.0198},
51+
{"x": 1708300800000, "y": -0.0076},
52+
{"x": 1708387200000, "y": 0.0156},
53+
{"x": 1708473600000, "y": 0.0098},
54+
{"x": 1708560000000, "y": -0.0187},
55+
{"x": 1708646400000, "y": 0.0134},
56+
{"x": 1708732800000, "y": -0.0089},
57+
{"x": 1708819200000, "y": 0.0234},
58+
{"x": 1708905600000, "y": 0.0076},
59+
{"x": 1708992000000, "y": -0.0145},
60+
{"x": 1709078400000, "y": 0.0187},
61+
{"x": 1709164800000, "y": -0.0098},
62+
{"x": 1709251200000, "y": 0.0123},
63+
{"x": 1709337600000, "y": 0.0178},
64+
{"x": 1709424000000, "y": -0.0156},
65+
{"x": 1709510400000, "y": 0.0089},
66+
{"x": 1709596800000, "y": -0.0234},
67+
{"x": 1709683200000, "y": 0.0198},
68+
{"x": 1709769600000, "y": 0.0076},
69+
{"x": 1709856000000, "y": -0.0123},
70+
{"x": 1709942400000, "y": 0.0145},
71+
{"x": 1710028800000, "y": -0.0087},
72+
{"x": 1710115200000, "y": 0.0234},
73+
{"x": 1710201600000, "y": 0.0098},
74+
{"x": 1710288000000, "y": -0.0178},
75+
{"x": 1710374400000, "y": 0.0156},
76+
{"x": 1710460800000, "y": -0.0076},
77+
{"x": 1710547200000, "y": 0.0187},
78+
{"x": 1710633600000, "y": 0.0123},
79+
{"x": 1710720000000, "y": -0.0145},
80+
{"x": 1710806400000, "y": 0.0089},
81+
{"x": 1710892800000, "y": -0.0234},
82+
{"x": 1710979200000, "y": 0.0178},
83+
{"x": 1711065600000, "y": 0.0076},
84+
{"x": 1711152000000, "y": -0.0098},
85+
{"x": 1711238400000, "y": 0.0198},
86+
{"x": 1711324800000, "y": -0.0123},
87+
{"x": 1711411200000, "y": 0.0145},
88+
{"x": 1711497600000, "y": 0.0087},
89+
{"x": 1711584000000, "y": -0.0187},
90+
{"x": 1711670400000, "y": 0.0234},
91+
{"x": 1711756800000, "y": -0.0089},
92+
{"x": 1711843200000, "y": 0.0156},
93+
{"x": 1711929600000, "y": 0.0098}
94+
]
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
[
2+
{"x": 1420070400000, "y": 345000},
3+
{"x": 1422748800000, "y": 378000},
4+
{"x": 1425168000000, "y": 312000},
5+
{"x": 1427846400000, "y": 389000},
6+
{"x": 1430438400000, "y": 423000},
7+
{"x": 1433116800000, "y": 456000},
8+
{"x": 1435708800000, "y": 398000},
9+
{"x": 1438387200000, "y": 434000},
10+
{"x": 1441065600000, "y": 467000},
11+
{"x": 1443657600000, "y": 412000},
12+
{"x": 1446336000000, "y": 445000},
13+
{"x": 1448928000000, "y": 489000},
14+
{"x": 1451606400000, "y": 523000},
15+
{"x": 1454284800000, "y": 478000},
16+
{"x": 1456790400000, "y": 512000},
17+
{"x": 1459468800000, "y": 545000},
18+
{"x": 1462060800000, "y": 498000},
19+
{"x": 1464739200000, "y": 567000},
20+
{"x": 1467331200000, "y": 589000},
21+
{"x": 1470009600000, "y": 612000},
22+
{"x": 1472688000000, "y": 578000},
23+
{"x": 1475280000000, "y": 634000},
24+
{"x": 1477958400000, "y": 656000},
25+
{"x": 1480550400000, "y": 623000},
26+
{"x": 1483228800000, "y": 667000},
27+
{"x": 1485907200000, "y": 634000},
28+
{"x": 1488326400000, "y": 689000},
29+
{"x": 1491004800000, "y": 712000},
30+
{"x": 1493596800000, "y": 745000},
31+
{"x": 1496275200000, "y": 723000},
32+
{"x": 1498867200000, "y": 756000},
33+
{"x": 1501545600000, "y": 789000},
34+
{"x": 1504224000000, "y": 812000},
35+
{"x": 1506816000000, "y": 778000},
36+
{"x": 1509494400000, "y": 823000},
37+
{"x": 1512086400000, "y": 845000},
38+
{"x": 1514764800000, "y": 867000},
39+
{"x": 1517443200000, "y": 823000},
40+
{"x": 1519862400000, "y": 891000},
41+
{"x": 1522540800000, "y": 912000},
42+
{"x": 1525132800000, "y": 889000},
43+
{"x": 1527811200000, "y": 934000},
44+
{"x": 1530403200000, "y": 956000},
45+
{"x": 1533081600000, "y": 923000},
46+
{"x": 1535760000000, "y": 978000},
47+
{"x": 1538352000000, "y": 945000},
48+
{"x": 1541030400000, "y": 989000},
49+
{"x": 1543622400000, "y": 1012000},
50+
{"x": 1546300800000, "y": 1034000},
51+
{"x": 1548979200000, "y": 998000},
52+
{"x": 1551398400000, "y": 1045000},
53+
{"x": 1554076800000, "y": 1067000},
54+
{"x": 1556668800000, "y": 1089000},
55+
{"x": 1559347200000, "y": 1123000},
56+
{"x": 1561939200000, "y": 1156000},
57+
{"x": 1564617600000, "y": 1134000},
58+
{"x": 1567296000000, "y": 1178000},
59+
{"x": 1569888000000, "y": 1145000},
60+
{"x": 1572566400000, "y": 1189000},
61+
{"x": 1575158400000, "y": 1234000},
62+
{"x": 1577836800000, "y": 1267000},
63+
{"x": 1580515200000, "y": 1198000},
64+
{"x": 1583020800000, "y": 1145000},
65+
{"x": 1585699200000, "y": 1076000},
66+
{"x": 1588291200000, "y": 1234000},
67+
{"x": 1590969600000, "y": 1289000},
68+
{"x": 1593561600000, "y": 1312000},
69+
{"x": 1596240000000, "y": 1345000},
70+
{"x": 1598918400000, "y": 1378000},
71+
{"x": 1601510400000, "y": 1298000},
72+
{"x": 1604188800000, "y": 1345000},
73+
{"x": 1606780800000, "y": 1423000},
74+
{"x": 1609459200000, "y": 1456000},
75+
{"x": 1612137600000, "y": 1398000},
76+
{"x": 1614556800000, "y": 1467000},
77+
{"x": 1617235200000, "y": 1512000},
78+
{"x": 1619827200000, "y": 1534000},
79+
{"x": 1622505600000, "y": 1578000},
80+
{"x": 1625097600000, "y": 1623000},
81+
{"x": 1627776000000, "y": 1645000},
82+
{"x": 1630454400000, "y": 1598000},
83+
{"x": 1633046400000, "y": 1634000},
84+
{"x": 1635724800000, "y": 1689000},
85+
{"x": 1638316800000, "y": 1712000},
86+
{"x": 1640995200000, "y": 1734000},
87+
{"x": 1643673600000, "y": 1689000},
88+
{"x": 1646092800000, "y": 1756000},
89+
{"x": 1648771200000, "y": 1798000},
90+
{"x": 1651363200000, "y": 1823000},
91+
{"x": 1654041600000, "y": 1867000},
92+
{"x": 1656633600000, "y": 1889000},
93+
{"x": 1659312000000, "y": 1923000},
94+
{"x": 1661990400000, "y": 1867000},
95+
{"x": 1664582400000, "y": 1812000},
96+
{"x": 1667260800000, "y": 1889000},
97+
{"x": 1669852800000, "y": 1934000},
98+
{"x": 1672531200000, "y": 1956000},
99+
{"x": 1675209600000, "y": 1923000},
100+
{"x": 1677628800000, "y": 1978000},
101+
{"x": 1680307200000, "y": 2012000},
102+
{"x": 1682899200000, "y": 2034000},
103+
{"x": 1685577600000, "y": 2067000},
104+
{"x": 1688169600000, "y": 2089000},
105+
{"x": 1690848000000, "y": 2123000},
106+
{"x": 1693526400000, "y": 2098000},
107+
{"x": 1696118400000, "y": 2145000},
108+
{"x": 1698796800000, "y": 2178000},
109+
{"x": 1701388800000, "y": 2234000},
110+
{"x": 1704067200000, "y": 2267000},
111+
{"x": 1706745600000, "y": 2198000},
112+
{"x": 1709251200000, "y": 2234000},
113+
{"x": 1711929600000, "y": 2289000},
114+
{"x": 1714521600000, "y": 2312000},
115+
{"x": 1717200000000, "y": 2345000},
116+
{"x": 1719792000000, "y": 2378000},
117+
{"x": 1722470400000, "y": 2412000},
118+
{"x": 1725148800000, "y": 2389000},
119+
{"x": 1727740800000, "y": 2423000},
120+
{"x": 1730419200000, "y": 2467000},
121+
{"x": 1733011200000, "y": 2489000}
122+
]

examples/index.html

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,27 @@ <h3>Dataset Manager</h3>
7070
<div class="dataset-manager" id="line-datasets">
7171
<!-- Dataset items will be added here dynamically -->
7272
</div>
73-
<button id="line-add-dataset">Add Dataset</button>
73+
<div class="dataset-selector">
74+
<h4>Add New Dataset</h4>
75+
<div class="control-row">
76+
<div class="control-group">
77+
<label for="line-dataset-source">Source Dataset</label>
78+
<select id="line-dataset-source">
79+
<option value="timeseries">Time Series Data (Default)</option>
80+
<option value="daily-returns">Daily Returns Data</option>
81+
<option value="monthly">Monthly Time Series Data</option>
82+
</select>
83+
</div>
84+
<div class="control-group">
85+
<label for="line-randomize">Apply Random Variation</label>
86+
<input type="checkbox" id="line-randomize" checked>
87+
</div>
88+
</div>
89+
<div class="dataset-preview" id="line-dataset-preview">
90+
Select a dataset to see preview...
91+
</div>
92+
<button id="line-add-dataset">Add Dataset</button>
93+
</div>
7494

7595
<div class="accordion">
7696
<div class="accordion-header">
@@ -164,7 +184,27 @@ <h3>Dataset Manager</h3>
164184
<div class="dataset-manager" id="bar-datasets">
165185
<!-- Dataset items will be added here dynamically -->
166186
</div>
167-
<button id="bar-add-dataset">Add Dataset</button>
187+
<div class="dataset-selector">
188+
<h4>Add New Dataset</h4>
189+
<div class="control-row">
190+
<div class="control-group">
191+
<label for="bar-dataset-source">Source Dataset</label>
192+
<select id="bar-dataset-source">
193+
<option value="timeseries">Time Series Data (Default)</option>
194+
<option value="daily-returns">Daily Returns Data</option>
195+
<option value="monthly">Monthly Time Series Data</option>
196+
</select>
197+
</div>
198+
<div class="control-group">
199+
<label for="bar-randomize">Apply Random Variation</label>
200+
<input type="checkbox" id="bar-randomize" checked>
201+
</div>
202+
</div>
203+
<div class="dataset-preview" id="bar-dataset-preview">
204+
Select a dataset to see preview...
205+
</div>
206+
<button id="bar-add-dataset">Add Dataset</button>
207+
</div>
168208

169209
<div class="accordion">
170210
<div class="accordion-header">
@@ -215,7 +255,7 @@ <h3>Dataset Manager</h3>
215255
</main>
216256

217257
<footer>
218-
<p>VisionCharts v1.2.0 | MIT License | &copy; 2025 VisionKernel Team</p>
258+
<p>VisionCharts v1.2.1 | MIT License | &copy; 2025 VisionKernel Team</p>
219259
</footer>
220260

221261
<script type="module" src="scripts/script.js"></script>

0 commit comments

Comments
 (0)