Add basic Analytics documentation #951

This commit is contained in:
mauriziovitale84
2016-11-03 10:41:39 +00:00
parent d4d555911a
commit 29cf46212f
3 changed files with 51 additions and 15 deletions

View File

@@ -23,6 +23,31 @@ Also make sure you include these dependencies in your `index.html` file:
<script src="node_modules/chart.js/dist/Chart.bundle.min.js"></script>
```
#### Moment
```sh
npm install moment --save
```
Also make sure you include these dependencies in your `index.html` file:
```html
<script src="node_modules/moment/min/moment.min.js"></script>
```
#### Material Design Date picker
```sh
npm install md-date-time-picker --save
```
Also make sure you include these dependencies in your `index.html` file:
```html
<script src="node_modules/md-date-time-picker/dist/js/mdDateTimePicker.min.js"></script>
```
#### Material Design Lite
The style of this component is based on [material design](https://getmdl.io/), so if you want to visualize it correctly you have to add the material
@@ -41,17 +66,34 @@ Also make sure you include these dependencies in your `index.html` file:
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
```
## Basic usage example Activiti Analytics
## Basic usage example Activiti Analytics List
The component shows the list of all the available reports
```html
<activiti-analytics></activiti-analytics>
<analytics-report-list></analytics-report-list>
```
#### Events
**onSuccess**: The event is emitted when the report list are loaded<br />
**onError**: The event is emitted when an error occur during the loading<br />
**reportClick**: The event is emitted when the report in the list is selected<br />
#### Options
No options.
## Basic usage example Activiti Analytics
The component shows the charts related to the reportId passed as input
```html
<activiti-analytics [appId]="appId" [reportId]="reportId"></activiti-analytics>
```
#### Events
**onSuccess**: The event is emitted when the report parameters are loaded<br />
**onError**: The event is emitted when an error occur during the loading<br />
#### Options
**appId**: The application id<br />
**reportId**: The report id<br />
**debug**: Flag to enable or disable the Form values in the console log<br />
## Build from sources