timopu Posted April 8, 2016 Report Share Posted April 8, 2016 Hello, I'm having problems using pictographs, as the cfx.gauge/pictograph.PictoGraph() constructor fails with following error: angular.js:12416 TypeError: this._0_1 is not a function at Object.c [as PictoGraph] (jchartfx.pictograph.js:33) at Object._.extend.instance (gauges.js:211) at Object._.extend.getChartDOMElement (gauges.js:445) at Object.createChart (chartingCommons.js:314) at Object.requestChart (chartingCommons.js:360) at Object.fn (chartingCommons.js:114) at Scope.$digest (angular.js:15753) at Scope.$apply (angular.js:16024) at HTMLSelectElement.<anonymous> (angular.js:28243) at HTMLSelectElement.eventHandler (angular.js:3293) I've included coreVector, coreVector3d, gauges and pictograph js files through require-js. Other gauge types work ok, so what could I be missing here? JChartFX version 7.5.5900.27885 (Full). Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted April 9, 2016 Report Share Posted April 9, 2016 This would be the smallest page using pictograph (a type of gauge, defined inside jchartx.gauge.js) <!DOCTYPE html> <html> <head> <script type="text/javascript" src="../Include/jquery.js"> </script> <script type="text/javascript" src="jchartfx.system.js"> </script> <script type="text/javascript" src="jchartfx.coreVector.js"> </script> <script type="text/javascript" src="jchartfx.gauge.js"> </script> <script type="text/javascript" language="javascript"> $(document).ready(function($) { var pictograph = new cfx.gauge.PictoGraph(); pictograph.getMainMeasure().setValue(3.4); pictograph.getTotal().setValue(10); pictograph.create("myDiv"); }); </script> </head> <body> <div id="myDiv" style="width:600px;height:400px;display:inline-block"></div> </body> </html> If you need a pictobar (a bar chart using pictographs) you would instead do something like this <!DOCTYPE html> <html> <head> <script type="text/javascript" src="../Include/jquery.js"> </script> <script type="text/javascript" src="jchartfx.system.js"> </script> <script type="text/javascript" src="jchartfx.coreVector.js"> </script> <script type="text/javascript" src="jchartfx.pictograph.js"> </script> <script type="text/javascript" language="javascript"> $(document).ready(function($) { var chart1 = new cfx.Chart(); chart1.setDataSource([10,12,14,8]); var pictobar = new cfx.pictograph.PictoBar(); chart1.setGalleryAttributes(pictobar); chart1.create("myDiv"); }); </script> </head> <body> <div id="myDiv" style="width:600px;height:400px;display:inline-block"></div> </body> </html> Hope this helps. JuanC Quote Link to comment Share on other sites More sharing options...
Question
timopu
Hello,
I'm having problems using pictographs, as the cfx.gauge/pictograph.PictoGraph() constructor fails with following error:
JChartFX version 7.5.5900.27885 (Full).
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.