Since 5.0
A datastore-based widget for displaying info about countries on a map with Google GeoChart.
GeoChart widget allows working with data for countries and regions and showing them on a map with the help of Google GeoChart. This widget is based on View and inherits API from DataStore.
Check GeoChart documentation for more details.
var geochart = webix.ui({
view:"geo-chart",
id:"map",
// provide your own Google API key
// https://developers.google.com/maps/documentation/javascript/get-api-key
key:"AIzaSyAi0oVNVO-e603aUY8SILdD4v9bVBkmiTg",
data:[
{id:1, country:'Germany', area:200},
{id:2, country:'United States', area:400},
{id:3, country:'Brazil', area:1000}
]
});
| add | adds an item to the store |
| adjust | adjusts the component to the size of the parent HTML container |
| attachEvent | attaches the handler to an inner event of the component |
| bind | binds components |
| blockEvent | temporarily blocks triggering of ALL events of the calling object |
| callEvent | calls an inner event |
| clearAll | removes all items from the component |
| count | returns the number of currently visible items |
| define | redefines a single configuration property (or a object with properties) |
| destructor | destructs the calling object |
| detachEvent | detaches a handler from an event (which was attached before by the attachEvent method) |
| disable | disables the calling view (makes it dimmed and unclickable) |
| enable | enables the calling view that was disabled by the 'disable' method |
| exists | checks whether an item with the specified ID exists |
| filter | filters the component |
| find | returns all rows that match the criterion, or only the first one |
| getChildViews | returns child views of the calling component |
| getFirstId | returns the ID of the first item |
| getFormView | returns master form for the input |
| getIdByIndex | returns the ID of the item with the specified index |
| getIndexById | returns the index of the item with the specified ID |
| getItem | gets the object of the data item with the specified ID |
| getLastId | returns the ID of the last item |
| getMap | returns a GeoChart map object |
| getNextId | returns the ID of an item that is after the specified item, either directly after or after a number of items (defined by the step) |
| getNode | returns the main HTML container for the calling object |
| getParentView | returns the parent view of the component |
| getPrevId | returns the ID of an item that is before the specified item, either directly before or before a number of items (defined by the step) |
| getTopParentView | returns the top parent view |
| hasEvent | checks whether the component has the specified event handler |
| hide | hides the view |
| isEnabled | checks whether the view is enabled |
| isVisible | checks whether the view is visible |
| load | loads data from an external data source |
| loadNext | sends a request to load the specified number of records to the end of the client-side dataset or to the specified position |
| mapEvent | routes events from one object to another |
| parse | loads data to the component from an inline data source |
| queryView | returns inner element/elements of a widget that correspond(s) to the defined parameters |
| refresh | repaints the whole view or a certain item |
| remove | removes the specified item/items from datastore |
| render | renders a map |
| resize | adjusts the view to a new size |
| serialize | serializes data to an array of JSON objects |
| setDisplayMode | sets the mode of displaying geochart |
| setRegion | defines what area will be displayed on geochart |
| show | makes the component visible |
| sort | sorts datastore |
| sync | allows syncing two copies of data (all or just a part of it) from one DataCollection to another |
| unbind | breaks "bind" link |
| unblockEvent | cancels events blocking that was enabled by the 'blockEvent' command |
| updateItem | updates the data item with new properties |
| waitSave | allows to catch the moment when a data operation was saved to the server |
| onAfterAdd | fires after adding an item to the datastore |
| onAfterDelete | fires after an item is removed |
| onAfterLoad | fires after data loading is complete |
| onAfterScroll | occurs when some webix view has been scrolled |
| onAfterSort | fires after sorting dataset |
| onBeforeAdd | fires before adding an item to the datastore |
| onBeforeDelete | fires before an item is removed |
| onBeforeLoad | fires immediately before data loading has started |
| onBeforeSort | fires before sorting of the dataset |
| onBindRequest | fires when the component is ready to receive data from the master component |
| onBlur | fires when focus is moved out of the view |
| onDataRequest | fires when data from the server is requested for linear data structures (List, DataTable, DataView etc.) to implement dynamic data loading |
| onDataUpdate | fires when a data item is being updated |
| onDestruct | occurs when component destroyed |
| onEnter | fires when the Enter key has been pressed |
| onFocus | fires when a view gets focus |
| onItemClick | fires when a data item is clicked on a map |
| onKeyPress | occurs when keyboard key is pressed for the control in focus |
| onLoadError | fires when an error occurs during data loading (invalid server side response) |
| onLongTouch | fires on holding finger in some position for a certain period of time |
| onMapError | fires when an error occurs while trying to render the chart |
| onMapReady | fires when a chart is ready for external method calls |
| onRegionClick | fires when any region is clicked on a map |
| onSwipeX | occurs on a horizontal swipe movement |
| onSwipeY | occurs on a vertical swipe movement |
| onTabFocus | fires after a tab focus has been changed |
| onTimedKeyPress | fires after typing has been finished in the field |
| onTouchEnd | occurs when the touch event is ended |
| onTouchMove | occurs during touch movement |
| onTouchStart | fires when some webix view has been touched |
| onViewResize | fires when the size of a view has been changed by resizer |
| onViewShow | fires when any hidden view is shown |
| animate | defines the type of animation, with which the view is shown, if it is a Multiview cell |
| borderless | used to hide the component borders |
| chart | the geochart configuration object |
| columns | an array of columns from a data set that should be displayed on a map |
| container | an HTML container (or its ID) where the component should be initialized |
| css | the name of the CSS class or the object with styles that will be applied to the view container |
| data | JavaScript array containing data for the component |
| datathrottle | sets the polling interval (the time period between the completion of a network request and the next request for data) |
| datatype | the type of loaded data |
| disabled | indicates whether an item is enabled |
| gravity | sets the view gravity |
| height | sets the height of the component |
| hidden | defines whether the view will be hidden initially |
| id | the ID of a widget |
| key | sets your application's Google API key |
| keyPressTimeout | a delay between the key press and the action |
| maxHeight | sets the maximum height for the view |
| maxWidth | sets the maximum width for the view |
| minHeight | sets the minimal height for the view |
| minWidth | sets the minimal width for the view |
| on | allows attaching custom handlers to inner events of the component |
| ready | the event handler is called just after the component has been completely initialized |
| removeMissed | defines how to treat items in case of reloading |
| save | defines URLs for data saving |
| scheme | defines schemes for data processing |
| tooltip | specifies a custom tooltip for a chart |
| url | the URL which the component will use to load data after its initialization |
| width | sets the width of a widget |
| $getSize | returns the current size of the component |
| $height | the current height of the view |
| $scope | scope for resolving event and method names |
| $setNode | defines HTML element for the component |
| $setSize | sets the component size |
| $skin | the method which will be called when skin is defined |
| $view | reference to the top HTML element of the view |
| $width | the current width of the view |
| config | all options from the initial component configuration |
| data | inner DataStore |
| name | indicates the name of the component (a read-only property) |
| waitData | eventual result of an asynchronous operation ('promise' object) for the loaded data |