Chart
Direct Subclass:
Base class, which includes common methods for all the charts
Constructor Summary
| Public Constructor | ||
| public | 
       constructor(d: any, config: any) Non-instanciable Chart.  | 
    |
Member Summary
| Public Members | ||
| public | 
       config: *  | 
    |
| public | 
       data: *  | 
    |
| public | 
       datasource: *  | 
    |
| public | 
       dispatcher: *  | 
    |
| public | 
       events: *  | 
    |
Method Summary
| Public Methods | ||
| public | 
       change(property: any, value: any): * Change a configuration property.  | 
    |
| public | 
       download() Make and download an image of the current state of the chart.  | 
    |
| public | 
       draw(data: any) Paint data into the chart.  | 
    |
| public | 
       keepDrawing(datum: any, method: any) This method add a data record / array of data into the current data.  | 
    |
Public Constructors
public constructor(d: any, config: any) source
Non-instanciable Chart. This is the parent class for all the ones (Linechart, Barchart, etc.)
Params:
| Name | Type | Attribute | Description | 
| d | any | Data. This object could be an array of data points or a datasource. Examples: 
//With datasource
var data = {
      endpoint: 'ws://192.168.3.32:3000/barchart'
};
 var dataSource = new proteic.WebsocketDatasource(data);
barchart = new proteic.Barchart(dataSource);
//With data
barchart = new proteic.Barchart([{x:"SP", y:2},{x:"FR", y:6}]);
 | 
    |
| config | any | Configuration of the chart.  | 
    
Public Members
public config: * source
public data: * source
public datasource: * source
public dispatcher: * source
public events: * source
Public Methods
public change(property: any, value: any): * source
Change a configuration property. They all are also available through a method with the same name of the property.
Params:
| Name | Type | Attribute | Description | 
| property | any | property name  | 
    |
| value | any | the new property value  | 
    
Return:
| * | the instance of the current chart  | 
      
public draw(data: any) source
Paint data into the chart. If no data is specified, it takes by default the last dataset (very useful when repaintng charts )
Params:
| Name | Type | Attribute | Description | 
| data | any | Data to be painted  | 
    
public keepDrawing(datum: any, method: any) source
This method add a data record / array of data into the current data.
Params:
| Name | Type | Attribute | Description | 
| datum | any | ||
| method | any |