10-22-2019, 02:00 PM
Yes. You can add arbitrary javascript (and css) in the tactic-conf file, under the install section
<install>
<include_js>
https://cdn.jsdelivr.net/npm/chart.js@2.8.0,
... more js (comma delimited)
</include_js>
<include_css>
... more css
</include_css>
</install>
This will include the listed js and css files so you can basically use any javascript libraries. Unfortunately due to a naming conflict, you can't use jQuery in 4.5 ... this was resolve sometime in 4.6 and definately works in 4.7. This will include the files in all projects. You can also include javascript/css libraries in 4.6 per project using the "project settings" table using "js_libraries" and "css_libraries" keys.
Finally, after looking at Chart.js more closely, it doesn't make any more sense to use the TACTIC internal charts. In 4.7, I have added a drop in replacement using Chart.js (SObjectChartWdg and SObjectCalendarWdg will both use this). I just submitted this and will merge later. I was able to put in a number of other chart types as well, given the flexibility of Chart.js.
<install>
<include_js>
https://cdn.jsdelivr.net/npm/chart.js@2.8.0,
... more js (comma delimited)
</include_js>
<include_css>
... more css
</include_css>
</install>
This will include the listed js and css files so you can basically use any javascript libraries. Unfortunately due to a naming conflict, you can't use jQuery in 4.5 ... this was resolve sometime in 4.6 and definately works in 4.7. This will include the files in all projects. You can also include javascript/css libraries in 4.6 per project using the "project settings" table using "js_libraries" and "css_libraries" keys.
Finally, after looking at Chart.js more closely, it doesn't make any more sense to use the TACTIC internal charts. In 4.7, I have added a drop in replacement using Chart.js (SObjectChartWdg and SObjectCalendarWdg will both use this). I just submitted this and will merge later. I was able to put in a number of other chart types as well, given the flexibility of Chart.js.