Hello,
I’ve created a page for displaying charts,
i’ve tried some basic js script but its not working/showing anything.
somebody can please take a look and point the error in this,
JS:
frappe.pages['testing-page'].on_page_load = function(wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
title: 'Testing Page',
single_column: true
});
page.add_menu_item('Projects', () => frappe.set_route('List', 'Project'))
const graph = new frappe.ui.Graph({
height: 140,
parent: page.main,
mode: 'line',
x:{
values:['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
y:[{
values:['23','23','23','23','23','23','23','23','23','23','23','23']
}]
});
}
HTML:
<div id="chart"></div>