Javascript chart example - eclipse-scout

I saw charts in BSI CRM, and they look awesome. I tried to find online tutorial about making own widgets, everyone reported to look at heatmap example code, but it is confusing. Where to start?
But I would like to see a tutorial to show simple chart or any other javascript widget in scout. I need steps where to start..
Is there any tutorial, can someone write it. Only in few lines?
Thanks

To use charts in a Scout application you have to choose a chart library and include it into your project. I’ll give you an example with ChartJS. For you it is probably easiest to look at the commit (link below) to do the same in your project. I’ll write a short cheat sheet on ‘How to integrate ChartJS in Scout applications’ within the next days and link it as soon as it is available.
Depending on what you are using, ScoutJS (JavaScript only) or Scout Classic (Java based application model), the integration of external libraries differs.
ScoutJS:
Commit: 'Added ChartJS example to JSWidgets app.'
Scout Classic:
Commit: 'ChartJS example for classic widget app.'

Related

Drupal D3 module documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am attempting to create some visualisations in Drupal, and found the D3 module. However, I can't find much documentation. Could someone point me in the direction of a guide to using the module, or explain how to use it?
I have installed the module as described here, but I don't know how to get a chart to display on a page (I haven't used Drupal much either).
Basically I would like to know:
How does it work with Drupal?
What all Chart styles does it support?
How does it integrate with Drupal's Views and Panel in terms of generating visuals?
Thanks.
The d3.js module indeed seems to suffer some documentation issues. Moreover it still doesn't have an official release so far (only dev versions). The
d3.js library that this module integrates with seems to become more and more popular.
Refer to the Maintenance Scorecards for over 20 criteria to consider when selecting a module to create charts. By doing so, you might want to consider other charts related modules that can be used for creating charts in Drupal.
The number of reported installs indicate that either the Chart module or the Charts module is often considered as a viable module for creating charts in Drupal. For both modules quite some documentation is available also.
The Chart module's project page contains some information that indicates it is "being depreciated and users are recommended to move over to the Charts module". Though most recently some comments in the chart issue queue contain some details that illustrate that that depreciation is being reconsidered. Refer to that issue queue for more details on that.
If needed, do not hesitate to create an issue in the module's issue queue. As an alternative create a new question on this site (or Drupal Answers) and find a way to let me know about it (eg via some comment in any of my questions or answers around here).
Disclosure: I'm the maintainer of both modules Chart and Charts, and the author of the documentation of charts related modules mentioned in my answer also.
Note: In a future release of the chart module, support for the d3.js (as a charting library) is expected to be added also.
I have downloaded the latest version of the library d3.zip in /sites/all/libraries/d3 and installed the module. Once it is enabled (D3, D3 Views and D3 Examples), you can see in yoursite/examples some examples for the module. With "D3 Views" enabled you have the possibility of setting the format "D3 Visualization" in a view. You can use the view in your page.
Before I have worked creating some graphics with the module forena and the library SVGGraph. It is very well documented.
With d3 I have just started today testing but I got to create a graphic in the view how I told you above.
Good luck!
I have been working with this module myself, lately, and hope to have a live example up soon. As user28577 posted above, you should be able to use D3 Views (following the instructions) to create a view to display one of stock options (such as a bar or pie chart). Depending upon your knowledge of using Views in Drupal, it should be fairly easy to either create a new content type, or use an existing one as a source for your data that will be charted using the D3 module.
One possible reason (since I can't see your issue) you may not be seeing content is how your theme loads external JavaScript. I found this by toggling through different themes in one of my test environments, where some would not load D3 through an external library. Once I downloaded the latest build of D3 and placed it in sites/all/libraries/d3, things worked fine. It also allows development without an internet connection.
Without a good knowledge of the Drupal API, it can be challenging to source your data to chart if building a custom visualization. Although it's not the "Drupal Way", one workaround may be enabling the PHP filter (part of Drupal core), and posting your visualization into an existing content type, such as a basic page. You should be able to view this fine. But keep in mind that all data must be edited manually, and be aware of possible security holes.
I know this is an old thread, but I'd like to add a few things for people continuing to read this.
I apologize for the 'work in progress' documentation, but the
module itself has been a 'work in progress'. The module is now in
alpha1, and so documentation is in the works.
The module takes a completely different approach to
visualizations then that of modules like charts, and
chart. In terms of the API itself, those modules take a more 'php in, js out' approach. That is to say, you build the visualization primarily in php, and the module will handle all the JS for you. What the d3 module does is let you add 'libraries' via the libraries module, which are actual d3 code snippets wrapped in some code that Drupal reads. You can add and remove them much like modules. You can also make libraries dependent on other libraries. These give module developers and d3.js developers the ability to customize and add in any d3.js code because it's not baked into the module. The downside is that there is a little less 'out-of-the-box' magic.
These libraries also have .info files which can contain mapping information to take data from views, for example, and map that data into your d3 drupal library. You then customize that mapping in the views settings.
There are a few libraries that ship with the d3 module, but there will soon be a few larger and extensible repositories of libraries that are Drupal-ready. The idea is that there two huge communities - The Drupal community that builds thousands of modules for use, and the d3.js community that builds thousands of visualizations for use. Those will meet together and all of those libraries will be ready to add to a Drupal site just like you would a module.
Clearly documentation for the D3 module is a "work in progress". You can view the progress here, but it looks like you will need to rely on trial-and-error and results from other community members.
Basically D3 modules provide UI reach visualization of following types
Chord Digram
Force-Directed Graph
Treemap
Scatterplot Matrix
Bubble Chart
Pie Charts / Donut Charts
Multiple Line Graphs
and few more
Through library D3 gets well integrated with Drupal at presentation as well as Business layer. It is always much ahead than Charts module in terms of its styles and usability aspect.
D3 also avails VIEWS style formatters which can applied on the data manipulated through VIEWS and PANEL modules.
Even Visualizations build through D# and Drupal can be available for the DOWNLOAD apart from presenting onto the page.
Please visit - YouTube Video for further information.

Chat for Spring MVC webUI

I am required to show stacked bar chart in my web application. The application uses JSP with spring MVC and mysql as the backend. Please suggest any easy to use charting libraries that I can use. Just have 2 charts completely in the application and hence would be helpful to have a library that would be simple to use and render in my application via my controller api.
Thanks in advance
Well, what you really need is probably a JavaScript library, and your choice will depend on which base library you choose. I have used Dojo in the past, but have recently settled on jQuery. I think jqChart has a stacked bar chart, if I am not mistaken. I am sure there are some open source libraries for jQuery that do charting as well.
Your other option is to generate the chart as an image and post it on your page using straight img tags, but I think that's not a very optimal way of doing things now a days.

Charts and Tabs ASP.NET

I am currently working on a project that is dealing with charts and tabs within an ASP.NET page. I am assigned to create a chart that will be generated from an array and a menu like system using tabs to select different options for the chart.
I have no idea how to implement this, I am using VS Web Developer 2010. I am new to ASP.NET framework and how to implement charts and tabs with this information. Basically it will be a form that the user will submit options and it will calculate a forecast of payments based on the options selected.
Please help, not sure where to even begin with ASP.NET. I have seen some things regarding AJAX controls but for some reason the controls are not loaded into VS.
For charts you can use asp.net chart control
I don't understand the part of the menu, but I think you can use the tabcontrol in the containers section of the toolbox
I'd highly recommend looking at Highcharts. It's a JavaScript library for rendering charts. It will create charts on the client-side so I'm not sure whether it meets your requirements (there are other products that support server-side generation of charts but I'm less familiar with these).
I'm not sure what you mean by using tabs for selecting different options, but Highcharts does have a lot of different rendering models and looks really good.
Take a look at their demo gallery and documentation for more information.
If you are reluctant to use client side charting solutions, try Highcharts.Net. It is a C# wrapper written around the Highcharts JS library. So you write all your code using Classes and objects in C#, and the library translates that into JS.
The added bonus is that you get to use ASP .Net's state management for data persistence. The project also has samples that can be downloaded here.
If you are using MVC, you could try out DotNet.Highcharts along with samples.

