Frappe Charts in Page

yeah, alert is working and on page its blank. Just unable to handle success response in console of browser

pls give me your file.

File ?? Are you saying about code. If yes, its the exact same thing you suggested above.

I have no idea about your error.

Along with installing npm, do I need to import it form some other method ?

No need to import or do anything, Frappe import this lib already

The same code worked, reinstalled frappe charts again and restarted supervisorctl and it worked. Thank You

2 Likes

One more thing, I’m having problem with setting the export option in charts.

export(): void
graph.export();

that is what i got in documentation but didn’t get it. Any suggestion ?

on which file import this can you please tell me?

No need to import anything.

1 Like

ok then how to use pie chart in frappe .i am not able to see the pie chart only there
1.Line
2.Bar

above 2 charts are present in my current frappe ,i want to add two more pie and drill how to add these?can you please guide me…

type: 'pie', // or 'bar', 'line', 'pie', 'percentage'

above are the types of chart you can use.

I created an example app that includes frappe-charts on any of your public-facing web pages. Works on version-12. Hope it’s useful.

3 Likes

@rmeyer, does it work for this scenario also, where we want a public dashboard.

Yes, this would probably work for your use case as well. It will require some software development:

  • whitelisted python methods that respond with your public data for a dashboard
  • some JavaScript to define and display the chart (find a code sample for this in the app mentioned above)