diff --git a/docs/assets/js/index.js b/docs/assets/js/index.js index 697f1b6..16081e4 100755 --- a/docs/assets/js/index.js +++ b/docs/assets/js/index.js @@ -4,12 +4,13 @@ let bar_data = { "color": "orange", "values": [50804, 10000, 20000, 61500, 82936.88, 24010, 4000, 6000, 25840, 50804.82, 116820, 6000], "formatted": ["₹ 0.00", "₹ 0.00", "₹ 0.00", "₹ 61,500.00", "₹ 82,936.88", "₹ 24,010.00", "₹ 0.00", "₹ 0.00", "₹ 25,840.00", "₹ 5,08,048.82", "₹ 1,16,820.00", "₹ 0.00"], - }, - // { - // "color": "blue", - // "values": [108048, 0, 0, 101500, 50000.88, 24010, 0, 0, 25840, 108048.82, 51682, 0], - // "formatted": ["₹ 0.00", "₹ 0.00", "₹ 0.00", "₹ 61,500.00", "₹ 82,936.88", "₹ 24,010.00", "₹ 0.00", "₹ 0.00", "₹ 25,840.00", "₹ 5,08,048.82", "₹ 1,16,820.00", "₹ 0.00"], - // } + } + , + { + "color": "blue", + "values": [108048, 0, 0, 101500, 50000.88, 24010, 0, 0, 25840, 108048.82, 51682, 0], + "formatted": ["₹ 0.00", "₹ 0.00", "₹ 0.00", "₹ 61,500.00", "₹ 82,936.88", "₹ 24,010.00", "₹ 0.00", "₹ 0.00", "₹ 25,840.00", "₹ 5,08,048.82", "₹ 1,16,820.00", "₹ 0.00"], + } ] } @@ -61,7 +62,7 @@ let more_line_data = { } } -let bar_chart = new FrappeChart ({ +let bar_chart = new frappe.chart.FrappeChart ({ parent: "#charts-1", data: bar_data, type: 'bar', @@ -69,16 +70,32 @@ let bar_chart = new FrappeChart ({ is_navigable: 1 }) -let line_chart = new FrappeChart ({ +let line_chart = new frappe.chart.FrappeChart ({ parent: "#charts-2", data: line_data, type: 'line', - height: 140, - is_navigable: 0 + height: 140 }) bar_chart.parent.addEventListener('data-select', (e) => { line_chart.update_values([more_line_data[e.index]]); }); -console.log("chart", bar_chart); \ No newline at end of file +console.log("chart", bar_chart); + + +// update_test() { +// setTimeout(() => { +// this.update_values([{values: [0, 0, 0, 21500, 50000.88, 24010, 0, 0, 25840, 108048.82, 516820, 0]}, +// {values: [0, 0, 0, 21500, 80000.88, 24010, 20000, 20000, 15840, 508048.82, 116820, 0]}]); +// setTimeout(() => { +// this.update_values([{values: [0, 0, 0, 21500, 80000.88, 24010, 20000, 20000, 15840, 508048.82, 116820, 0]}, +// {values: [0, 0, 0, 21500, 50000.88, 24010, 0, 0, 25840, 108048.82, 516820, 0]}]); +// setTimeout(() => { +// this.update_values([{values: [0, 0, 0, 101500, 50000.88, 24010, 0, 0, 25840, 108048.82, 516820, 0]}, +// {values: [0, 0, 0, 21500, 80000.88, 24010, 20000, 20000, 15840, 508048.82, 116820, 0]}]); + +// }, 300); +// }, 300); +// }, 300); +// } \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 77c8c40..b0c3a0b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -39,155 +39,10 @@ -
- npm install frappe-charts
-
-
-
-
- <script src="frappe-charts.min.js" />
-
-
- <svg id="chart"></svg>
-
-
- var tasks = [
- {
- id: 'Task 1',
- name: 'Redesign website',
- start: '2016-12-28',
- end: '2016-12-31',
- progress: 20,
- dependencies: 'Task 2, Task 3'
- },
- ...
- ]
- var chart = new Chart;
-
-
-