Charts generator framework from ASP.NET to HTML5

I'm working in an ASP.NET environment and i'm searching a framework (better if it is open source) which generate INTERACTIVE charts on server side. Since i have to publish this project also for mobile, i'm searching something that produces charts in HTML5.
Anyone could give me a suggestion or links about it?
Thank's so much
Marco
Try out Highcharts .Net (sample website) or DotnetHighcharts. Both are C# wrappers written around the Highcharts charting library.
The original library is in javascript, but both these projects are based entirely on C#, and you dont need to write any javascript code to get charts working. Both have sample projects, in case you are interested, although I think Highcharts .Net is more feature-complete if i'm not mistaken..
If you are looking to use MVC, DotnetHighcharts is the way to go, but if you intend to use webforms, Highcharts dot net handles viewstate for the charts so state management is no longer a headache for you..
It's not exactly what you are looking for, but might fulfil your requirements.
Have to checked out Google Chart Tools? Not to be confused with their infographics api or image charts api.
They will generate HTML5 etc dependant on what browser is used.
And can be considered semi-server-side I suppose, it will generate a portion the markup on Google's server side (n.b. not your server side), though I guessing this will depend on what chart is rendered as some charts will probably be mostly client side. However for any interactive chart a certain amount of clientside technology will be used anyway.
So I suppose it depends on if you mean server-side you mean it is essential it runs on your own server. Running on Google's infrastructure does give you the advantages of a CDN etc so it might outway the need of running on your own server.
You can use Syncfusion HTML5 chart control for your requirement. You can create chart with interactive features such as highlight date points, tooltip, exploded pie, etc., in ASP.NET environment .
Also, The HTML5 chart is using element for chart rendering. So, it is providing effective Client side interaction to the chart control. Please refer the below online document and sample link for HTML5 chart.
Documentation Link:
http://help.syncfusion.com/User%20Interface/ASP.NET/Chart%20in%20HTML5
Sample Link:
http://asp.syncfusion.com/demos/ui/chart/HTML5%20Chart/ChartAdvUserInteraction/HighlightDemo/CS/HighlightDemo.aspx
If you are interested in a commercial tool, I highly recommend Highcharts. We are using it in our commercial application. The pricing model is good--we evaluated it against FusionCharts--and it is very feature-rich, interactive.
Although commercial, you can use Highcharts under a CC license for everything except for-profit commercial apps.
its old link, But Amcharts are good option too. i used with webform and mvc applications and worked great for me.
You can use Shield UI HTML5 chart library, that will suit your requirement. I have tried it in ASP.NET environment and performs pretty well. For some examples please refer hereL https://demos.shieldui.com/aspnet/aspnet-chart/drill-down

