ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Support for AngularJS
Posted by Rob on Sep-01-2015 01:21
Is it possible to use ChartDirector with AngularJS?  If so are there any examples?

  Re: Support for AngularJS
Posted by Peter Kwan on Sep-01-2015 23:56
Hi Rob,

I have never used AngularJS before. From information on the web, I think it is a client side
framework running on a browser.

On the other hand, ChartDirector runs on the server side. The vast majority of the charting
application would have some server side code. For example, to get data, typically there is
some sort of database (such as MySQL) on the server side, and server side code is needed
to retrieve the data. The server side code can be written in PHP, Java, C#/VB.NET, etc..
ChartDirector, which runs on the server side, can use those data to create charts and send
them to the browser.

I have just brief looked at an AngularJS tutorial page which shows some data in Javascript:

https://docs.angularjs.org/tutorial/step_08

The tutorial does not mention where the data or images are generated in the first place. For
a charting application, I would image instead of using something like ""img/phones/nexus-
s.0.jpg" as the data, it would be something like "img/charts/createBarChart.php?phone=xxx".
In this case, the createBarChart.php would be a PHP script running on the server side,
which generates a chart about the phone xxx (eg. a chart about market share vs time).

So in brief, I think ChartDirector and AngularJS can coexist, just like a database and
AngularJS can coexist. One works on the server side, and one on the client side, and they
together formed the application.

Regards
Peter Kwan

  Re: Support for AngularJS
Posted by Rob on Sep-02-2015 00:36
Thanks Peter, it has been a while since I have used ChartDirector, but that makes sense now. I can create a server side API to call and have it deliver the charts to the application.