Chart-me brings full featured reporting functionality according to SUCCESS/IBCS into your application. www.hi-chart.com.
To work with Chart-me you can select between 3 methods:
- Using one or more of Chart-me products* and connect your data via XLS/CSV or write your own data connector
- Work with Chart-me Studio* and connect the created projects directly in your application by using the Chart-me URL API
- Include the whole Chart-me functionality as an library directly into your javascript application
* you can host all Chart-me products on any webserver you want.
Chart-me javascript library
The Chart-me API documentation describes how to work with Hi-Chart's Chart-me javascript library.
The library consists of one single minified javascript file added by multiple modules in the modules folder.
There is no need of additional pictures or css files.
Have a look at chartme module
Prerequisites
Before you start with the Chart-me library, please contact the Hi-Charts team to get all necessary files and additional information about the library.
To work with the library you first need to include the following js libraries, which are all free to use for private and commercial cases.
The files will be part of the library package.
- jQuery in version >= 2.0. We recommend jQuery V3.4.1.
- jQuery-UI in version >= 1.0. We recommend jQuery-UI V1.11.4
- !Only for server communication (e.g. for database queries or Chart-me's export functionality) socket.io in version >= 2.0
Only 5 Steps to include the Chart-me javascript library
- Request Hi-Charts team to get an Hi-Chart's Chart-me javascript library package
- Copy the whole Hi-Chart's Chart-me javascript library package into your application in an folder you want.
- Be sure to load the prerequisites files
- Include the chartme.min.js file
- Now you are ready to create new Chart-me applications by using new chartme.app()
- The loaded Chart-me javascript library will create a new global object with the name "chartme". Please notice to not override this namespace.
Example
var cm = new chartme.app({
onReady: function (_ChartmeAPI) {
console.info(_ChartmeAPI);
}
});
Chart-me URL API
It is possible to work with a small REST API of the Chart-me library to bring Chart-me inside an iFrame to the frontend.
The REST API is a simple call of an html-site called iframe.html in the root of the chartme folder.
See the Chart-me URI API Turorial for more informations.
To give the iFrame some informations, you can input some GET paremeters:
| GET parameter | Type | Using |
|---|---|---|
| Viewport | INT | defines the viewport width of the parent element to fit the chart-me application inside the parent container. Empty if no scaling |
| ShowSidebar | INT | 1 = show sidebar, 0 or empty = hide sidebar |
| ShowMenuOnTop | INT | 1 = show menu at the top, 0 or empty = show menu at the bottom |
| ShowLogin | INT | 1 = show login in the menu, 0 or empty = hide login |
| ShowPager | INT | 1 = show pager in the menu, 0 or empty = hide pager |
| ShowFilter | INT | 1 = show filter in the menu, 0 or empty = hide filter |
| ShowExport | INT | 1 = show export in the menu, 0 or empty = hide export |
| ShowXLSExport | INT | 1 = show XLS export in the menu, 0 or empty = hide XLS export |
| ShowXLSImport | INT | 1 = show XLS import in the menu, 0 or empty = hide XLS import |
Communication
To communicate with the iFrame you can use the standard window postMessage method as described here: developer.mozilla.org - Window.postMessage()
- Insert an event listener to the window object
- define a method for the incoming messages
- send messages to the iFrame by using the postMessage method
Here is a list of all messages you can send to the iFrame:
| Function | Paremeters | Type |
|---|---|---|
| New project | type | "newProject" - required |
| Open a project from server | type projectID cmdxfData |
"openProjectFromServer" - required String - ID of the project saved on the Chart-me server - required JSON - CMDXF Data or null for no data |
| Open a project by a string | type projectString cmdxfData |
"openProjectFromString" - required String - String, associated with the Chart-me project - required JSON - CMDXF Data or null for no data |
| Gets the projects saved string | type | "getProjectString" - required |
| set CMDXF data | type cmdxfData |
"setCMDXFData" - required JSON - CMDXF Data - required |
Example
<script>
var initChartme = function(){
// Receive Message
var onPostMessage = function(_Event){
console.info("Message from origin: " + _Event.origin);
console.info(JSON.parse(decodeURIComponent(_Event.data)));
};
window.addEventListener("message", onPostMessage, false);
// Send Message
document.getElementById("cm-chartmeFrame").contentWindow.postMessage(encodeURIComponent(JSON.stringify({
"type": "...",
...
})), "http(s)://orgin");
}
</script>
<iframe id='cm-chartmeFrame' src='https://path-to-chartme/iframe.html?ShowSidebar=1&ShowExport=1&ShowLogin=1' onload='initChartme();'> </iframe>
Legals
Copyright
Chart-me is copyrighted. The licensee acknowledges that the software is a protectable computer programme in the sense of §2 para 1 No. 1, §69 a of the Copyright Act (UrhG) and that the licensor is the originator within the meaning of §§7, 69b UrhG.
Licence
1 Subject of the contract
Hi-Chart shall provide the licensee with modules of the Chart-me DS SAP DesignStudio add-on tested with the available demo version in executable form indefinitely against a one-off reimbursement. Chart-me DS was developed for use in conjunction with SAP DesignStudio (versions 1.5 and 1.6), for which a separate license must be purchased. Chart-me DS is designed exclusively as a complementary feature to SAP DesignStudio.
2 Granting of rights
-
Scope of the right of use to Chart-me DS Hi-Chart grants the licensee a temporally unlimited, simple, non-exclusive right to the use of Chart-me. The licensee is entitled to use Chart-me DS in the intended form with the acquired maximum number of users for their own internal purposes. As users the Contractual Partners designate the number of users who can simultaneously use Chart-me DS ("concurrent users") or the number of users who are entitled by name to access the system ("named user") depending on the chosen licensing method. An acquisition of further rights to the software is excluded. Hi-Chart reserves all publication, reproduction, processing and exploitation rights to the software.
-
Transfer The licensee is entitled to transfer the granted rights of use wholly or partially to group companies. Group companies are all companies, which are included under the statutory provisions in the consolidated financial statements of the licensee. The licensee may use, install, copy, and transfer Chart-me DS only in the intended form. The licensee is not authorised to rent or loan Chart-me, also not in the form of a software leasing.
3 Special restrictions
The licensee is prohibited without the prior written consent of Hi-Chart from modifying or translating the software or creating derivative works from the software. The licensee is not authorised to reverse engineer the software (reverse engineering), nor decompile or disassemble it into its components and use it as a basis for the creation of their own software programmes, based on Chart-me.
4 Term of the contract
The contract runs for an unlimited period; the right of the licensee to use Chart-me DS however expires - also without notice - if the licensee violates a condition of this contract. Upon termination of the right of use, the licensee is obligated to destroy all copies of the software and at the request of the licensor to ensure its complete destruction.
5 Modifications and updates
Hi-Chart is entitled to create updates of the software at its sole discretion. The licensee has no right to carry out any modification or update.
6 Copyright protection
Chart-me DS is copyrighted. The licensee acknowledges that the software is a protectable computer programme in the sense of §2 para 1 No. 1, §69 a of the Copyright Act (UrhG) and that the licensor is the originator within the meaning of §§7, 69 b UrhG.
7 Limitation of liability with exclusion of warranty
No express or implied warranty whatsoever shall be assumed for Chart-me DS and all accompanying files, data and materials, in particular with regard to their merchantability or fitness for a particular purpose. Hi-Chart does not assume any warranty for the use of Chart-me DS as well as for consequences, which result from the use of this software. Hi-Chart does not warrant that Chart-me DS shall function error free or without interruption. It is urgently recommended that Chart-me DS be tested comprehensively with non-critical data in the actual company, as every other software, before its actual deployment. You shall bear the entire risk for the fact that Chart-me DS can be used for the purposes intended by you. Information contained in brochures, announcements, documentation and similar writings represent only descriptions of Chart-me DS and contain no assured characteristics. This also applies to information on the release of updates and extensions. This exclusion of warranty represents a significant part of the license agreement. Hi-Chart is only liable for intent and gross negligence. In case of violation of essential contractual obligations, Hi-Chart is however liable according to the statutory regulations. Hi-Chart is not liable to companies for indirect damage or consequential damage, in particular not for loss of profit, unless this damage is based on the intent of Hi-Chart employees or gross negligence. The use of Chart-me DS in applications or systems in which malfunctions of this software after human discretion and taking into account all circumstances and conditions, under which Chart-me DS is used or will be used, can entail injuries of life, body or health, is prohibited. The use of Chart-me DS in such an environment shall take place exclusively at your own risk and at the risk of the persons affected by it.
8 Miscellaneous
This license agreement represents the full contract between both Parties and supersedes all previous commitments, understandings and agreements. Chart-me DS may only be installed, copied or transferred if the licensee agrees to this license contract in all respects. Provided the licensee has not concluded in writing a contrary agreement with Hi-Chart, the unrestricted acceptance of the terms of this licence contract is confirmed through the installation, use, copying or transfer of this copy of Chart-me.
9 Court of jurisdiction
For this contract, the laws of the Federal Republic of Germany apply. The sole Court of jurisdiction for all disputes arising directly or indirectly from the contractual relationship is Berlin.
10 Severability clause
Should individual provisions of this contract be ineffective or unenforceable or become ineffective or unenforceable after conclusion of the contract, the effectiveness of the rest of the contract shall remain unaffected thereby. In the place of the ineffective or unenforceable provision, an effective and enforceable regulation shall be made whose impact comes closest to the economic objective pursued by the Contracting Parties in the ineffective or unenforceable provision. The preceding provisions shall apply accordingly for the case that loopholes in the contract are revealed.