d3.js in drupal 7

Has anybody implemented an instance d3.js in drupal 7 successfully?
I plugged in the main d3.js libraries into the page header without problem... but I get all sorts of errors when I try to put code that actually draws something into a page or block...
Somebody managed it with protovis a couple of years ago... http://drupal.org/node/516282#comment-2232740 and i was trying to work along the same lines.
A module package something like the one for http://drupal.org/project/thejit would be a big timesaver.
Thanks for any clues/guidance/examples!
There is a conversation in progress at Drupal.org about this.
And there's a sandbox module in progress that can be grabbed at
git clone http://git.drupal.org/sandbox/asherry/1477334.git d3
D3 is amazing!
A stable D7 module is probably 4+ months away but you never know.
Here are some contributed module suggestions for D7, which may help to use the D3.js library in a Drupal site:
Charts and Graphs (Official release available).
Charts and Graphs is an API for developers. It can be extended by third-party modules that want to add their own charting implementations. It does nothing by itself. It should only be installed if some other module requires it.
D3 (Alfa release only)
creates visualizations as libraries (alpha version only) which allows one to add/remove visualizations, share them between modules, and integrate them with (for example: Views) through library .info files.
The Basic module configuration presentation provide a short intro about how to use the module in combination with Views.
Forena (sandbox only)
Refer to issue # 2383509 for more details.
Knowing what errors you get would definitely help us help you.
One hint : you have to be careful about the way you add your script to prevent namespace problems. Another important thing is the scope your library is using (JQuery, $, etc.) as Drupal includes its stuff in a specific way.
The conversation posted by #ted.strauss is now closed: it is possible to have D3.js directed layout as an engine for graph_api.
The main page for the project d3 for drupal, by asherry is https://drupal.org/project/d3.
As far as I'm concerned chart integration (which doesn't need graph_api but is directly managed by d3 module) works very well.

Resources