Has anyone implemented chartjs into a portlet? I a...
# suitescript
n
Has anyone implemented chartjs into a portlet? I am having issues getting the chart to load
m
How did you import chartjs library?
n
I have a html portlet, so inserting html. I tried and amdconfig file, loading the contents of the chart.min file from the file cabinet and just straight script tags in the html.
e
yes, though it's been years. I have used both highcharts and chartjs in portlets
I have no idea how helpful this will be, because it's 8 years old now, but here's how I did it back then in the Client Script that's attached to a Portlet.
n
@erictgrubaugh yeah i might have to change the portlet type and use form so I can include client scripts and then load html in inlinehtml form field
e
Ah, yes, that is important. My Portlets are NetSuite
Form
objects that attach Client Scripts via the
clientScriptModulePath
property
n
Im gonna try that route, thanks!
e
FWIW Here's the associated portlet
Nothing like digging up your own code from a decade ago ... 😰
n
Haha im blown away you found it that fast, i'd be searching for hours for code from that long ago. i'll let you know
e
source control ftw I suppose
n
For the WIN! Haha annoying how fast that worked.
e
I searched my gitlab for "chart.min" and it worked 😄
n
Changing to form type and running in client script worked great. Thanks for the help
✅ 1