<!DOCTYPE html> <html> <head> <script src="bar.js"></script> </head> <body> <div id="chart" bar chart here</div> </body> </html>
(function ($) { $(document).ready(function () { var url = Microsoft.Dynamics.NAV.GetImageResource("test.html"); $("#controlAddIn").load(url); Microsoft.Dynamics.NAV.InvokeExtensibilityMethod('Ready', ''); }); })(jQuery); var ControlBusinessGroupsMonthly; ControlBusinessGroupsMonthly=$("ControlBusinessGroupsMonthly");
function GoBusiness (bus, j, s){ var data = [ {label: bus[0], value: s [0] }] for (var i = 1; i < j; i++){ var dataCon = [ {label: bus[i], value: s [i] }]; data= data.concat(dataCon); } // Chart Specifications var targetId = 'chart'; var canvasWidth = 660; var canvasHeight = 500; var chart = new BarChart(targetId, canvasWidth, canvasHeight, data); }