KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Using chart created from koolreports in JS #1276

Open ugakr opened this topic on on Jan 27, 2020 - 1 comments

ugakr commented on Jan 27, 2020

I'm having a problem right now where I'm creating a chart via koolreports. I want to do some stuff with the chart, like getting how many slices a pie chart has or what the value is (in js preferably), but I have no idea how to get these properties or how to use my canvas that's rendered in javascript instead of php, since as far as I know theres no way to get or edit these properties with php or koolreport. Is there any way this is possible? For example, how would I say "get slice 2 of this pie chart" or "get bar 1 of this bar chart"; stuff like that. Thanks in advance.

UPDATE: Getting a little closer. I've done $data = $this->dataStore('name'); which does successfully store my chart. I'm just now trying to figure out how to dynamically access the contents of the chart.

ugakr commented on Jan 27, 2020

I've figured out that I need to somehow get the canvas to javascript, but the canvas is a random name each time. Is there any way to change the id of the canvas that koolreport renders, or any way to get javascript to grab one that is rendered?

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None