Wijmo 5version 5.20173.363
Wijmo represents a new generation of JavaScript controls. It takes full advantage of the latest HTML5 technologies, making no compromises to support legacy browsers. The result is a set of controls that are much faster, smaller, and easier to use than what was possible before.
Wijmo has no dependencies other than EcmaScript5. You can use it without jQuery, jQueryUI, or any other frameworks.
Wijmo requires modern browsers (IE9 or better) to leverage the following technologies:
control.value(control.value() + 1) to increment the
value of a property, now you can write control.value++.
The ECMAScript 5 standard adds many other significant enhancements,
like the
bind
method that allows you to specify the value of the 'this'
parameter in your callbacks. There are also new
array methods
that can save a lot of time.We do realize that some scenarios require support for legacy browsers (IE8 and earlier). For that reason, we will continue to maintain versions of the original Wijmo for as long as our customers require it. If you need to support IE8 and earlier, keep using the original Wijmo. We will maintain and support it as usual. If you are ready to move to HTML5 and modern browsers, Wijmo is for you!
This site contains detailed information about Wijmo's APIs. If you are looking for conceptual information and practical examples, please check our LearnWijmo application.
To use Wijmo in your applications, include it by adding a few references to your HTML pages.
The minimal set of files required by any Wijmo application is:
In addition to these, include one or more additional files, depending on which components you use:
As for the actual location of the files, you have two options. You may download Wijmo and copy the required files to the appropriate folders within your application, or you may reference Wijmo files hosted in the cloud, on our Content Delivery Network (CDN). The sections below show examples.
Download the Wijmo files and copy them to a folder within your application. If you place the Wijmo script files in a folder called "scripts/vendors," and the css files in a folder called "styles," you can add the following lines to your HTML pages:
<!-- Wijmo references (required) --> <script src="scripts/vendor/controls/wijmo.min.js"></script> <link href="styles/wijmo.min.css" rel="stylesheet"/> <!-- Wijmo controls (optional, include the controls you need) --> <script src="scripts/vendor/controls/wijmo.grid.min.js"></script> <script src="scripts/vendor/controls/wijmo.chart.min.js"></script> <script src="scripts/vendor/controls/wijmo.input.min.js"></script> <script src="scripts/vendor/controls/wijmo.gauge.min.js"></script> <!-- Wijmo custom theme (optional, include the theme you like) --> <link href="styles/themes/wijmo.theme.modern.min.css" rel="stylesheet"/> <!-- Wijmo custom culture (optional, include the culture you want) --> <script src="scripts/vendor/controls/cultures/wijmo.culture.ja.min.js"></script> <!-- AngularJS and Wijmo directives (optional, use in AngularJS applications) --> <script src="scripts/vendor/angular.min.js"></script> <script src="scripts/vendor/interop/angular/wijmo.angular.min.js"></script>
In this case, there is nothing to download. Simply add the following lines to your HTML pages:
<!-- Wijmo references (required) --> <script src="http://cdn.wijmo.com/5.20142.15/controls/wijmo.min.js"></script> <link href="http://cdn.wijmo.com/5.20142.15/styles/wijmo.min.css" rel="stylesheet"/> <!-- Wijmo controls (optional, include the controls you need) --> <script src="http://cdn.wijmo.com/5.20142.15/controls/wijmo.grid.min.js"></script> <script src="http://cdn.wijmo.com/5.20142.15/controls/wijmo.chart.min.js"></script> <script src="http://cdn.wijmo.com/5.20142.15/controls/wijmo.input.min.js"></script> <script src="http://cdn.wijmo.com/5.20142.15/controls/wijmo.gauge.min.js"></script> <!-- Wijmo custom theme (optional, include the theme you like) --> <link href="http://cdn.wijmo.com/5.20142.15/styles/themes/wijmo.theme.modern.min.css" rel="stylesheet"/> <!-- Wijmo custom culture (optional, include the culture you want) --> <script src="http://cdn.wijmo.com/5.20142.15/controls/cultures/wijmo.culture.ja.min.js"></script> <!-- AngularJS and Wijmo directives (optional, use in AngularJS applications) --> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> <script src="http://cdn.wijmo.com/5.20142.15/interop/angular/wijmo.angular.min.js"></script>
The CDN version includes a Wijmo watermark element at the bottom right of the screen. If you don't want to display the watermark, then you must deploy Wijmo locally as described above.
Note: The order of the references is important. The wijmo.js module must be the first, followed by the control modules, control extensions, and the wijmo.angular module should be included last.
Every Wijmo control is associated with an HTML element that hosts it on the page. To create a control, you start by adding a div element to the page, then use JavaScript code to instantiate the control and bind it to the host element.
For example, this fiddle shows how you can create a FlexGrid and a FlexChart and bind them to a small data source:
The fiddle includes all the necessary references (as described in the Referencing Wijmo in your Applications topic). The HTML part of the fiddle declares two div elements named 'theGrid' and 'theChart':
<h1>Hello</h1> <p>This is a FlexGrid control:</p> <div id="theGrid"></div> <p>And this is a FlexChart:</p> <div id="theChart"></div> <p>That's it for now...</p>
The JavaScript part of the fiddle executes when the document has loaded. It creates a small data set, binds the controls to the div elements, then binds the controls to the data set:
<script id="scriptInit">
onload = function () {
// generate some random data
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','),
data = [];
for (var i = 0; i < countries.length; i++) {
data.push({
country: countries[i],
downloads: Math.round(Math.random() * 20000),
sales: Math.random() * 10000,
expenses: Math.random() * 5000
});
}
// create grid and show data
var grid = new wijmo.grid.FlexGrid('#theGrid', {
itemsSource: data
});
// create a chart and show the same data
var chart = new wijmo.chart.FlexChart('#theChart', {
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads', chartType: wijmo.chart.ChartType.LineSymbols } ]
});
}
</script>
Notice that the size and position of the control are determined by the host element. In this case, we use CSS to set the grid's height to "auto," causing it to automatically size itself to its contents. We also set the max-height value so if there are too many items to fit the space the grid will automatically show scrollbars.
In most cases, you use a CSS framework such as Bootstrap to lay out your pages, and you lay out the controls exactly like any other HTML elements.
You can get a reference to the element that hosts a Wijmo control using the control's hostElement property. You can get a reference to the control being hosted by a given element using the Control.getControl(element) static method.
For more details on control sizing and layout, see the Sizing and Styling Controls topic.
You can use div elements as hosts for all Wijmo controls. Additionally, you can use input elements as hosts for the most input controls, and select elements as hosts for the ListBox, ComboBox, AutoComplete, and Menu controls.
Wijmo controls rely on CSS for styling, appearance, and sizing.
Because of this, Wijmo controls don't have properties such as "width," "height," or "background." Styling and layout is handled using CSS. If you are used to .NET controls, including WinForms and XAML, this may feel a little strange at first. But once you get used to CSS, you will find that it is very easy and extremely powerful. You can easily style all instances of a control type, or style a specific control, all with a few lines of extremely re-usable CSS.
The size and position of the controls are determined by the hosting element, which follows the usual HTML/CSS rules. For example, the CSS rule below stipulates that elements with class "grid" should have their height calculated automatically to fit the grid content, up to a limit of 300 pixels:
.grid {
height: auto;
max-height: 300px;
}
The fiddle below shows how this rule affects two FlexGrid controls. The first grid has only a few items, so it is resized to fit its content (like a regular HTML table). The second grid has a lot more items, so its height is automatically set to 300 pixels and it becomes scrollable.
The first grid has only five elements to show. Since that requires less than 300 pixels, the grid shows all elements and doesn't need scrollbars. The second grid contains 10,000 items. That exceeds 300 pixels, so the grid becomes scrollable.
Control styling follows the same logic as sizing. Use CSS to override fonts, colors, margins, padding, and pretty much any visual aspect of any part of the controls.
For example, this fiddle shows how you can modify the appearance of the FlexGrid control using CSS:
Notice how now the grids now have a plain black and white look. To do this, we change the CSS and specify the styles for elements within the grid. Wijmo controls assign class names to their constituent elements, which enables easy and flexible styling.
For example, the CSS below creates cell elements (elements with class "wj-cell" contained in elements with class "grid") with no border and a white background:
.grid .wj-cell {
border: none;
background-color: #fff;
}
Although the Wijmo controls rely on CSS for layout and sizing, there are a few situations where you may want to use code to get total control of some aspects of a control.
For example, the FlexGrid calculates the row heights based on the font being used to render the control. But you may want to override that CSS-based setting and specify the exact row heights yourself. You can do this by setting the following properties:
// set the height of rows in the scrollable area flex.rows.defaultSize = 34; // set the height of rows in the column header area flex.columnHeaders.rows.defaultSize = 40;
This is shown in the fiddle below, which also uses CSS to achieve a very specific, customized look for the grid. The fiddle uses the "initialized" event to get a reference to the FlexGrid control. This is a convenient way to get a reference to the control when it is created with markup.
CSS pseudo-classes are keywords added to selectors that specifies a special state of the
element to be selected. For example, :hover will apply a style when the user
hovers over the element specified by the selector.
Pseudo-classes are important in forms because they let you apply styles to elements not
only in relation to the content of the document tree, but also in relation to external
factors like whether the element has the focus (:focus) or is in an invalid
state (:invalid).
Some of the standard pseudo-classes are limited in their usefulness because they apply
only to specific elements, and not to the elements ancestors. For example, many Wijmo
input controls contain input elements; when the input elements have the focus,
the inner input element gets the :focus pseudo-class, but the host
element that contains the control does not.
For this reason, Wijmo adds some pseudo-classes of its own to make building effective forms easier:
:empty pseudo-class which
is applied to elements that have no children.The fiddle below shows an example of how you can use the wj-state-focused pseudo-class to apply CSS animations to the thumb element of linear and radial gauges when they get the focus.
HTML5 has an eventing mechanism that works for HTML elements, but cannot be used to add events to arbitrary objects, such as controls and collections.
Because of this, Wijmo defines an Event class that is used for implementing all events for all Wijmo classes. The main differences between Wijmo and HTML events are:
Wijmo events do not replace HTML events. Applications typically use both. HTML events are used to handle mouse and keyboard interactions that target a control's hostElement or elements defined in the control template. Wijmo events are used to handle control-specific events that are not directly related to the DOM. For example, valueChanged or rowAdded.
The example below shows how you can add handlers to HTML and Wijmo events on an InputNumber control using plain JavaScript:
// create the control
var ctl = new wijmo.input.InputNumber('#inputNumber');
// attach a Wijmo event handler
ctl.valueChanged.addHandler(function (s, e) {
console.log('the value has changed to ' + s.value);
});
// attach an HTML event handler
ctl.addEventListener(ctl.hostElement, 'keypress', function(e) {
console.log('you pressed ' + e.charCode);
});
The example above shows the syntax using plain JavaScript. Applications that use frameworks such as Angular, Knockout, Aurelia, or Vue have to use the syntax dictated by the framework.
For example, an Angular 1.x would attach a handler to the valueChanged Wijmo event this way:
<wj-input-number
value-changed="myValueChangedEventHander(s, e)">...
In Angular2, you would do this instead:
<wj-input-number #theControl
(value-changed)="myValueChangedEventHander(theControl, $event)">...
To find out more about HTML and Wijmo events, please see our HTML and Wijmo Events blog and the documentation for the Event class.
Several Wijmo controls have properties that take enumeration values.
For example, the FlexChart's chartType property takes wijmo.chart.ChartType values.
The recommended way to set enumeration properties is as follows:
// setting the value of an enumeration property chart.chartType = wijmo.chart.ChartType.Line;
The following alternatives are also valid and produce the same result:
// wijmo.chart.ChartType.Line has value 3: chart.chartType = 3; // enumerations are automatically parsed chart.chartType = 'Line';
Getting the property will return 3 in all cases. If you want to get the value as a string (to show in the UI for example), you can do it as follows:
// getting the enumerated value as a number console.log(chart.chartType); // outputs "3" // getting the enumerated value as a string console.log(wijmo.chart.ChartType[chart.chartType]); // outputs "Line"
You can use the enumeration classes to convert between strings and the corresponding numbers by indexing. For example:
// convert enumeration value to string console.log(wijmo.chart.ChartType[3]); // outputs "Line" console.log(wijmo.chart.ChartType[1000]); // outputs "null" // convert string to enumeration value console.log(wijmo.chart.ChartType['Line']); // outputs "3" console.log(wijmo.chart.ChartType['NoSuchValue']); // outputs "null"
The .NET, Enum class provides methods called GetNames and GetValues that return the names and values defined by any enumeration.
The code below shows how you could implement similar methods to get the names and values defined by TypeScript enumerations (as used in Wijmo):
// get the names defined by an enumeration
function getEnumNames(enumClass) {
var names = [];
for (var key in enumClass) {
var val = parseInt(key);
if (isNaN(val)) names.push(key);
}
return names;
}
// get the values defined by an enumeration
function getEnumValues(enumClass) {
var values = [];
for (var key in enumClass) {
var val = parseInt(key);
if (!isNaN(val)) values.push(val);
}
return values;
}
// sample usage:
var nn = getEnumNames(wijmo.DataType); // returns [ 'Object', 'String', 'Number', 'Boolean', 'Array' ]
var vv = getEnumValues(wijmo.DataType); // returns [ 0, 1, 2, 3, 4 ]
By default, Wijmo formats and parses data using the American English culture. The decimal symbol is a period, the thousand separator is a comma, and the days of the week are "Sunday" through "Saturday".
If your application targets other cultures, include references to the appropriate Wijmo culture files in your HTML pages. Wijmo includes over 40 culture files (see complete list below), and we have tools for generating new ones. If you want to target a culture that is not currently supported, contact us and we will create the file you need.
For example, to localize an application for the German culture, add this line to the head section of the page:
<!-- set German culture --> <script src="http://cdn.wijmo.com/5.latest/controls/cultures/wijmo.culture.de.min.js"> </script>
This fiddle demonstrates the result. Notice the formatting of grid values and calendar dates.
You can edit the values in the grid to see that globalization also works for parsing data. Wijmo's Globalize class allows you to format and parse values in your applications outside of Wijmo controls as well.
By default, Wijmo uses the American English culture, but for your convenience,
we have included several other cultures. They are located on the CDN, but you
can also find the files in your installation folder in
\Dist\controls\cultures.
The following cultures are currently included.
The wijmo.css file includes several glyphs defined as pure CSS. The glyphs are used by the Wijmo controls and extensions, and your applications may also use them.
Using CSS to define glyphs eliminates the need to deploy extra font or image files, and ensures the images are rendered using the foreground color and font size defined by the current theme.
To use Wijmo glyphs in your applications, add a span element to your markup and set its class to the glyph name. For example:
<span class="wj-glyph-diamond"></span>
You can use CSS to customize the appearance of the glyphs used in the Wijmo controls. For example, you could use the CSS below to hide or modify the appearance of the pencil glyph used by the FlexGrid to indicate rows in edit mode:
/* hide the pencil glyph in FlexGrid controls */
.wj-flexgrid .wj-glyph-pencil {
display: none;
}
/* replace the pencil glyph in FlexGrid controls with a custom image */
.wj-flexgrid .wj-glyph-pencil {
background-image:url('../images/my-pencil.png');
background-repeat: round;
border: 0;
opacity: 1;
}
.wj-flexgrid .wj-glyph-pencil:after {
display: none;
}
The table below shows the glyphs defined in the wijmo.css file:
| Name | Glyph | Markup |
|---|---|---|
| asterisk | <span class="wj-glyph-asterisk"></span> |
|
| calendar | <span class="wj-glyph-calendar"></span> |
|
| check | <span class="wj-glyph-check"></span> |
|
| circle | <span class="wj-glyph-circle"></span> |
|
| clock | <span class="wj-glyph-clock"></span> |
|
| diamond | <span class="wj-glyph-diamond"></span> |
|
| down | <span class="wj-glyph-down"></span> |
|
| down-left | <span class="wj-glyph-down-left"></span> |
|
| down-right | <span class="wj-glyph-down-right"></span> |
|
| file | <span class="wj-glyph-file"></span> |
|
| filter | <span class="wj-glyph-filter"></span> |
|
| left | <span class="wj-glyph-left"></span> |
|
| minus | <span class="wj-glyph-minus"></span> |
|
| pencil | <span class="wj-glyph-pencil"></span> |
|
| plus | <span class="wj-glyph-plus"></span> |
|
| right | <span class="wj-glyph-right"></span> |
|
| square | <span class="wj-glyph-square"></span> |
|
| step-backward | <span class="wj-glyph-step-backward"></span> |
|
| step-forward | <span class="wj-glyph-step-forward"></span> |
|
| up | <span class="wj-glyph-up"></span> |
|
| up-left | <span class="wj-glyph-up-left"></span> |
|
| up-right | <span class="wj-glyph-up-right"></span> |
IntelliSense is one of the best features in Visual Studio and VSCode. It saves typing effort, reduces errors, and helps you learn or remember object models as you work.
IntelliSense works great with TypeScript, but it is somewhat limited with JavaScript. You do get basic support for the language features, but external libraries are not supported unless you specify the custom definition files.
Starting with our 2016/V2 release, we are providing IntelliSense definition files for the entire Wijmo library. Simply install these files and you get full IntellliSense support when writing JavaScript code with Wijmo.
To install the Wijmo IntelliSense definition file in Visual Studio, you will need the "wijmo.intellisense.js" file. You can find this file in the Wijmo distribution under the "IntelliSense" folder:
C1Wijmo-Enterprise_5.xxxxx.xxx.zip
Dist
IntelliSense
readme.txt
wijmo.intellisense.js
Samples
VSTemplates
Perform the following steps to install the Wijmo IntelliSense definition file in Visual Studio:
Tools|Options|Text Editor|JavaScript|IntelliSense|References
Implicit (Web)
The image below shows the dialog:
To install the Wijmo IntelliSense definitions in VS Code, you will need the TypeScript definition files ("*.d.ts"). You can find these files in the Wijmo distribution under the "Controls" folder:
C1Wijmo-Enterprise_5.xxxxx.xxx.zip
Dist
controls
wijmo.d.ts
wijmo.input.d.ts
wijmo.grid.d.ts
…
IntelliSense
Samples
VSTemplates
Copy the "*.d.ts" files to a folder under your VSCode project root. If the project has a "jsconfig.json" configuration file, make sure the "*.d.ts" files are included. For example:
"files": [
"typings/wijmo.d.ts",
"typings/wijmo.input.d.ts",
"typings/wijmo.grid.d.ts",
…
]
Alternatively, you can specify the "*.d.ts" files by adding reference comments at the top of your "js" files. For example:
/// <reference path="typings/wijmo.d.ts" />
Once the Wijmo IntelliSense definition file has been installed, you will be able to search and explore the object model of any Wijmo class as you write JavaScript code. The image below shows an example:
We at ComponentOne are big fans of AngularJS, Google's framework for JavaScript applications. AngularJS provides templating, data-binding, MVVM, web components, and more.
One of the main advantages of AngularJS is that it supports the MVVM pattern, where the application logic is contained in Models (aka controllers, implemented in JavaScript) and the appearance is contained in Views (HTML).
To achieve this, AngularJS supports directives, which are custom HTML elements and attributes. AngularJS ships with a number of built-in directives, and you can easily implement your own much as you can create your own controls in WinForms or XAML applications.
Wijmo ships with AngularJS directives for all its controls. The directives are defined in the wijmo.angular.js file, and allow you to write code such as:
<div ng-app="app" ng-controller="appCtrl">
<p>This is a <b>FlexGrid</b> control:</p>
<wj-flex-grid items-source="data">
<wj-flex-grid-column header="Country" binding="country"></wj-flex-grid-column>
<wj-flex-grid-column header="Sales" binding="sales"></wj-flex-grid-column>
<wj-flex-grid-column header="Expenses" binding="expenses"></wj-flex-grid-column>
<wj-flex-grid-column header="Downloads" binding="downloads"></wj-flex-grid-column>
</wj-flex-grid>
</div>
If you want to use Wijmo Angular directives in your project, add references to AngularJS, Wijmo, and then to Wijmo's AngularJS directives, as described in the Referencing Wijmo in Your Applications topic.
Once you have the references in place, tell AngularJS that your app depends on the "wj" module using code like this:
var app = angular.module('app', ['wj']);
With the app defined, you can go on to add a controller to provide data and logic as you would with any AngularJS application.
All Wijmo directives start with the "wj" prefix, followed by the control's class name using dashes instead of camel-case. The directives have attributes that match the control's properties, following the same convention.
Some of the directives support nested sub-directives. For example, the wj-flex-grid directive may contain one or more wj-flex-grid-column directives, and the wj-flex-chart directive may contain one or more wj-flex-chart-series directives. This results in a rich and expressive markup syntax that is very similar to XAML. This flexibility is essential in order to achieve the true benefits of MVVM. The appearance and layout of the controls are defined by the view; the controller only provides the data.
The fiddle below shows how this works:
For more examples that use Wijmo with AngularJS, see our Demos.
Note This description pertains to new external Wijmo core library modules introduced after build 211. This is a recommended way of Wijmo interop for Angular 2 usage. A description based on global Wijmo core library modules can be found here.
Wijmo components for Angular 2 allow you to use Wijmo controls in Angular 2 templates markup. In terms of the TypeScript class inheritance feature, Wijmo Angular 2 components "extend" the control classes they represent. This means that when you acquire a reference to a Wijmo component, the referenced instance is a Wijmo control with all its properties, events and methods, and an Angular 2 component at the same time. A Wijmo component extends a control class and adds the necessary functionality that allows the control to be used in the Angular 2 template markup, with the fully functional one-way and two-way property bindings and event bindings. This integration is smooth, as all the players, Wijmo controls, Wijmo Angular 2 components and Angular 2 itself are written in the same TypeScript language.
Wijmo Angular 2 components are shipped as a set of modules, one module per core library module, with the "angular2" word in their names. For example, "wijmo.angular2.grid.js" module represents components for controls from the core "wijmo.grid.js" module. Module files are located in subfolders of the NpmImages folder of Wijmo download zip. Each subfolder provides modules in a certain module format, like CommonJS or AMD, and is effectively an npm image that can be installed into your application using "npm install <path to subfolder>" command. Refer to the accompanying readme.txt files in these folders for more details.
All Wijmo modules should be imported using their ambient names, which are module names prefixed with "wijmo/", and without ".js" extension. For example, this import statement imports the content of the "wijmo.angular2.grid.js" module:
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
Wijmo is not represented in npm registry. Instead, we ship npm images of Wijmo external modules in the NpmImages folder of Wijmo download zip, where the library can be installed from, using the conventional npm installation means ("npm install <path_to_folder>" command or a record in the "dependencies" option of the application's package.json file).
The NpmImages folder contains subfolders like wijmo-amd-min, wijmo-commonjs-min and wijmo-system-min, which are standalone npm images representing Wijmo modules in different module formats (AMD, CommonJS and System respectively).
A choice of a module format to use depends on the module loader and/or bundler tools that you use in your application. AMD and CommonJS formats will work in most cases.
So, you can install Wijmo into your application using "npm install <path_to_folder>" command in NodeJS command prompt, like this:
npm install ../wijmo_download/NpmImages/wijmo-amd-minThis command will add the folder content to the node_modules/wijmo folder of your application.
Alternatively, you can add the following record to the package.json file of your application:
"dependencies": {
"wijmo": "../wijmo_download/NpmImages/wijmo-amd-min",
… other libraries
}
After that, each time you execute "npm install" command in your application root folder,
Wijmo modules will be installed under the "node_modules" folder along with another libraries
enumerated in package.json.
With this setup, you may import Wijmo Angular 2 modules and use the components and directives they contain. For example, this code adds a WjFlexGrid component to MyCmp component's template, with the flex property containing a reference to the added grid:
import { Component, NgModule, ViewChild } from '@angular/core';
import { WjGridModule, WjFlexGrid } from 'wijmo/wijmo.angular2.grid';
@Component({
template: '<wj-flex-grid #flex [itemsSource]="data"></wj-flex-grid>',
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
@ViewChild('flex') flex: WjFlexGrid;
}
@NgModule({
imports: [WjGridModule, BrowserModule],
declarations: [MyCmp]
})
export class MyModule {
}
Every Wijmo for Angular 2 JavaScript module contains an Angular 2 NgModule that exports all the components in the module. To use any of these components in your NgModule components' templates, you just need to add a reference to Wijmo NgModule to the imports metadata property of your NgModule decorator.
A name of NgModule is constructed from its JavaScript module name using the following schema:
Wj<JS module name without wijmo.angular2 prefix>Module
For example, WjInputModule NgModule for wijmo.angular2.input JavaScript module, or WjGridFilterModule NgModule for wijmo.angular2.grid.filter JavaScript module.
Wijmo components for Angular 2 are intended for a usage in templates markup. If you want to create a Wijmo control in code, you should use a Wijmo control from a core module for this purpose, instead of a component. A core module has the same name as a corresponding Angular 2 interop module, but without the "angular2" word in the name. For example, this code creates a FlexGrid control in code:
import { FlexGrid } from 'wijmo/wijmo.grid';
let flex = new FlexGrid('#host_element');
Note that we import FlexGrid control instead of WjFlexGrid component, and import it from the 'wijmo/wijmo.grid' module instead of 'wijmo/wijmo.angular2.grid'.
Let's consider specifics of adapting Wijmo to most popular module loaders and bundlers.
The only additional step required here is to include Wijmo css (the Dist/styles/wijmo.min.css file from Wijmo download zip) in a bundle. You should copy this file somewhere under the application's root and include it using standard WebPack means that you use for your own application's css:
import 'style!css!../styles/vendor/wijmo.min.css';
The style-loader and css-loader should be added to the "devDependencies" option of your
application's package.json file:
"devDependencies": {
"css-loader": "^0.23.1",
"style-loader": "^0.13.1",
... another libraries
}
You have to map Wijmo ambient module names to Wijmo .js files in the node_modules folder, by adding the following config options that you pass to the System.config method call:
map: {
'wijmo': 'node_modules/wijmo'
},
packages: {
'wijmo': {
defaultExtension: 'js'
}
}
The only additional step required here is to include Wijmo css (the Dist/styles/wijmo.min.css file from Wijmo download zip) in a bundle. You should copy this file somewhere under the application's root and include it using standard Angular CLI means that you use for your own application's css, namely by adding a reference to this file to the application's angular-cli.json file:
"apps": [
{
"styles": ["../styles/vendor/wijmo.min.css"],
}
],
... other options
Refer to the Angular 2 Markup Syntax topic for the description.
LESS is a dynamic style sheet language that extends CSS through the addition of variables, mixins, operations and nested rules.
LESS is also referred to as a CSS preprocessor because you can write style sheets in the extended LESS language first, and then compile them into plain CSS. LESS is open-source and you can run it on the client-side or server-side, or compile it and output it as plain CSS.
For downloads, detailed documentation, and resources, see the LESS web site: http://lesscss.org.
You can use LESS from the command line, download it as a JS file for in-browser use, or use a third party application.
Command line
You can find specific instructions and a list of command-line prompts on the LESS web site under Command Line Usage.
In-browser
<link rel="stylesheet/less" href="styles.less"> <script src="less.js"></script>
Note: In the link element, you must replace the typical rel="stylesheet" with rel="stylesheet/less" in order for LESS to compile in the browser. LESS style sheets must come before the LESS script.
When the page loads, less.js processes and compiles your LESS code live in the browser. While this is a convenient way to start developing with LESS, it is not recommended in production environments where performance is important.
Third party applications
It is advisable to compile LESS into plain CSS for production environments. If you want something more than the command line prompts offer, a wide array of third party tools is available. The LESS web site has a list of compilers and editors for various platforms and IDEs. See Online LESS Compilers.
We built Wijmo themes with LESS and make the source files available along with their compiled CSS counterparts. You can update existing themes and create new ones using the provided files.
The Wijmo themes have this file naming structure: wijmo.theme.ThemeName.css. To update a theme using LESS, find the corresponding wijmo.theme.ThemeName.less file, modify it, and re-compile it using one of the methods listed above.
Every theme is built upon a base set of colors and style options. We declare variables for these common values that we reuse throughout the theme. Note that LESS variables start with the @ symbol.
@background: #f3f3f3; @header: #54443b; @primary: #2780ec; @text: #26211f; @button: #5f534c; @tool-tip: #e5d9cf; @grid-cell-border: true; @grid-right-side-col: none; @border-radius: 4px; @background-grad: false; @button-grad: false; @header-grad: false;
In addition to base variables, we use import statements to include additional LESS files to use as mixins. These contain color functions, style mixins, and mixin guards.
@import "mixins/color-functions"; @import "mixins/guards"; @import "mixins/styles"; @import "mixins/chart";
The color functions generate a wider pallet of additional colors based on the initial colors selected and the mixin guards are designed to ensure contrast. The mixin guards evaluate colors based on their lightness and write CSS accordingly: If an area's background color is greater than 50% in lightness, the text in that area renders in a darker color, and vice versa.
You can create new themes by duplicating an existing theme and then modifying the base set of colors and style options. Here is a key to the color and style variables.
@background - Background color for the control.
@header - Background color for control headers (e.g. FlexGrid, FlexChart).
@primary - Primary accent color used throughout the theme.
@text - Default text color.
@button - Background color for buttons.
@tool-tip - Background color for tooltips.
@border-radius - Global border radius setting for all controls.
@grid-cell-border - Toggle for FlexGrid cell borders. Set to 'false' to turn off all grid borders.
@grid-left-side-col - Background color for the FlexGrid's row header cells (same as @header by default).
@background-grad - Toggle for control background color gradient. Set to 'true' to add a gradient.
@button-grad - Toggle for button background color gradient. Set to 'true' to add a gradient.
@header-grad - Toggle for header background color gradient. Set to 'true' to add a gradient.
Once you create a new theme and output it as plain CSS, place it in the styles directory and include it in your project. Now you can link to it from any HTML page that contains Wijmo controls.
<link href="styles/NewTheme.css" rel="stylesheet">
Gets or sets an object that contains all localizable strings in the Wijmo library.
The culture selector is a two-letter string that represents an ISO 639 culture.
addClass(e: Element, className: string): void
Adds a class to an element.
Element that will have the class added.
Class to add to the element.
animate(apply: Function, duration?: Control, step?: Control): any
Calls a function on a timer with a parameter varying between zero and one.
Use this function to create animations by modifying document properties or styles on a timer.
For example, the code below changes the opacity of an element from zero to one in one second:
var element = document.getElementById('someElement');
animate(function(pct) {
element.style.opacity = pct;
}, 1000);
The function returns an interval ID that you can use to stop the animation. This is typically done when you are starting a new animation and wish to suspend other on-going animations on the same element. For example, the code below keeps track of the interval ID and clears if before starting a new animation:
var element = document.getElementById('someElement');
if (this._animInterval) {
clearInterval(this._animInterval);
}
var self = this;
self._animInterval = animate(function(pct) {
element.style.opacity = pct;
if (pct == 1) {
self._animInterval = null;
}
}, 1000);Callback function that modifies the document. The function takes a single parameter that represents a percentage.
The duration of the animation, in milliseconds.
The interval between animation frames, in milliseconds.
asArray(value: any, nullOK?: boolean): any[]
Asserts that a value is an array.
Value supposed to be an array.
Whether null values are acceptable.
asBoolean(value: boolean, nullOK?: boolean): boolean
Asserts that a value is a Boolean.
Value supposed to be Boolean.
Whether null values are acceptable.
asCollectionView(value: any, nullOK?: boolean): ICollectionView
Asserts that a value is an ICollectionView or an Array.
Array or ICollectionView.
Whether null values are acceptable.
asDate(value: Date, nullOK?: boolean): Date
Asserts that a value is a Date.
Value supposed to be a Date.
Whether null values are acceptable.
asEnum(value: number, enumType: any, nullOK?: boolean): number
Asserts that a value is a valid setting for an enumeration.
Value supposed to be a member of the enumeration.
Enumeration to test for.
Whether null values are acceptable.
asFunction(value: any, nullOK?: boolean): Function
Asserts that a value is a function.
Value supposed to be a function.
Whether null values are acceptable.
asInt(value: number, nullOK?: boolean, positive?: boolean): number
Asserts that a value is an integer.
Value supposed to be an integer.
Whether null values are acceptable.
Whether to accept only positive integers.
asNumber(value: number, nullOK?: boolean, positive?: boolean): number
Asserts that a value is a number.
Value supposed to be numeric.
Whether null values are acceptable.
Whether to accept only positive numeric values.
assert(condition: boolean, msg: string): void
Throws an exception if a condition is false.
Condition expected to be true.
Message of the exception if the condition is not true.
asString(value: string, nullOK?: boolean): string
Asserts that a value is a string.
Value supposed to be a string.
Whether null values are acceptable.
asType(value: any, type: any, nullOK?: boolean): any
Asserts that a value is an instance of a given type.
Value to be checked.
Type of value expected.
Whether null values are acceptable.
changeType(value: any, type: DataType, format: string): any
Changes the type of a value.
If the conversion fails, the original value is returned. To check if a conversion succeeded, you should check the type of the returned value.
Value to convert.
DataType to convert the value to.
Format to use when converting to or from strings.
clamp(value: number, min: number, max: number): number
Clamps a value between a minimum and a maximum.
Original value.
Minimum allowed value.
Maximum allowed value.
closest(e: any, selector: string): Node
Finds the closest ancestor (including the original element) that satisfies a selector.
Element where the search should start.
A string containing a selector expression to match elements against.
closestClass(e: any, className: string): Node
Finds the closest ancestor (including the original element) that satisfies a class selector.
Element where the search should start.
A string containing class name to match elements against.
contains(parent: any, child: any): boolean
Checks whether an HTML element contains another.
Parent element.
Child element.
copy(dst: any, src: any): void
Copies properties from an object to another.
This method is typically used to initialize controls and other Wijmo objects by setting their properties and assigning event handlers.
The destination object must define all the properties defined in the source, or an error will be thrown.
The destination object.
The source object.
createElement(html: string, appendTo?: HTMLElement): HTMLElement
Creates an element from an HTML string.
HTML fragment to convert into an HTMLElement.
Optional HTMLElement to append the new element to.
enable(e: HTMLElement, value: boolean): void
Enables or disables an element.
Element to enable or disable.
Whether to enable or disable the element.
escapeHtml(text: string): void
Escapes a string by replacing HTML characters as text entities.
Strings entered by uses should always be escaped before they are displayed in HTML pages. This ensures page integrity and prevents HTML/javascript injection attacks.
Text to escape.
format(format: string, data: any, formatFunction?: Function): string
Replaces each format item in a specified string with the text equivalent of an object's value.
The function works by replacing parts of the formatString with the pattern '{name:format}' with properties of the data parameter. For example:
var data = { name: 'Joe', amount: 123456 };
var msg = wijmo.format('Hello {name}, you won {amount:n2}!', data);
The format function supports pluralization. If the format string is a JSON-encoded object with 'count' and 'when' properties, the method uses the 'count' parameter of the data object to select the appropriate format from the 'when' property. For example:
var fmt = {
count: 'count',
when: {
0: 'No items selected.',
1: 'One item is selected.',
2: 'A pair is selected.',
'other': '{count:n0} items are selected.'
}
}
fmt = JSON.stringify(fmt);
console.log(wijmo.format(fmt, { count: 0 })); // No items selected.
console.log(wijmo.format(fmt, { count: 1 })); // One item is selected.
console.log(wijmo.format(fmt, { count: 2 })); // A pair is selected.
console.log(wijmo.format(fmt, { count: 12 })); 12 items are selected.
The optional formatFunction allows you to customize the content by providing context-sensitive formatting. If provided, the format function gets called for each format element and gets passed the data object, the parameter name, the format, and the value; it should return an output string. For example:
var data = { name: 'Joe', amount: 123456 };
var msg = wijmo.format('Hello {name}, you won {amount:n2}!', data,
function (data, name, fmt, val) {
if (wijmo.isString(data[name])) {
val = wijmo.escapeHtml(data[name]);
}
return val;
}
);A composite format string.
The data object used to build the string.
An optional function used to format items in context.
getActiveElement(): void
Gets a reference to the element that contains the focus, accounting for shadow document fragments.
getAggregate(aggType: Aggregate, items: any[], binding?: string): void
Calculates an aggregate value from the values in an array.
Type of aggregate to calculate.
Array with the items to aggregate.
Name of the property to aggregate on (in case the items are not simple values).
getElement(selector: any): HTMLElement
Gets an element from a jQuery-style selector.
An element, a query selector string, or a jQuery object.
getElementRect(e: Element): Rect
Gets the bounding rectangle of an element in page coordinates.
This is similar to the getBoundingClientRect function, except that uses viewport coordinates, which change when the document scrolls.
getType(value: any): DataType
Gets the type of a value.
Value to test.
getUniqueId(baseId: string): string
Creates a new unique id for an element by adding sequential numbers to a given base id.
String to use as a basis for generating the unique id.
getVersion(): string
Gets the version of the Wijmo library that is currently loaded.
hasClass(e: Element, className: string): boolean
Checks whether an element has a class.
Element to check.
Class to check for.
hasItems(value: ICollectionView): boolean
Checks whether an ICollectionView is defined and not empty.
ICollectionView to check.
hidePopup(popup: HTMLElement, remove?: boolean, fadeOut?: boolean): void
Hides a popup element previously displayed with the showPopup method.
Popup element to hide.
Whether to remove the popup from the DOM or just to hide it.
Whether to use a fade-out animation to make the popup disappear gradually.
httpRequest(url: string, settings?: any): XMLHttpRequest
Performs HTTP requests.
String containing the URL to which the request is sent.
An optional object used to configure the request.
The settings object may contain the following:
| method | The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). The default is "GET". |
| data | Data to be sent to the server. It is appended to the url for GET requests, and converted to a string for other requests. |
| async | By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. |
| success | A function to be called if the request succeeds. The function gets passed a single parameter of type XMLHttpRequest. |
| error | A function to be called if the request fails. The function gets passed a single parameter of type XMLHttpRequest. |
| complete | A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed a single parameter of type XMLHttpRequest. |
| beforeSend | A function to be called immediately before the request us sent. The function gets passed a single parameter of type XMLHttpRequest. |
| requestHeaders | A JavaScript object containing key/value pairs to be added to the request headers. |
| user | A username to be used with XMLHttpRequest in response to an HTTP access authentication request. |
| password | A password to be used with XMLHttpRequest in response to an HTTP access authentication request. |
Use the success to obtain the result of the request which is provided in the callback's XMLHttpRequest parameter. For example, the code below uses the httpRequest method to retrieve a list of customers from an OData service:
wijmo.httpRequest('http://services.odata.org/Northwind/Northwind.svc/Customers?$format=json', {
success: function (xhr) {
var response = JSON.parse(xhr.response),
customers = response.value;
// do something with the customers...
}
});isArray(value: any): boolean
Determines whether an object is an Array.
Value to test.
isBoolean(value: any): boolean
Determines whether an object is a Boolean.
Value to test.
isDate(value: any): boolean
Determines whether an object is a Date.
Value to test.
isFunction(value: any): boolean
Determines whether an object is a function.
Value to test.
isInt(value: any): boolean
Determines whether an object is an integer.
Value to test.
isNullOrWhiteSpace(value: string): boolean
Determines whether a string is null, empty, or whitespace only.
Value to test.
isNumber(value: any): boolean
Determines whether an object is a number.
Value to test.
isObject(value: any): boolean
Determines whether a value is an object (as opposed to a value type, an array, or a Date).
Value to test.
isPrimitive(value: any): boolean
Determines whether an object is a primitive type (string, number, Boolean, or Date).
Value to test.
isString(value: any): boolean
Determines whether an object is a string.
Value to test.
isUndefined(value: any): boolean
Determines whether an object is undefined.
Value to test.
mouseToPage(e: any): Point
Converts mouse or touch event arguments into a Point in page coordinates.
moveFocus(parent: HTMLElement, offset: number): void
Moves the focus to the next/previous/first focusable child within a given parent element.
Parent element.
Offset to use when moving the focus (use zero to focus on the first focusable child).
removeClass(e: Element, className: string): void
Removes a class from an element.
Element that will have the class removed.
Class to remove from the element.
setAttribute(e: Element, name: string, value?: any): void
Sets or clears an attribute on an element.
Element that will be updated.
Name of the attribute to add or remove.
Value of the attribute, or null to remove the attribute from the element.
setCss(e: any, css: any): void
Modifies the style of an element by applying the properties specified in an object.
Element or array of elements whose style will be modified.
Object containing the style properties to apply to the element.
setSelectionRange(e: HTMLInputElement, start: number, end?: number): void
Sets the start and end positions of a selection in a text field.
This method is similar to the native setSelectionRange method in HTMLInputElement objects, except it checks for conditions that may cause exceptions (element not in the DOM, disabled, or hidden).
Offset into the text field for the start of the selection.
Offset into the text field for the end of the selection.
setText(e: HTMLElement, text: string): void
Sets the text content of an element.
Element that will have its content updated.
Plain text to be assigned to the element.
showPopup(popup: HTMLElement, ref?: any, above?: boolean, fadeIn?: boolean, copyStyles?: boolean): void
Shows an element as a popup.
The popup element becomes a child of the body element, and is positioned above or below a reference rectangle, depending on how much room is available.
The reference rectangle may be specified as one of the following:
Call the hidePopup method to hide the popup.
Element to show as a popup.
Reference element or rectangle used to position the popup.
Position popup above the reference rectangle if possible.
Use a fade-in animation to make the popup appear gradually.
Copy font and color styles from reference element.
toFixed(value: number, prec: number, truncate: boolean): number
Rounds or truncates a number to a specified precision.
Value to round or truncate.
Number of decimal digits for the result.
Whether to truncate or round the original value.
toggleClass(e: Element, className: string, addOrRemove?: boolean): void
Adds or removes a class to or from an element.
Element that will have the class added.
Class to add or remove.
Whether to add or remove the class. If not provided, the class is toggled. Use true to add class to element and false to remove class from element.
toHeaderCase(text: string): string
Converts a camel-cased string into a header-type string by capitalizing the first letter and adding spaces before uppercase characters preceded by lower-case characters.
For example, 'somePropertyName' becomes 'Some Property Name'.
String to convert to header case.
tryCast(value: any, type: any): any
Casts a value to a type if possible.
Value to cast.
Type or interface name to cast to.
Provides binding to complex properties (e.g. 'customer.address.city')
constructor(path: string): Binding
Initializes a new instance of the Binding class.
Name of the property to bind to.
Gets or sets the path for the binding.
In the simplest case, the path is the name of the property of the source object to use for the binding (e.g. 'street').
Sub-properties of a property can be specified by a syntax similar to that used in JavaScript (e.g. 'address.street').
getValue(object: any): any
Gets the binding value for a given object.
If the object does not contain the property specified by the binding path, the method returns null.
The object that contains the data to be retrieved.
setValue(object: any, value: any): void
Sets the binding value on a given object.
If the object does not contain the property specified by the binding path, the value is not set.
The object that contains the data to be set.
Data value to set.
Provides arguments for cancellable events.
Static class that provides utility methods for clipboard operations.
The Clipboard class provides static copy and paste methods that can be used by controls to customize the clipboard content during clipboard operations.
For example, the code below shows how a control could intercept the clipboard shortcut keys and provide custom clipboard handling:
rootElement.addEventListener('keydown', function(e) {
// copy: ctrl+c or ctrl+Insert
if (e.ctrlKey && (e.keyCode == 67 || e.keyCode == 45)) {
var text = this.getClipString();
Clipboard.copy(text);
return;
}
// paste: ctrl+v or shift+Insert
if ((e.ctrlKey && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) {
Clipboard.paste(function (text) {
this.setClipString(text);
});
return;
}
});copy(text: string): void
Copies a string to the clipboard.
This method only works if invoked immediately after the user pressed a clipboard copy command (such as ctrl+c).
Text to copy to the clipboard.
paste(callback: Function): void
Gets a string from the clipboard.
This method only works if invoked immediately after the user pressed a clipboard paste command (such as ctrl+v).
Function called when the clipboard content has been retrieved. The function receives the clipboard content as a parameter.
Represents a color.
The Color class parses colors specified as CSS strings and exposes their red, green, blue, and alpha channels as read-write properties.
The Color class also provides fromHsb and fromHsl methods for creating colors using the HSB and HSL color models instead of RGB, as well as getHsb and getHsl methods for retrieving the color components using those color models.
Finally, the Color class provides an interpolate method that creates colors by interpolating between two colors using the HSL model. This method is especially useful for creating color animations with the animate method.
constructor(color: string): Color
Initializes a new Color from a CSS color specification.
CSS color specification.
Gets or sets the alpha component of this Color, in a range from 0 to 1 (zero is transparent, one is solid).
fromHsb(h: number, s: number, b: number, a?: number): Color
Creates a new Color using the specified HSB values.
Hue value, from 0 to 1.
Saturation value, from 0 to 1.
Brightness value, from 0 to 1.
Alpha value, from 0 to 1.
fromHsl(h: number, s: number, l: number, a?: number): Color
Creates a new Color using the specified HSL values.
Hue value, from 0 to 1.
Saturation value, from 0 to 1.
Lightness value, from 0 to 1.
Alpha value, from 0 to 1.
fromRgba(r: number, g: number, b: number, a?: number): Color
Creates a new Color using the specified RGBA color channel values.
Value for the red channel, from 0 to 255.
Value for the green channel, from 0 to 255.
Value for the blue channel, from 0 to 255.
Value for the alpha channel, from 0 to 1.
fromString(value: string): Color
Creates a new Color from a CSS color string.
String containing a CSS color specification.
getHsb(): number[]
Gets an array with this color's HSB components.
getHsl(): number[]
Gets an array with this color's HSL components.
interpolate(c1: Color, c2: Color, pct: number): Color
Creates a Color by interpolating between two colors.
First color.
Second color.
Value between zero and one that determines how close the interpolation should be to the second color.
toOpaque(c: any, bkg?: any): Color
Gets the closest opaque color to a given color.
Color to be converted to an opaque color (the color may also be specified as a string).
Background color to use when removing the transparency (defaults to white).
Base class for all Wijmo controls.
The Control class handles the association between DOM elements and the actual control. Use the hostElement property to get the DOM element that is hosting a control, or the getControl method to get the control hosted in a given DOM element.
The Control class also provides a common pattern for invalidating and refreshing controls, for updating the control layout when its size changes, and for handling the HTML templates that define the control structure.
constructor(element: any, options?, invalidateOnResize?: boolean): Control
Initializes a new instance of the Control class and attaches it to a DOM element.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Whether the control should be invalidated when it is resized.
Gets the DOM element that is hosting the control.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
focus(): void
Sets the focus to this control.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
addDays(value: Date, days: number): Date
Gets a new Date that adds the specified number of days to a given Date.
Original date.
Number of days to add to the given date.
addHours(value: Date, hours: number): Date
Gets a new Date that adds the specified number of hours to a given Date.
Original date.
Number of hours to add to the given date.
addMinutes(value: Date, minutes: number): Date
Gets a new Date that adds the specified number of minutes to a given Date.
Original date.
Number of minutes to add to the given date.
addMonths(value: Date, months: number): Date
Gets a new Date that adds the specified number of months to a given Date.
Original date.
Number of months to add to the given date.
addSeconds(value: Date, seconds: number): Date
Gets a new Date that adds the specified number of seconds to a given Date.
Original date.
Number of seconds to add to the given date.
addYears(value: Date, years: number): Date
Gets a new Date that adds the specified number of years to a given Date.
Original date.
Number of years to add to the given date.
clone(date: Date): Date
Creates a copy of a given Date object.
Date object to copy.
equals(d1: Date, d2: Date): boolean
Returns true if two Date objects refer to the same date and time.
First date.
Second date.
fromDateTime(date: Date, time: Date): Date
Gets a Date object with the date and time set on two Date objects.
Date object that contains the date (day/month/year).
Date object that contains the time (hour:minute:second).
fromFiscal(date: Date, govt: boolean): void
Converts a fiscal year date to a calendar date using the current culture.
Fiscal year date.
Whether to use the government or corporate fiscal year.
newDate(year?: number, month?: number, day?: number, hour?: number, min?: number, sec?: number, ms?: number): Date
Gets a new Date object instance.
Integer value representing the year, defaults to current year.
Integer value representing the month (0-11), defaults to current month.
Integer value representing the day (1-31), defaults to current day.
Integer value representing the hour, defaults to zero.
Integer value representing the minute, defaults to zero.
Integer value representing the second, defaults to zero.
Integer value representing the millisecond, defaults to zero.
sameDate(d1: Date, d2: Date): boolean
Returns true if two Date objects refer to the same date (ignoring time).
First date.
Second date.
sameTime(d1: Date, d2: Date): boolean
Returns true if two Date objects refer to the same time (ignoring date).
First date.
Second date.
toFiscal(date: Date, govt: boolean): void
Converts a calendar date to a fiscal date using the current culture.
Calendar date.
Whether to use the government or corporate fiscal year.
Represents an event.
Wijmo events are similar to .NET events. Any class may define events by declaring them as fields. Any class may subscribe to events using the event's addHandler method and unsubscribe using the removeHandler method.
Wijmo event handlers take two parameters: sender and args. The first is the object that raised the event, and the second is an object that contains the event parameters.
Classes that define events follow the .NET pattern where for every event there is an on[EVENTNAME] method that raises the event. This pattern allows derived classes to override the on[EVENTNAME] method and handle the event before and/or after the base class raises the event. Derived classes may even suppress the event by not calling the base class implementation.
For example, the TypeScript code below overrides the onValueChanged event for a control to perform some processing before and after the valueChanged event fires:
// override base class
onValueChanged(e: EventArgs) {
// execute some code before the event fires
console.log('about to fire valueChanged');
// optionally, call base class to fire the event
super.onValueChanged(e);
// execute some code after the event fired
console.log('valueChanged event just fired');
}Gets a value that indicates whether this event has any handlers.
addHandler(handler: IEventHandler, self?: any): void
Adds a handler to this event.
Function invoked when the event is raised.
Object that defines the event handler (accessible as 'this' from the handler code).
raise(sender: any, args?: EventArgs): void
Raises this event, causing all associated handlers to be invoked.
Source object.
Event parameters.
removeAllHandlers(): void
Removes all handlers associated with this event.
removeHandler(handler: IEventHandler, self?: any): void
Removes a handler from this event.
Function invoked when the event is raised.
Object that defines the event handler (accessible as 'this' from the handler code).
Base class for event arguments.
Class that implements formatting and parsing of numbers and Dates.
By default, Globalize uses the American English culture. To switch cultures, include the appropriate wijmo.culture.*.js file after the wijmo files.
format(value: any, format: string, trim?: boolean, truncate?: boolean): string
Formats a number or a date.
The format strings used with the format function are similar to the ones used by Globalize.js and by the .NET Globalization library. The tables below contains links that describe the formats available:
Number or Date to format (all other types are converted to strings).
Format string to use when formatting numbers or dates.
Whether to remove trailing zeros from numeric results.
Whether to truncate the numeric values rather than round them.
formatDate(value: Date, format: string): string
Formats a date using the current culture.
The format parameter contains a .NET-style Date format string with the following additions:
For example:
var d = new Date(2015, 9, 1); // Oct 1, 2015 console.log(wijmo.Globalize.format(d, '"FY"EEEE"Q"U') + ' (US culture)'); > FY2016Q1 (US culture)
Number or Date to format.
.NET-style Date format string.
formatNumber(value: number, format: string, trim?: boolean, truncate?: boolean): string
Formats a number using the current culture.
The formatNumber method accepts most .NET-style Standard Numeric Format Strings, except for the 'e' and 'x' formats (scientific notation and hexadecimal) which are not supported.
Numeric format strings take the form Axxccss, where:
The following table describes the standard numeric format specifiers and displays sample output produced by each format specifier for the default culture.
n Number: formatNumber(1234.5, 'n2') => '1,234.50'
f Fixed-point: formatNumber(1234.5, 'f2') => '1234.50'
g General (no trailing zeros): formatNumber(1234.5, 'g2') => '1234.5'
d Decimal (integers): formatNumber(-1234, 'd6') => '-001234'
x Hexadecimal (integers): formatNumber(1234, 'x6') => '0004d2'
c Currency: formatNumber(1234, 'c') => '$ 1,234.00'
p Percent: formatNumber(0.1234, 'p2') => '12.34 %'
The scaling specifier is especially useful when charting large values. For example, the markup below creates a chart that plots population versus GDP. The raw data expresses the population is units and the GDP in millions. The scaling specified in the axes formats causes the chart to show population in millions and GDP in trillions:
<wj-flex-chart
items-source="countriesGDP" binding-x="pop" chart-type="Scatter">
<wj-flex-chart-series
name="GDP" binding="gdp"></wj-flex-chart-series>
<wj-flex-chart-axis
wj-property="axisX" title="Population (millions)"
format="n0,,">
</wj-flex-chart-axis>
<wj-flex-chart-axis
wj-property="axisY" title="GDP (US$ trillions)"
format="c0,,">
</wj-flex-chart-axis>
</wj-flex-chart>Number to format.
.NET-style standard numeric format string (e.g. 'n2', 'c4', 'p0', 'g2', 'd2').
Whether to remove trailing zeros from the result.
Whether to truncate the value rather than round it.
getFirstDayOfWeek(): number
Gets the first day of the week according to the current culture.
The value returned is between zero (Sunday) and six (Saturday).
getNumberDecimalSeparator(): string
Gets the symbol used as a decimal separator in numbers.
parseDate(value: string, format: string): Date
Parses a string into a Date.
Two-digit years are converted to full years based on the value of the calendar's twoDigitYearMax property. By default, this is set to 2029, meaning two-digit values of 30 to 99 are parsed as 19**, and values from zero to 29 are parsed as 20**.
You can change this threshold by assigning a new value to the calendar. For example:
// get calendar
var cal = wijmo.culture.Globalize.calendar;
// default threshold is 2029, so "30" is parsed as 1930
cal.twoDigitYearMax = 2029;
var d1 = wijmo.Globalize.parseDate('30/12', 'yy/MM'); // dec 1930
// changing threshold to 2100, so all values are parsed as 20**
cal.twoDigitYearMax = 2100;
var d2 = wijmo.Globalize.parseDate('30/12', 'yy/MM'); // dec 2030String to convert to a Date.
Format string used to parse the date.
parseFloat(value: string, format?: string): number
Parses a string into a floating point number.
String to convert to a number.
Format to use when parsing the number.
parseInt(value: string, format?: string): number
Parses a string into an integer.
String to convert to an integer.
Format to use when parsing the number.
constructor(x?: number, y?: number): Point
Initializes a new instance of the Point class.
X coordinate of the new Point.
Y coordinate of the new Point.
Class that enables the creation of custom documents for printing.
The PrintDocument class makes it easy to create documents for printing or exporting to PDF. Most browsers allow you to select the paper size, orientation, margins, and whether to include page headers and footers.
To use, instantiate a PrintDocument, add content using the append method, and finish by calling the print method.
For example:
// create the document
var doc = new wijmo.PrintDocument({
title: 'PrintDocument Test'
});
// add some simple text
doc.append('<h1>Printing Example</h1>');
doc.append('<p>This document was created using the <b>PrintDocument</b> class.</p>');
// add some existing elements
doc.append(document.getElementById('gaugeControl'));
// print the document (or export it to PDF)
doc.print();constructor(options?: any): PrintDocument
Initializes a new instance of the PrintDocument class.
JavaScript object containing initialization data for the PrintDocument.
Gets or sets a value that determines whether the PrintDocument should include the CSS style sheets defined in the main document.
Gets or sets the document title.
Setting this property to null causes the PrintDocument to use the title from the current document.
addCSS(href: string): void
Adds a CSS style sheet to the document.
URL of the CSS file that should be added to the document.
append(child: any): void
Appends an HTML element or string to the document.
HTML element or string to append to the document.
print(): void
Prints the document.
Provides arguments for property change events.
constructor(propertyName: string, oldValue: any, newValue: any): PropertyChangedEventArgs
Initializes a new instance of the PropertyChangedEventArgs class.
The name of the property whose value changed.
The old value of the property.
The new value of the property.
Class that represents a rectangle (with left, top, width, and height).
constructor(left: number, top: number, width: number, height: number): Rect
Initializes a new instance of the Rect class.
Left coordinate of the new Rect.
Top coordinate of the new Rect.
Width of the new Rect.
Height of the new Rect.
contains(pt: any): boolean
Determines whether the rectangle contains a given point or rectangle.
fromBoundingRect(rc: any): Rect
Creates a Rect from ClientRect or SVGRect objects.
Rectangle obtained by a call to the DOM's getBoundingClientRect or GetBoundingBox methods.
inflate(dx: number, dy: number): Rect
Creates a rectangle that results from expanding or shrinking a rectangle by the specified amounts.
The amount by which to expand or shrink the left and right sides of the rectangle.
The amount by which to expand or shrink the top and bottom sides of the rectangle.
Provides arguments for XMLHttpRequest error events.
constructor(xhr: XMLHttpRequest, msg?: string): RequestErrorEventArgs
Initializes a new instance of the RequestErrorEventArgs class.
The XMLHttpRequest that detected the error. The status and statusText properties of the request object contain details about the error.
Optional error message.
Gets or sets a value that indicates whether the event should be canceled.
Provides a value to use with events that do not have event data.
Gets or sets an error message to display to the user.
Gets a reference to the XMLHttpRequest that detected the error.
The status and statusText properties of the request object contain details about the error.
constructor(width?: number, height?: number): Size
Initializes a new instance of the Size class.
Provides a pop-up window that displays additional information about elements on the page.
The Tooltip class can be used in two modes:
Automatic Mode: Use the setTooltip method to connect the Tooltip to one or more elements on the page. The Tooltip will automatically monitor events and display the tooltips when the user performs actions that trigger the tooltip. For example:
var tt = new wijmo.Tooltip();
tt.setTooltip('#menu', 'Select commands.');
tt.setTooltip('#tree', 'Explore the hierarchy.');
tt.setTooltip('#chart', '#idChartTooltip');
Manual Mode: The caller is responsible for showing and hiding the tooltip using the show and hide methods. For example:
var tt = new wijmo.Tooltip();
element.addEventListener('click', function () {
if (tt.isVisible) {
tt.hide();
} else {
tt.show(element, 'This is an important element!');
}
});constructor(options?: any): Tooltip
Initializes a new instance of the Tooltip class.
JavaScript object containing initialization data for the Tooltip.
Gets or sets the distance between the tooltip and the target element.
Gets or sets the delay, in milliseconds, before hiding the tooltip after the mouse leaves the target element.
Gets or sets a value that determines whether the tooltip contents should be displayed as plain text or as HTML.
Gets a value that determines whether the tooltip is currently visible.
Gets or sets a value that determines whether the tooltip should be positioned with respect to the mouse position rather than the target element.
Gets or sets the delay, in milliseconds, before showing the tooltip after the mouse enters the target element.
getTooltip(element: any): string
Gets the tooltip content associated with a given element.
Element, element ID, or control that the tooltip explains.
hide(): void
Hides the tooltip if it is currently visible.
onPopup(e: TooltipEventArgs): boolean
Raises the popup event.
TooltipEventArgs that contains the event data.
setTooltip(element: any, content: string): void
Assigns tooltip content to a given element on the page.
The same tooltip may be used to display information for any number of elements on the page. To remove the tooltip from an element, call setTooltip and specify null for the content.
Element, element ID, or control that the tooltip explains.
Tooltip content or ID of the element that contains the tooltip content.
show(element: any, content: string, bounds?: Rect): void
Shows the tooltip with the specified content, next to the specified element.
Element, element ID, or control that the tooltip explains.
Tooltip content or ID of the element that contains the tooltip content.
Optional element that defines the bounds of the area that the tooltip targets. If not provided, the bounds of the element are used (as reported by the getBoundingClientRect method).
Occurs before the tooltip content is displayed.
The event handler may customize the tooltip content or suppress the tooltip display by changing the event parameters.
Provides arguments for the popup event.
constructor(content: string): TooltipEventArgs
Initializes a new instance of the TooltipEventArgs class.
String to show in the tooltip.
Gets or sets a value that indicates whether the event should be canceled.
Gets or sets the content to show in the tooltip.
This parameter can be used while handling the popup event to modify the content of the tooltip.
Represents an event handler.
Event handlers are functions invoked when events are raised.
Every event handler has two arguments:
Allows callers to verify whether an object implements an interface.
implementsInterface(interfaceName: string): boolean
Returns true if the object implements a given interface.
Name of the interface to look for.
Specifies the type of aggregate to calculate over a group of values.
| Name | Value | Description |
|---|---|---|
| None | 0 | No aggregate. |
| Sum | 1 | Returns the sum of the numeric values in the group. |
| Cnt | 2 | Returns the count of non-null values in the group. |
| Avg | 3 | Returns the average value of the numeric values in the group. |
| Max | 4 | Returns the maximum value in the group. |
| Min | 5 | Returns the minimum value in the group. |
| Rng | 6 | Returns the difference between the maximum and minimum numeric values in the group. |
| Std | 7 | Returns the sample standard deviation of the numeric values in the group (uses the formula based on n-1). |
| Var | 8 | Returns the sample variance of the numeric values in the group (uses the formula based on n-1). |
| StdPop | 9 | Returns the population standard deviation of the values in the group (uses the formula based on n). |
| VarPop | 10 | Returns the population variance of the values in the group (uses the formula based on n). |
| CntAll | 11 | Returns the count of all values in the group (including nulls). |
| First | 12 | Returns the first non-null value in the group. |
| Last | 13 | Returns the last non-null value in the group. |
| Name | Value | Description |
|---|---|---|
| Object | 0 | Object (anything). |
| String | 1 | String. |
| Number | 2 | Number. |
| Boolean | 3 | Boolean. |
| Date | 4 | Date (date and time). |
| Array | 5 | Array. |
Specifies constants that represent keyboard codes.
This enumeration is useful when handling keyDown events.
| Name | Value | Description |
|---|---|---|
| Back | 8 | The backspace key. |
| Tab | 9 | The tab key. |
| Enter | 13 | The enter key. |
| Escape | 27 | The escape key. |
| Space | 32 | The space key. |
| PageUp | 33 | The page up key. |
| PageDown | 34 | The page down key. |
| End | 35 | The end key. |
| Home | 36 | The home key. |
| Left | 37 | The left arrow key. |
| Up | 38 | The up arrow key. |
| Right | 39 | The right arrow key. |
| Down | 40 | The down arrow key. |
| Delete | 46 | The delete key. |
| F1 | 112 | The F1 key. |
| F2 | 113 | The F2 key. |
| F3 | 114 | The F3 key. |
| F4 | 115 | The F4 key. |
| F5 | 116 | The F5 key. |
| F6 | 117 | The F6 key. |
| F7 | 118 | The F7 key. |
| F8 | 119 | The F8 key. |
| F9 | 120 | The F9 key. |
| F10 | 121 | The F10 key. |
| F11 | 122 | The F11 key. |
| F12 | 123 | The F12 key. |
Defines interfaces and classes related to data, including the ICollectionView interface, CollectionView and ObservableArray classes.
Base class for Array classes with notifications.
Class that implements the ICollectionView interface to expose data in regular JavaScript arrays.
The CollectionView class implements the following interfaces:
To use the CollectionView class, start by declaring it and passing a regular array as a data source. Then configure the view using the filter, sortDescriptions, groupDescriptions, and pageSize properties. Finally, access the view using the items property. For example:
// create a new CollectionView
var cv = new wijmo.collections.CollectionView(myArray);
// sort items by amount in descending order
var sd = new wijmo.collections.SortDescription('amount', false);
cv.sortDescriptions.push(sd);
// show only items with amounts greater than 100
cv.filter = function(item) { return item.amount > 100 };
// show the sorted, filtered result on the console
for (var i = 0; i < cv.items.length; i++) {
var item = cv.items[i];
console.log(i + ': ' + item.name + ' ' + item.amount);
}constructor(sourceCollection?: any, options?: any): CollectionView
Initializes a new instance of the CollectionView class.
Array that serves as a source for this CollectionView.
JavaScript object containing initialization data for the control.
Gets a value that indicates whether a new item can be added to the collection.
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Gets a value that indicates whether this view supports filtering via the filter property.
Gets a value that indicates whether this view supports grouping via the groupDescriptions property.
Gets a value that indicates whether items can be removed from the collection.
Gets a value that indicates whether this view supports sorting via the sortDescriptions property.
Gets the item that is being added during the current add transaction.
Gets the item that is being edited during the current edit transaction.
Gets or sets the current item in the view.
Gets the ordinal position of the current item in the view.
Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
The callback function should return true if the item passed in as a parameter should be included in the view.
NOTE: If the filter function needs a scope (i.e. a meaningful 'this' value) remember to set the filter using the 'bind' function to specify the 'this' object. For example:
collectionView.filter = this._filter.bind(this);
Gets or sets a callback that determines whether a specific property of an item contains validation errors.
If provided, the callback should take two parameters containing the item and the property to validate, and should return a string describing the error (or null if there are no errors).
For example:
var view = new wijmo.collections.CollectionView(data, {
getError: function (item, property) {
switch (property) {
case 'country':
return countries.indexOf(item.country) < 0
? 'Invalid Country'
: null;
case 'downloads':
case 'sales':
case 'expenses':
return item[property] < 0
? 'Cannot be negative!'
: null;
case 'active':
return item.active && item.country.match(/US|UK/)
? 'No active items allowed in the US or UK!'
: null;
}
return null;
}
});Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Gets an array of CollectionViewGroup objects that represents the top-level groups.
Gets a value that indicates whether an add transaction is in progress.
Gets a value that indicates whether an edit transaction is in progress.
Gets a value that indicates whether this view contains no items.
Gets a value that indicates whether the page index is changing.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets the total number of items in the view taking paging into account.
Gets items in the view.
Gets an ObservableArray containing the records that were added to the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were edited in the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were removed from the collection since trackChanges was enabled.
Gets or sets a function that creates new items for the collection.
If the creator function is not supplied, the CollectionView will try to create an uninitialized item of the appropriate type.
If the creator function is supplied, it should be a function that takes no parameters and returns an initialized object of the proper type for the collection.
Gets the total number of pages.
Gets the zero-based index of the current page.
Gets or sets the number of items to display on a page.
Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
For example, see Dave Koele's Alphanum algorithm. It breaks up strings into chunks composed of strings or numbers, then sorts number chunks in value order and string chunks in ASCII order. Dave calls the result a "natural sorting order".
The example below shows a typical use for the sortComparer property:
// create a CollectionView with a custom sort comparer
var dataCustomSort = new wijmo.collections.CollectionView(data, {
sortComparer: function (a, b) {
return wijmo.isString(a) && wijmo.isString(b)
? alphanum(a, b) // custom comparer used for strings
: null; // use default comparer used for everything else
}
});Gets or sets a function used to convert values when sorting.
If provided, the function should take as parameters a SortDescription, a data item, and a value to convert, and should return the converted value.
This property provides a way to customize sorting. For example, the FlexGrid control uses it to sort mapped columns by display value instead of by raw value.
For example, the code below causes a CollectionView to sort the 'country' property, which contains country code integers, using the corresponding country names:
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(',');
collectionView.sortConverter = function (sd, item, value) {
if (sd.property == 'countryMapped') {
value = countries[value]; // convert country id into name
}
return value;
}Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Gets or sets the underlying (unfiltered and unsorted) collection.
Gets the total number of items in the view before paging is applied.
Gets or sets a value that determines whether the control should track changes to the data.
If trackChanges is set to true, the CollectionView keeps track of changes to the data and exposes them through the itemsAdded, itemsRemoved, and itemsEdited collections.
Tracking changes is useful in situations where you need to update the server after the user has confirmed that the modifications are valid.
After committing or cancelling changes, use the clearChanges method to clear the itemsAdded, itemsRemoved, and itemsEdited collections.
The CollectionView only tracks changes made when the proper CollectionView methods are used (editItem/commitEdit, addNew/commitNew, and remove). Changes made directly to the data are not tracked.
Gets or sets whether to use a stable sort algorithm.
Stable sorting algorithms maintain the relative order of records with equal keys. For example, consider a collection of objects with an "Amount" field. If you sort the collection by "Amount", a stable sort will keep the original order of records with the same Amount value.
This property is false by default, which causes the CollectionView to use JavaScript's built-in sort method, which is very fast but not stable. Setting the useStableSort property to true increases sort times by 30% to 50%, which can be significant for large collections.
addNew(): any
Creates a new item and adds it to the collection.
This method takes no parameters. It creates a new item, adds it to the collection, and defers refresh operations until the new item is committed using the commitNew method or canceled using the cancelNew method.
The code below shows how the addNew method is typically used:
// create the new item, add it to the collection var newItem = view.addNew(); // initialize the new item newItem.id = getFreshId(); newItem.name = 'New Customer'; // commit the new item so the view can be refreshed view.commitNew();
You can also add new items by pushing them into the sourceCollection and then calling the refresh method. The main advantage of addNew is in user-interactive scenarios (like adding new items in a data grid), because it gives users the ability to cancel the add operation. It also prevents the new item from being sorted or filtered out of view until the add operation is committed.
cancelEdit(): void
Ends the current edit transaction and, if possible, restores the original value to the item.
cancelNew(): void
Ends the current add transaction and discards the pending new item.
clearChanges(): void
Clears all changes by removing all items in the itemsAdded, itemsRemoved, and itemsEdited collections.
Call this method after committing changes to the server or after refreshing the data from the server.
commitEdit(): void
Ends the current edit transaction and saves the pending changes.
commitNew(): void
Ends the current add transaction and saves the pending new item.
contains(item: any): boolean
Returns a value indicating whether a given item belongs to this view.
Item to seek.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
editItem(item: any): void
Begins an edit transaction of the specified item.
Item to be edited.
getAggregate(aggType: Aggregate, binding: string, currentPage?: boolean): void
Calculates an aggregate value for the items in this collection.
Type of aggregate to calculate.
Property to aggregate on.
Whether to include only items on the current page.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
moveCurrentTo(item: any): boolean
Sets the specified item to be the current item in the view.
Item that will become current.
moveCurrentToFirst(): boolean
Sets the first item in the view as the current item.
moveCurrentToLast(): boolean
Sets the last item in the view as the current item.
moveCurrentToNext(): boolean
Sets the item after the current item in the view as the current item.
moveCurrentToPosition(index: number): boolean
Sets the item at the specified index in the view as the current item.
Index of the item that will become current.
moveCurrentToPrevious(): boolean
Sets the item before the current item in the view as the current item.
moveToFirstPage(): boolean
Sets the first page as the current page.
moveToLastPage(): boolean
Sets the last page as the current page.
moveToNextPage(): boolean
Moves to the page after the current page.
moveToPage(index: number): boolean
Moves to the page at the specified index.
Index of the page to move to.
moveToPreviousPage(): boolean
Moves to the page before the current page.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
onCurrentChanged(e?: EventArgs): void
Raises the currentChanged event.
onCurrentChanging(e: CancelEventArgs): boolean
Raises the currentChanging event.
CancelEventArgs that contains the event data.
onPageChanged(e?: EventArgs): void
Raises the pageChanged event.
onPageChanging(e: PageChangingEventArgs): boolean
Raises the pageChanging event.
PageChangingEventArgs that contains the event data.
onSourceCollectionChanged(e?: EventArgs): void
Raises the sourceCollectionChanged event.
onSourceCollectionChanging(e: CancelEventArgs): boolean
Raises the sourceCollectionChanging event.
CancelEventArgs that contains the event data.
refresh(): void
Re-creates the view using the current sort, filter, and group parameters.
remove(item: any): void
Removes the specified item from the collection.
Item to be removed from the collection.
removeAt(index: number): void
Removes the item at the specified index from the collection.
Index of the item to be removed from the collection. The index is relative to the view, not to the source collection.
Occurs after the value of the sourceCollection property changes.
Occurs before the value of the sourceCollection property changes.
Represents a group created by a CollectionView object based on its groupDescriptions property.
constructor(groupDescription: GroupDescription, name: string, level: number, isBottomLevel: boolean): CollectionViewGroup
Initializes a new instance of the CollectionViewGroup class.
GroupDescription that owns the new group.
Name of the new group.
Level of the new group.
Whether this group has any subgroups.
getAggregate(aggType: Aggregate, binding: string, view?: ICollectionView): void
Calculates an aggregate value for the items in this group.
Type of aggregate to calculate.
Property to aggregate on.
CollectionView that owns this group.
Represents a base class for types defining grouping conditions.
The concrete class which is commonly used for this purpose is PropertyGroupDescription.
groupNameFromItem(item: any, level: number): any
Returns the group name for the given item.
The item to get group name for.
The zero-based group level index.
namesMatch(groupName: any, itemName: any): boolean
Returns a value that indicates whether the group name and the item name match (which implies that the item belongs to the group).
The name of the group.
The name of the item.
Provides data for the collectionChanged event.
constructor(action?: NotifyCollectionChangedAction, item?, index?: number): NotifyCollectionChangedEventArgs
Initializes a new instance of the NotifyCollectionChangedEventArgs class.
Type of action that caused the event to fire.
Item that was added or changed.
Index of the item.
Provides a value to use with events that do not have event data.
Gets the index at which the change occurred.
Gets the item that was added, removed, or changed.
Array that sends notifications on changes.
The class raises the collectionChanged event when changes are made with the push, pop, splice, insert, or remove methods.
Warning: Changes made by assigning values directly to array members or to the length of the array do not raise the collectionChanged event.
constructor(data?: any[]): ObservableArray
Initializes a new instance of the ObservableArray class.
Array containing items used to populate the ObservableArray.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
clear(): void
Removes all items from the array.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
push(...item: any[]): number
Adds one or more items to the end of the array.
One or more items to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Provides data for the pageChanging event
constructor(newIndex: number): PageChangingEventArgs
Initializes a new instance of the PageChangingEventArgs class.
Index of the page that is about to become current.
Gets or sets a value that indicates whether the event should be canceled.
Provides a value to use with events that do not have event data.
Gets the index of the page that is about to become current.
Describes the grouping of items using a property name as the criterion.
For example, the code below causes a CollectionView to group items by the value of their 'country' property:
var cv = new wijmo.collections.CollectionView(items);
var gd = new wijmo.collections.PropertyGroupDescription('country');
cv.groupDescriptions.push(gd);
You may also specify a callback function that generates the group name. For example, the code below causes a CollectionView to group items by the first letter of the value of their 'country' property:
var cv = new wijmo.collections.CollectionView(items);
var gd = new wijmo.collections.PropertyGroupDescription('country',
function(item, propName) {
return item[propName][0]; // return country's initial
});
cv.groupDescriptions.push(gd);constructor(property: string, converter?: Function): PropertyGroupDescription
Initializes a new instance of the PropertyGroupDescription class.
The name of the property that specifies which group an item belongs to.
A callback function that takes an item and a property name and returns the group name. If not specified, the group name is the property value for the item.
Gets the name of the property that is used to determine which group an item belongs to.
groupNameFromItem(item: any, level: number): any
Returns the group name for the given item.
The item to get group name for.
The zero-based group level index.
namesMatch(groupName: any, itemName: any): boolean
Returns a value that indicates whether the group name and the item name match (which implies that the item belongs to the group).
The name of the group.
The name of the item.
constructor(property: string, ascending: boolean): SortDescription
Initializes a new instance of the SortDescription class.
Name of the property to sort on.
Whether to sort in ascending order.
Gets a value that determines whether to sort the values in ascending order.
Gets the name of the property used to sort.
Enables collections to have the functionalities of current record management, custom sorting, filtering, and grouping.
This is a JavaScript version of the ICollectionView interface used in Microsoft's XAML platform. It provides a consistent, powerful, and MVVM-friendly way to bind data to UI elements.
Wijmo includes several classes that implement ICollectionView. The most common is CollectionView, which works based on regular JavsScript arrays.
Gets a value that indicates whether this view supports filtering via the filter property.
Gets a value that indicates whether this view supports grouping via the groupDescriptions property.
Gets a value that indicates whether this view supports sorting via the sortDescriptions property.
Gets the current item in the view.
Gets the ordinal position of the current item in the view.
Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
NOTE: If the filter function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
collectionView.filter = this._filter.bind(this);
Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Gets the top-level groups.
Gets a value that indicates whether this view contains no items.
Gets the filtered, sorted, grouped items in the view.
Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Gets or sets the collection object from which to create this view.
contains(item: any): boolean
Returns a value that indicates whether a given item belongs to this view.
The item to locate in the collection.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function has been executed. This method ensures endUpdate is called even if the function throws.
Function to be executed within the beginUpdate/endUpdate block.
moveCurrentTo(item: any): boolean
Sets the specified item to be the current item in the view.
The item to set as the currentItem.
moveCurrentToFirst(): boolean
Sets the first item in the view as the current item.
moveCurrentToLast(): boolean
Sets the last item in the view as the current item.
moveCurrentToNext(): boolean
Sets the item after the current item in the view as the current item.
moveCurrentToPosition(index: number): boolean
Sets the item at the specified index in the view as the current item.
The index of the item to set as the currentItem.
moveCurrentToPrevious(): void
Sets the item before the current item in the view as the current item.
refresh(): void
Re-creates the view using the current sort, filter, and group parameters.
Represents the method that compares two objects.
Defines methods and properties that extend ICollectionView to provide editing capabilities.
Gets a value that indicates whether a new item can be added to the collection.
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Gets a value that indicates whether items can be removed from the collection.
Gets the item that is being added during the current add transaction.
Gets the item that is being edited during the current edit transaction.
Gets a value that indicates whether an add transaction is in progress.
Gets a value that indicates whether an edit transaction is in progress.
addNew(): any
Adds a new item to the collection.
cancelEdit(): void
Ends the current edit transaction and, if possible, restores the original value to the item.
cancelNew(): void
Ends the current add transaction and discards the pending new item.
commitEdit(): void
Ends the current edit transaction and saves the pending changes.
commitNew(): void
Ends the current add transaction and saves the pending new item.
editItem(item: any): void
Begins an edit transaction of the specified item.
Item to edit.
remove(item: any): void
Removes the specified item from the collection.
Item to remove from the collection.
removeAt(index: number): void
Removes the item at the specified index from the collection.
Index of the item to remove from the collection.
Notifies listeners of dynamic changes, such as when items get added and removed or when the collection is sorted, filtered, or grouped.
Defines methods and properties that extend ICollectionView to provide paging capabilities.
Gets a value that indicates whether the index is changing.
Gets the number of items in the view taking paging into account.
To get the total number of items, use the totalItemCount property.
Notice that this is different from the .NET IPagedCollectionView, where itemCount and totalItemCount both return the count before paging is applied.
Gets the zero-based index of the current page.
Gets or sets the number of items to display on a page.
Gets the total number of items in the view before paging is applied.
To get the number of items in the current view not taking paging into account, use the itemCount property.
Notice that this is different from the .NET IPagedCollectionView, where itemCount and totalItemCount both return the count before paging is applied.
moveToFirstPage(): boolean
Sets the first page as the current page.
moveToLastPage(): boolean
Sets the last page as the current page.
moveToNextPage(): boolean
Moves to the page after the current page.
moveToPage(index: number): boolean
Moves to the page at the specified index.
Index of the page to move to.
moveToPreviousPage(): boolean
Moves to the page before the current page.
Represents a method that takes an item of any type and returns a boolean that indicates whether the object meets a set of criteria.
Describes the action that caused the collectionChanged event to fire.
| Name | Value | Description |
|---|---|---|
| Add | 0 | An item was added to the collection. |
| Remove | 1 | An item was removed from the collection. |
| Change | 2 | An item was changed or replaced. |
| Reset | 3 | Several items changed simultaneously (for example, the collection was sorted, filtered, or grouped). |
Provides arguments for the cellEditEnding event.
constructor(p: GridPanel, rng: CellRange, data?: any): CellRangeEventArgs
Initializes a new instance of the CellRangeEventArgs class.
GridPanel that contains the range.
Range of cells affected by the event.
Data related to the event.
Gets or sets a value that indicates whether the event should be canceled.
Provides a value to use with events that do not have event data.
Gets or sets whether the cell should remain in edit mode instead of finishing the edits.
Creates HTML elements that represent cells within a FlexGrid control.
disposeCell(cell: HTMLElement): void
Disposes of a cell element and releases all resources associated with it.
The element that represents the cell.
getEditorValue(g: FlexGrid): any
Gets the value of the editor currently being used.
updateCell(p: GridPanel, r: number, c: number, cell: HTMLElement, rng?: CellRange, updateContent?: boolean): void
Creates or updates a cell in the grid.
The GridPanel that contains the cell.
The index of the row that contains the cell.
The index of the column that contains the cell.
The element that represents the cell.
The CellRange object that contains the cell's merged range, or null if the cell is not merged.
Whether to update the cell's content as well as its position and style.
Represents a rectangular group of cells defined by two row indices and two column indices.
constructor(r?: number, c?: number, r2?: number, c2?: number): CellRange
Initializes a new instance of the CellRange class.
The index of the first row in the range (defaults to -1).
The index of the first column in the range (defaults to -1).
The index of the last row in the range (defaults to r).
The index of the last column in the range (defaults to c).
Gets the index of the bottom row in the range.
Gets or sets the index of the first column in the range.
Gets or sets the index of the second column in the range.
Gets the number of columns in the range.
Checks whether this range corresponds to a single cell (beginning and ending rows have the same index, and beginning and ending columns have the same index).
Checks whether the range contains valid row and column indices (row and column values are zero or greater).
Gets the index of the leftmost column in the range.
Gets the index of the rightmost column in the range.
Gets or sets the index of the first row in the range.
Gets or sets the index of the second row in the range.
Gets the number of rows in the range.
Gets the index of the top row in the range.
contains(r: any, c?: number): boolean
Checks whether the range contains another range or a specific cell.
The CellRange object or row index to find.
The column index (required if the r parameter is not a CellRange object).
containsColumn(c: number): boolean
Checks whether the range contains a given column.
The index of the column to find.
containsRow(r: number): boolean
Checks whether the range contains a given row.
The index of the row to find.
equals(rng: CellRange): boolean
Checks whether the range equals another range.
The CellRange object to compare to this range.
getRenderSize(p: GridPanel): Size
Gets the rendered size of this range.
intersects(rng: CellRange): boolean
Checks whether the range intersects another range.
The CellRange object to check.
intersectsColumn(rng: CellRange): boolean
Checks whether the range intersects the columns in another range.
The CellRange object to check.
intersectsRow(rng: CellRange): boolean
Checks whether the range intersects the rows in another range.
The CellRange object to check.
setRange(r?: number, c?: number, r2?: number, c2?: number): void
Initializes an existing CellRange.
The index of the first row in the range (defaults to -1).
The index of the first column in the range (defaults to -1).
The index of the last row in the range (defaults to r).
The index of the last column in the range (defaults to c).
Provides arguments for CellRange events.
constructor(p: GridPanel, rng: CellRange, data?: any): CellRangeEventArgs
Initializes a new instance of the CellRangeEventArgs class.
GridPanel that contains the range.
Range of cells affected by the event.
Data related to the event.
Gets or sets a value that indicates whether the event should be canceled.
Gets the column affected by this event.
Gets or sets the data associated with the event.
Provides a value to use with events that do not have event data.
Gets the row affected by this event.
Represents a column on the grid.
constructor(options?: any): Column
Initializes a new instance of the Column class.
Initialization options for the column.
Gets or sets the Aggregate to display in the group header rows for the column.
Gets or sets the horizontal alignment of items in the column.
The default value for this property is null, which causes the grid to select the alignment automatically based on the column's dataType (numbers are right-aligned, Boolean values are centered, and other types are left-aligned).
If you want to override the default alignment, set this property to 'left', 'right', or 'center'.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets or sets a value that indicates whether the user can sort the column by clicking its header.
Gets or sets the name of the property the column is bound to.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets a string that describes the current sorting applied to the column. Possible values are '+' for ascending order, '-' for descending order, or null for unsorted columns.
Gets or sets the DataMap used to convert raw values into display values for the column.
Columns with an associated dataMap show drop-down buttons that can be used for quick editing. If you do not want to show the drop-down buttons, set the column's showDropDown property to false.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the type of value stored in the column.
Values are coerced into the proper type when editing the grid.
Gets or sets a CSS class name to add to drop-downs in this column.
The drop-down buttons are shown only if the column has a dataMap set and is editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the format string used to convert raw values into display values for the column (see Globalize).
Gets or sets the text displayed in the column header.
Gets or sets the "type" attribute of the HTML input element used to edit values in this column.
By default, this property is set to "tel" for numeric columns, and to "text" for all other non-boolean column types. The "tel" input type causes mobile devices to show a numeric keyboard that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In these cases, try setting the property to "number" or simply "text."
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that determines whether values in the column are required.
By default, this property is set to null, which means values are required, but non-masked string columns may contain empty strings.
When set to true, values are required and empty strings are not allowed.
When set to false, null values and empty strings are allowed.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets or sets a mask to use while editing values in this column.
The mask format is the same used by the InputMask control.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the maximum number of characters that the can be entered into the cell.
Set this property to null to allow entry of any number of characters.
Gets or sets the maximum width of the column.
Gets or sets the minimum width of the column.
Gets or sets the name of the column.
The column name can be used to retrieve the column using the getColumn method.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets the render width of the column.
The value returned takes into account the column's visibility, default size, and min and max sizes.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in this column.
The drop-down buttons are shown only if the column has a dataMap set and is editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets the name of the property to use when sorting this column.
Use this property in cases where you want the sorting to be performed based on values other than the ones specified by the binding property.
Setting this property is null causes the grid to use the value of the binding property to sort the column.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets the width of the column.
Column widths may be positive numbers (sets the column width in pixels), null or negative numbers (uses the collection's default column width), or strings in the format '{number}*' (star sizing).
The star-sizing option performs a XAML-style dynamic sizing where column widths are proportional to the number before the star. For example, if a grid has three columns with widths "100", "*", and "3*", the first column will be 100 pixels wide, the second will take up 1/4th of the remaining space, and the last will take up the remaining 3/4ths of the remaining space.
Star-sizing allows you to define columns that automatically stretch to fill the width available. For example, set the width of the last column to "*" and it will automatically extend to fill the entire grid width so there's no empty space. You may also want to set the column's minWidth property to prevent the column from getting too narrow.
Gets or sets a value that indicates whether cells in the row or column wrap their content.
getAlignment(): string
Gets the actual column alignment.
Returns the value of the align property if it is not null, or selects the alignment based on the column's dataType.
getIsRequired(): boolean
Gets a value that determines whether the column is required.
Returns the value of the isRequired property if it is not null, or determines the required status based on the column's dataType.
By default, string columns are not required unless they have an associated dataMap or mask; all other data types are required.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
constructor(g: FlexGrid, defaultSize: number): RowColCollection
Initializes a new instance of the RowColCollection class.
The FlexGrid that owns the collection.
The default size of the elements in the collection.
Gets or sets the default size of elements in the collection.
Gets the index of the first visible column (where the outline tree is displayed).
Gets or sets the number of frozen rows or columns in the collection.
Frozen rows and columns do not scroll, and instead remain at the top or left of the grid, next to the fixed cells. Unlike fixed cells, however, frozen cells may be selected and edited like regular cells.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the maximum size of elements in the collection.
Gets or sets the minimum size of elements in the collection.
Gets the number of visible elements in the collection (isVisible).
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canMoveElement(src: number, dst: number): boolean
Checks whether an element can be moved from one position to another.
The index of the element to move.
The position to which to move the element, or specify -1 to append the element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getItemAt(position: number): number
Gets the index of the element at a given physical position.
Position of the item in the collection, in pixels.
getNextCell(index: number, move: SelMove, pageSize: number): void
Finds the next visible cell for a selection change.
Starting index for the search.
Type of move (size and direction).
Size of a page (in case the move is a page up/down).
getTotalSize(): number
Gets the total size of the elements in the collection.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(name: any): number
Gets the index of a column by name or binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
isFrozen(index: number): boolean
Checks whether a row or column is frozen.
The index of the row or column to check.
moveElement(src: number, dst: number): void
Moves an element from one position to another.
Index of the element to move.
Position where the element should be moved to (-1 to append).
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Keeps track of dirty state and invalidate grid on changes.
push(item: any): number
Appends an item to the array.
Item to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes or adds items to the array.
Position where items are added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Represents a data map for use with a column's dataMap property.
Data maps provide the grid with automatic look up capabilities. For example, you may want to display a customer name instead of his ID, or a color name instead of its RGB value.
The code below binds a grid to a collection of products, then assigns a DataMap to the grid's 'CategoryID' column so the grid displays the category names rather than the raw IDs.
The grid takes advantage of data maps also for editing. If the wijmo.input module is loaded, then when editing data-mapped columns the grid will show a drop-down list containing the values on the map.
// bind grid to products
var flex = new wijmo.grid.FlexGrid();
flex.itemsSource = products;
// map CategoryID column to show category name instead of ID
var col = flex.columns.getColumn('CategoryID');
col.dataMap = new wijmo.grid.DataMap(categories, 'CategoryID', 'CategoryName');
In general, data maps apply to whole columns. However, there are situations where you may want to restrict the options available for a cell based on a value on a different column. For example, if you have "Country" and "City" columns, you will probably want to restrict the cities based on the current country.
There are two ways you can implement these "dynamic" data maps:
In some cases, you may want to create a DataMap to represent an enumeration. This can be done with the following code:
// build a DataMap for a given enum
function getDataMap(enumClass) {
var pairs = [];
for (var key in enumClass) {
var val = parseInt(key);
if (!isNaN(val)) {
pairs.push({ key: val, name: enumClass[val] });
}
}
return new wijmo.grid.DataMap(pairs, 'key', 'name');
}constructor(itemsSource: any, selectedValuePath?: string, displayMemberPath?: string): DataMap
Initializes a new instance of the DataMap class.
An array or ICollectionView that contains the items to map.
The name of the property that contains the keys (data values).
The name of the property to use as the visual representation of the items.
Gets the name of the property to use as the visual representation of the item.
Gets or sets a value that indicates whether users should be allowed to enter values that are not present on the DataMap.
In order for a DataMap to be editable, the selectedValuePath and displayMemberPath must be set to the same value.
Gets the name of the property to use as a key for the item (data value).
Gets or sets a value that determines whether to use mapped (display) or raw values when sorting the data.
getDisplayValue(key: any): any
Gets the display value that corresponds to a given key.
The key of the item to retrieve.
getDisplayValues(dataItem?: any): string[]
Gets an array with all of the display values on the map.
Data item for which to get the display items. This parameter is optional. If not provided, all possible display values should be returned.
getKeyValue(displayValue: string): any
Gets the key that corresponds to a given display value.
The display value of the item to retrieve.
getKeyValues(): string[]
Gets an array with all of the keys on the map.
onMapChanged(e?: EventArgs): void
Raises the mapChanged event.
The FlexGrid control provides a powerful and flexible way to display and edit data in a tabular format.
The FlexGrid control is a full-featured grid, providing all the features you are used to including several selection modes, sorting, column reordering, grouping, filtering, editing, custom cells, XAML-style star-sizing columns, row and column virtualization, etc.
constructor(element: any, options?): FlexGrid
Initializes a new instance of the FlexGrid class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Gets the IEditableCollectionView that contains the grid data.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
The GridPanel that contains the range.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to clip the merged range to the grid's current view range.
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs when the grid starts creating/updating the elements that make up the current view.
Provides arguments for the formatItem event.
constructor(p: GridPanel, rng: CellRange, cell: HTMLElement): FormatItemEventArgs
Initializes a new instance of the FormatItemEventArgs class.
GridPanel that contains the range.
Range of cells affected by the event.
Element that represents the grid cell to be formatted.
Gets or sets a value that indicates whether the event should be canceled.
Gets a reference to the element that represents the grid cell to be formatted.
Provides a value to use with events that do not have event data.
Represents a logical part of the grid, such as the column headers, row headers, and scrollable data part.
constructor(g: FlexGrid, cellType: CellType, rows: RowCollection, cols: ColumnCollection, host: HTMLElement): GridPanel
Initializes a new instance of the GridPanel class.
The FlexGrid object that owns the panel.
The type of cell in the panel.
The rows displayed in the panel.
The columns displayed in the panel.
The HTMLElement that hosts the cells in the control.
Gets the total height of the content in this panel.
Gets the host element for the panel.
Gets a CellRange that indicates the range of cells currently visible on the panel.
Gets the total width of the content in the panel.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a cell's bounds in viewport coordinates.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same as those used by the getBoundingClientRect method.
The index of the row that contains the cell.
The index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: any, formatted: boolean): any
Gets the value stored in a cell in the panel.
The row index of the cell.
The index, name, or binding of the column that contains the cell.
Whether to format the value for display.
getCellElement(r: number, c: number): HTMLElement
Gets the element that represents a cell within this GridPanel.
If the cell is not currently in view, this method returns null.
The index of the row that contains the cell.
The index of the column that contains the cell.
getSelectedState(r: number, c: number, rng: CellRange): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
CellRange that contains the cell to inspect.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the content of a cell in the panel.
The index of the row that contains the cell.
The index, name, or binding of the column that contains the cell.
The value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
Represents a row that serves as a header for a group of rows.
constructor(): GroupRow
Initializes a new instance of the GroupRow class.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets or sets the item in the data collection that the item is bound to.
Gets a value that indicates whether the group row has child rows.
Gets or sets the height of the row. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the GroupRow is collapsed (child rows are hidden) or expanded (child rows are visible).
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets or sets the hierarchical level of the group associated with the GroupRow.
Gets the render height of the row.
The value returned takes into account the row's visibility, default size, and min and max sizes.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets a value that indicates whether cells in the row or column wrap their content.
getCellRange(): CellRange
Gets a CellRange object that contains all of the rows in the group represented by this GroupRow and all of the columns in the grid.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Contains information about the part of a FlexGrid control at a given position on the page.
constructor(grid: any, pt: any): HitTestInfo
Initializes a new instance of the HitTestInfo class.
The FlexGrid control, GridPanel, or cell element to investigate.
The Point object in page coordinates to investigate.
Gets the column index of the cell at the specified position.
Gets a value that indicates whether the mouse is near the bottom edge of the cell.
Gets a value that indicates whether the mouse is near the left edge of the cell.
Gets a value that indicates whether the mouse is near the right edge of the cell.
Gets a value that indicates whether the mouse is near the top edge of the cell.
Gets the row index of the cell at the specified position.
Defines the FlexGrid's cell merging behavior.
An instance of this class is automatically created and assigned to the grid's mergeManager property to implement the grid's default merging behavior.
If you want to customize the default merging behavior, create a class that derives from MergeManager and override the getMergedRange method.
constructor(g: FlexGrid): MergeManager
Initializes a new instance of the MergeManager class.
The FlexGrid object that owns this MergeManager.
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
The GridPanel that contains the range.
The index of the row that contains the cell.
The index of the column that contains the cell.
Whether to clip the merged range to the grid's current view range.
Represents a row in the grid.
constructor(dataItem?: any): Row
Initializes a new instance of the Row class.
The data item that this row is bound to.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets or sets the item in the data collection that the item is bound to.
Gets or sets the height of the row. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets the render height of the row.
The value returned takes into account the row's visibility, default size, and min and max sizes.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets a value that indicates whether cells in the row or column wrap their content.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets the index of the row or column in the parent collection.
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets the position of the row or column.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets a value that indicates whether cells in the row or column wrap their content.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Abstract class that serves as a base for row and column collections.
constructor(g: FlexGrid, defaultSize: number): RowColCollection
Initializes a new instance of the RowColCollection class.
The FlexGrid that owns the collection.
The default size of the elements in the collection.
Gets or sets the default size of elements in the collection.
Gets or sets the number of frozen rows or columns in the collection.
Frozen rows and columns do not scroll, and instead remain at the top or left of the grid, next to the fixed cells. Unlike fixed cells, however, frozen cells may be selected and edited like regular cells.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the maximum size of elements in the collection.
Gets or sets the minimum size of elements in the collection.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canMoveElement(src: number, dst: number): boolean
Checks whether an element can be moved from one position to another.
The index of the element to move.
The position to which to move the element, or specify -1 to append the element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getItemAt(position: number): number
Gets the index of the element at a given physical position.
Position of the item in the collection, in pixels.
getNextCell(index: number, move: SelMove, pageSize: number): void
Finds the next visible cell for a selection change.
Starting index for the search.
Type of move (size and direction).
Size of a page (in case the move is a page up/down).
getTotalSize(): number
Gets the total size of the elements in the collection.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
isFrozen(index: number): boolean
Checks whether a row or column is frozen.
The index of the row or column to check.
moveElement(src: number, dst: number): void
Moves an element from one position to another.
Index of the element to move.
Position where the element should be moved to (-1 to append).
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Keeps track of dirty state and invalidate grid on changes.
push(item: any): number
Appends an item to the array.
Item to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes or adds items to the array.
Position where items are added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
constructor(g: FlexGrid, defaultSize: number): RowColCollection
Initializes a new instance of the RowColCollection class.
The FlexGrid that owns the collection.
The default size of the elements in the collection.
Gets or sets the default size of elements in the collection.
Gets or sets the number of frozen rows or columns in the collection.
Frozen rows and columns do not scroll, and instead remain at the top or left of the grid, next to the fixed cells. Unlike fixed cells, however, frozen cells may be selected and edited like regular cells.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets the maximum group level in the grid.
Gets or sets the maximum size of elements in the collection.
Gets or sets the minimum size of elements in the collection.
Gets the number of visible elements in the collection (isVisible).
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canMoveElement(src: number, dst: number): boolean
Checks whether an element can be moved from one position to another.
The index of the element to move.
The position to which to move the element, or specify -1 to append the element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getItemAt(position: number): number
Gets the index of the element at a given physical position.
Position of the item in the collection, in pixels.
getNextCell(index: number, move: SelMove, pageSize: number): void
Finds the next visible cell for a selection change.
Starting index for the search.
Type of move (size and direction).
Size of a page (in case the move is a page up/down).
getTotalSize(): number
Gets the total size of the elements in the collection.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
isFrozen(index: number): boolean
Checks whether a row or column is frozen.
The index of the row or column to check.
moveElement(src: number, dst: number): void
Moves an element from one position to another.
Index of the element to move.
Position where the element should be moved to (-1 to append).
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Keeps track of dirty state and invalidate grid on changes.
push(item: any): number
Appends an item to the array.
Item to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes or adds items to the array.
Position where items are added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Specifies constants that define the row/column dragging behavior.
| Name | Value | Description |
|---|---|---|
| None | 0 | The user may not drag rows or columns. |
| Columns | 1 | The user may drag columns. |
| Rows | 2 | The user may drag rows. |
| Both | Rows | Columns | The user may drag rows and columns. |
Specifies constants that define which areas of the grid support cell merging.
| Name | Value | Description |
|---|---|---|
| None | 0 | No merging. |
| Cells | 1 | Merge scrollable cells. |
| ColumnHeaders | 2 | Merge column headers. |
| RowHeaders | 4 | Merge row headers. |
| AllHeaders | ColumnHeaders | RowHeaders | Merge column and row headers. |
| All | Cells | AllHeaders | Merge all areas. |
Specifies constants that define the row/column sizing behavior.
| Name | Value | Description |
|---|---|---|
| None | 0 | The user may not resize rows or columns. |
| Columns | 1 | The user may resize columns by dragging the edge of the column headers. |
| Rows | 2 | The user may resize rows by dragging the edge of the row headers. |
| Both | Rows | Columns | The user may resize rows and columns by dragging the edge of the headers. |
| ColumnsAllCells | Columns | _AR_ALLCELLS | The user may resize columns by dragging the edge of any cell. |
| RowsAllCells | Rows | _AR_ALLCELLS | The user may resize rows by dragging the edge of any cell. |
| BothAllCells | Both | _AR_ALLCELLS | The user may resize rows and columns by dragging the edge of any cell. |
Specifies constants that define the row/column auto-sizing behavior.
| Name | Value | Description |
|---|---|---|
| None | 0 | Autosizing is disabled. |
| Headers | 1 | Autosizing accounts for header cells. |
| Cells | 2 | Autosizing accounts for data cells. |
| Both | Headers | Cells | Autosizing accounts for header and data cells. |
Specifies constants that define the type of cell in a GridPanel.
| Name | Value | Description |
|---|---|---|
| None | 0 | Unknown or invalid cell type. |
| Cell | 1 | Regular data cell. |
| ColumnHeader | 2 | Column header cell. |
| RowHeader | 3 | Row header cell. |
| TopLeft | 4 | Top-left cell. |
| ColumnFooter | 5 | Column footer cell. |
| BottomLeft | 6 | Bottom left cell (at the intersection of the row header and column footer cells). |
Specifies constants that define the visibility of row and column headers.
| Name | Value | Description |
|---|---|---|
| None | 0 | No header cells are displayed. |
| Column | 1 | Only column header cells are displayed. |
| Row | 2 | Only row header cells are displayed. |
| All | 3 | Both column and row header cells are displayed. |
Specifies constants that define the action to perform when special keys such as ENTER and TAB are pressed.
| Name | Value | Description |
|---|---|---|
| None | 0 | No special action (let the browser handle the key). |
| MoveDown | 1 | Move the selection to the next row. |
| MoveAcross | 2 | Move the selection to the next column. |
| Cycle | 3 | Move the selection to the next column, then wrap to the next row. |
| CycleOut | 4 | Move the selection to the next column, then wrap to the next row, then out of the control. |
Specifies flags that represent the state of a grid row or column.
| Name | Value | Description |
|---|---|---|
| Visible | 1 | The row or column is visible. |
| AllowResizing | 2 | The row or column can be resized. |
| AllowDragging | 4 | The row or column can be dragged to a new position with the mouse. |
| AllowMerging | 8 | The row or column can contain merged cells. |
| AllowSorting | 16 | The column can be sorted by clicking its header with the mouse. |
| AutoGenerated | 32 | The column was generated automatically. |
| Collapsed | 64 | The group row is collapsed. |
| ParentCollapsed | 128 | The row has a parent group that is collapsed. |
| Selected | 256 | The row or column is selected. |
| ReadOnly | 512 | The row or column is read-only (cannot be edited). |
| HtmlContent | 1024 | Cells in this row or column contain HTML text. |
| WordWrap | 2048 | Cells in this row or column may contain wrapped text. |
| RowDefault | Visible | AllowResizing | Default settings for new rows. |
| ColumnDefault | Visible | AllowDragging | AllowResizing | AllowSorting | Default settings for new columns. |
Specifies constants that represent the selected state of a cell.
| Name | Value | Description |
|---|---|---|
| None | 0 | The cell is not selected. |
| Selected | 1 | The cell is selected but is not the active cell. |
| Cursor | 2 | The cell is selected and is the active cell. |
Specifies constants that define the selection behavior.
| Name | Value | Description |
|---|---|---|
| None | 0 | The user cannot select cells using the mouse or keyboard. |
| Cell | 1 | The user can select only a single cell at a time. |
| CellRange | 2 | The user can select contiguous blocks of cells. |
| Row | 3 | The user can select a single row at a time. |
| RowRange | 4 | The user can select contiguous rows. |
| ListBox | 5 | The user can select non-contiguous rows. |
Specifies constants that represent a type of movement for the selection.
| Name | Value | Description |
|---|---|---|
| None | 0 | Do not change the selection. |
| Next | 1 | Select the next visible cell. |
| Prev | 2 | Select the previous visible cell. |
| NextPage | 3 | Select the first visible cell in the next page. |
| PrevPage | 4 | Select the first visible cell in the previous page. |
| Home | 5 | Select the first visible cell. |
| End | 6 | Select the last visible cell. |
| NextCell | 7 | Select the next visible cell skipping rows if necessary. |
| PrevCell | 8 | Select the previous visible cell skipping rows if necessary. |
Extension that provides an Excel-style filtering UI for FlexGrid controls.
Defines a filter for a column on a FlexGrid control.
The ColumnFilter contains a ConditionFilter and a ValueFilter; only one of them may be active at a time.
This class is used by the FlexGridFilter class; you rarely use it directly.
constructor(owner: FlexGridFilter, column: Column): ColumnFilter
Initializes a new instance of the ColumnFilter class.
The FlexGridFilter that owns this column filter.
The Column to filter.
Gets or sets the DataMap used to convert raw values into display values shown when editing this filter.
The example below assigns a DataMap to Boolean column filters so the filter editor displays 'Yes' and 'No' instead of 'true' and 'false':
var filter = new wijmo.grid.filter.FlexGridFilter(grid),
map = new wijmo.grid.DataMap([
{ value: true, caption: 'Yes' },
{ value: false, caption: 'No' },
], 'value', 'caption');
for (var c = 0; c < grid.columns.length; c++) {
if (grid.columns[c].dataType == wijmo.DataType.Boolean) {
filter.getColumnFilter(c).dataMap = map;
}
}Gets or sets the types of filtering provided by this filter.
Setting this property to null causes the filter to use the value defined by the owner filter's defaultFilterType property.
Gets a value that indicates whether the filter is active.
apply(value): boolean
Gets a value that indicates whether a value passes the filter.
The value to test.
clear(): void
Clears the filter.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
The editor used to inspect and modify column filters.
This class is used by the FlexGridFilter class; you rarely use it directly.
constructor(element: any, filter: ColumnFilter, sortButtons?: boolean): ColumnFilterEditor
Initializes a new instance of the ColumnFilterEditor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The ColumnFilter to edit.
Whether to show sort buttons in the editor.
Gets or sets the template used to instantiate ColumnFilterEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onButtonClicked(e?: EventArgs): void
Raises the buttonClicked event.
onFilterChanged(e?: EventArgs): void
Raises the filterChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
updateEditor(): void
Updates editor with current filter settings.
updateFilter(): void
Updates filter with current editor settings.
Defines a condition filter for a column on a FlexGrid control.
Condition filters contain two conditions that may be combined using an 'and' or an 'or' operator.
This class is used by the FlexGridFilter class; you will rarely use it directly.
constructor(column: Column): ConditionFilter
Initializes a new instance of the ConditionFilter class.
The column to filter.
Gets a value that indicates whether to combine the two conditions with an AND or an OR operator.
Gets or sets the DataMap used to convert raw values into display values shown when editing this filter.
Gets a value that indicates whether the filter is active.
The filter is active if at least one of the two conditions has its operator and value set to a valid combination.
apply(value): boolean
Returns a value indicating whether a value passes this filter.
The value to test.
clear(): void
Clears the filter.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
The editor used to inspect and modify ConditionFilter objects.
This class is used by the FlexGridFilter class; you rarely use it directly.
constructor(element: any, filter: ConditionFilter): ConditionFilterEditor
Initializes a new instance of the ConditionFilterEditor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The ConditionFilter to edit.
Gets or sets the template used to instantiate ConditionFilterEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
clearEditor(): void
Clears the editor without applying changes to the filter.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
updateEditor(): void
Updates editor with current filter settings.
updateFilter(): void
Updates filter to reflect the current editor values.
Defines a filter condition.
This class is used by the FlexGridFilter class; you will rarely have to use it directly.
Gets a value that indicates whether the condition is active.
apply(value): boolean
Returns a value that determines whether the given value passes this FilterCondition.
The value to test.
clear(): void
Clears the condition.
Implements an Excel-style filter for FlexGrid controls.
To enable filtering on a FlexGrid control, create an instance of the FlexGridFilter and pass the grid as a parameter to the constructor. For example:
// create FlexGrid
var flex = new wijmo.grid.FlexGrid('#gridElement');
// enable filtering on the FlexGrid
var filter = new wijmo.grid.filter.FlexGridFilter(flex);
Once this is done, a filter icon is added to the grid's column headers. Clicking the icon shows an editor where the user can edit the filter conditions for that column.
The FlexGridFilter class depends on the wijmo.grid and wijmo.input modules.
constructor(grid: FlexGrid, options?: any): FlexGridFilter
Initializes a new instance of the FlexGridFilter class.
The FlexGrid to filter.
Initialization options for the FlexGridFilter.
Gets or sets the default filter type to use.
This value can be overridden in filters for specific columns. For example, the code below creates a filter that filters by conditions on all columns except the "ByValue" column:
var f = new wijmo.grid.filter.FlexGridFilter(flex);
f.defaultFilterType = wijmo.grid.filter.FilterType.Condition;
var col = flex.columns.getColumn('ByValue'),
cf = f.getColumnFilter(col);
cf.filterType = wijmo.grid.filter.FilterType.Value;Gets or sets an array containing the names or bindings of the columns that have filters.
Setting this property to null or to an empty array adds filters to all columns.
Gets or sets the current filter definition as a JSON string.
Gets or sets a value indicating whether the FlexGridFilter adds filter editing buttons to the grid's column headers.
If you set this property to false, then you are responsible for providing a way for users to edit, clear, and apply the filters.
Gets or sets a value indicating whether the filter editor should include sort buttons.
By default, the editor shows sort buttons like Excel does. But since users can sort columns by clicking their headers, sort buttons in the filter editor may not be desirable in some circumstances.
apply(): void
Applies the current column filters to the grid.
clear(): void
Clears all column filters.
closeEditor(): void
Closes the filter editor.
editColumnFilter(col: any, ht?: HitTestInfo): void
Shows the filter editor for the given grid column.
The Column that contains the filter to edit.
A HitTestInfo object containing the range of the cell that triggered the filter display.
getColumnFilter(col: any, create?: boolean): ColumnFilter
Gets the filter for the given column.
The Column that the filter applies to (or column name or index).
Whether to create the filter if it does not exist.
onFilterApplied(e?: EventArgs): void
Raises the filterApplied event.
onFilterChanged(e: CellRangeEventArgs): void
Raises the filterChanged event.
onFilterChanging(e: CellRangeEventArgs): void
Raises the filterChanging event.
Occurs after a column filter has been edited by the user.
Use the event parameters to determine the column that owns the filter and whether changes were applied or canceled.
Occurs when a column filter is about to be edited by the user.
Use this event to customize the column filter if you want to override the default settings for the filter.
For example, the code below sets the operator used by the filter conditions to 'contains' if they are null:
filter.filterChanging.addHandler(function (s, e) {
var cf = filter.getColumnFilter(e.col);
if (!cf.valueFilter.isActive && cf.conditionFilter.condition1.operator == null) {
cf.filterType = wijmo.grid.filter.FilterType.Condition;
cf.conditionFilter.condition1.operator = wijmo.grid.filter.Operator.CT;
}
});Defines a value filter for a column on a FlexGrid control.
Value filters contain an explicit list of values that should be displayed by the grid.
constructor(column: Column): ValueFilter
Initializes a new instance of the ValueFilter class.
The column to filter.
Gets or sets the DataMap used to convert raw values into display values shown when editing this filter.
Gets or sets a string used to filter the list of display values.
Gets a value that indicates whether the filter is active.
The filter is active if there is at least one value is selected.
Gets or sets the maximum number of elements on the list of display values.
Adding too many items to the list makes searching difficult and hurts performance. This property limits the number of items displayed at any time, but users can still use the search box to filter the items they are interested in.
This property is set to 250 by default.
This code changes the value to 1,000,000, effectively listing all unique values for the field:
// change the maxItems property for the 'id' column:
var f = new wijmo.grid.filter.FlexGridFilter(s);
f.getColumnFilter('id').valueFilter.maxValues = 1000000;Gets or sets an object with all the formatted values that should be shown on the value list.
Gets or sets a value that determines whether the values should be sorted when displayed in the editor.
This property is especially useful when you are using the uniqueValues to provide a custom list of values property and you would like to preserve the order of the values.
Gets or sets an array containing the unique values to be displayed on the list.
If this property is set to null, the list will be filled based on the grid data.
Explicitly assigning the list of unique values is more efficient than building the list from the data, and is required for value filters to work properly when the data is filtered on the server (because in this case some values might not be present on the client so the list will be incomplete).
By default, the filter editor will sort the unique values when displaying them to the user. If you want to prevent that and show the values in the order you provided, set the sortValues property to false.
For example, the code below provides a list of countries to be used in the ValueFilter for the column bound to the 'country' field:
// create filter for a FlexGrid
var filter = new wijmo.grid.filter.FlexGridFilter(grid);
// assign list of unique values to country filter
var cf = filter.getColumnFilter('country');
cf.valueFilter.uniqueValues = countries;apply(value): boolean
Gets a value that indicates whether a value passes the filter.
The value to test.
clear(): void
Clears the filter.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
The editor used to inspect and modify ValueFilter objects.
This class is used by the FlexGridFilter class; you rarely use it directly.
constructor(element: any, filter: ValueFilter): ValueFilterEditor
Initializes a new instance of the ValueFilterEditor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The ValueFilter to edit.
Gets or sets the template used to instantiate ColumnFilterEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
clearEditor(): void
Clears the editor without applying changes to the filter.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
updateEditor(): void
Updates editor with current filter settings.
updateFilter(): void
Updates filter to reflect the current editor values.
Defines a filter for a column on a FlexGrid control.
This class is used by the FlexGridFilter class; you rarely use it directly.
| Name | Value | Description |
|---|---|---|
| None | 0 | No filter. |
| Condition | 1 | A filter based on two conditions. |
| Value | 2 | A filter based on a set of values. |
| Both | 3 | A filter that combines condition and value filters. |
Specifies filter condition operators.
| Name | Value | Description |
|---|---|---|
| EQ | 0 | Equals. |
| NE | 1 | Does not equal. |
| GT | 2 | Greater than. |
| GE | 3 | Greater than or equal to. |
| LT | 4 | Less than. |
| LE | 5 | Less than or equal to. |
| BW | 6 | Begins with. |
| EW | 7 | Ends with. |
| CT | 8 | Contains. |
| NC | 9 | Does not contain. |
Extension that provides a drag and drop UI for editing groups in bound FlexGrid controls.
The GroupPanel control provides a drag and drop UI for editing groups in a bound FlexGrid control.
It allows users to drag columns from the FlexGrid into the panel and to move groups within the panel. Users may click the group markers in the panel to sort based on the group column or to remove groups.
In order to use a GroupPanel, add it to a page that contains a FlexGrid control and set the panel's grid property to the FlexGrid control. For example:
// create a FlexGrid
var flex = new wijmo.grid.FlexGrid('#flex-grid');
flex.itemsSource = getData();
// add a GroupPanel to edit data groups
var groupPanel = new wijmo.grid.grouppanel.GroupPanel('#group-panel');
groupPanel.placeholder = "Drag columns here to create groups.";
groupPanel.grid = flex;constructor(element: any, options?): GroupPanel
Initializes a new instance of the GroupPanel class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the FlexGrid that is connected to this GroupPanel.
Once a grid is connected to the panel, the panel displays the groups defined in the grid's data source. Users can drag grid columns into the panel to create new groups, drag groups within the panel to re-arrange the groups, or delete items in the panel to remove the groups.
Gets or sets a value indicating whether the panel hides grouped columns in the owner grid.
The FlexGrid displays grouping information in row headers, so it is usually a good idea to hide grouped columns since they display redundant information.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the maximum number of groups allowed.
Gets or sets a string to display in the control when it contains no groups.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(): void
Updates the panel to show the current groups.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Extension that provides detail rows for FlexGrid controls.
Merge manager class used by the FlexGridDetailProvider class.
The DetailMergeManager merges detail cells (cells in a DetailRow) into a single detail cell that spans all grid columns.
constructor(grid: FlexGrid): DetailMergeManager
Initializes a new instance of the DetailMergeManager class.
The FlexGrid object that owns this DetailMergeManager.
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
The GridPanel that contains the range.
The index of the row that contains the cell.
The index of the column that contains the cell.
Whether to clip the merged range to the grid's current view range.
Row that contains a single detail cell spanning all grid columns.
constructor(parentRow: Row): DetailRow
Initializes a new instance of the DetailRow class.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets or sets the item in the data collection that the item is bound to.
Gets or sets the HTML element that represents the detail cell in this DetailRow.
Gets or sets the height of the row. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets the render height of the row.
The value returned takes into account the row's visibility, default size, and min and max sizes.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets a value that indicates whether cells in the row or column wrap their content.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Implements detail rows for FlexGrid controls.
To add detail rows to a FlexGrid control, create an instance of a FlexGridDetailProvider and set the createDetailCell property to a function that creates elements to be displayed in the detail cells.
For example:
// create FlexGrid to show categories
var gridCat = new wijmo.grid.FlexGrid('#gridCat');
gridCat.itemsSource = getCategories();
// add detail rows showing products in each category
var detailProvider = new wijmo.grid.detail.FlexGridDetailProvider(gridCat);
detailProvider.createDetailCell = function (row) {
var cell = document.createElement('div');
var gridProducts = new wijmo.grid.FlexGrid(cell);
gridProducts.itemsSource = getProducts(row.dataItem.CategoryID);
return cell;
}
The FlexGridDetailProvider provides a detailVisibilityMode property that determines when the detail rows should be displayed. The default value for this property is ExpandSingle, which adds collapse/expand icons to the row headers.
constructor(grid: FlexGrid, options?: any): FlexGridDetailProvider
Initializes a new instance of the FlexGridDetailProvider class.
FlexGrid that will receive detail rows.
Initialization options for the new FlexGridDetailProvider.
Gets or sets the callback function that creates detail cells.
The callback function takes a Row as a parameter and returns an HTML element representing the row details. For example:
// create detail cells for a given row
dp.createDetailCell = function (row) {
var cell = document.createElement('div');
var detailGrid = new wijmo.grid.FlexGrid(cell, {
itemsSource: getProducts(row.dataItem.CategoryID),
headersVisibility: wijmo.grid.HeadersVisibility.Column
});
return cell;
};Gets or sets a value that determines when row details are displayed.
Gets or sets the callback function that disposes of detail cells.
The callback function takes a Row as a parameter and disposes of any resources associated with the detail cell.
This function is optional. Use it in cases where the createDetailCell function allocates resources that are not automatically garbage-collected.
Gets or sets a value that indicates whether to use animation when showing row details.
Gets or sets the maximum height of the detail rows, in pixels.
Gets or sets the callback function that determines whether a row has details.
The callback function takes a Row as a parameter and returns a boolean value that indicates whether the row has details. For example:
// remove details from items with odd CategoryID
dp.rowHasDetail = function (row) {
return row.dataItem.CategoryID % 2 == 0;
};
Setting this property to null indicates all rows have details.
getDetailRow(row: any): DetailRow
Gets the detail row associated with a given grid row.
Row or index of the row to investigate.
hideDetail(row?: any): void
Hides the detail row for a given row.
Row or index of the row that will have its details hidden. This parameter is optional. If not provided, all detail rows are hidden.
isDetailAvailable(row: any): boolean
Gets a value that determines if a row has details to show.
Row or index of the row to investigate.
isDetailVisible(row: any): boolean
Gets a value that determines if a row's details are visible.
Row or index of the row to investigate.
showDetail(row: any, hideOthers?: boolean): void
Shows the detail row for a given row.
Row or index of the row that will have its details shown.
Whether to hide details for all other rows.
Specifies when and how the row details are displayed.
| Name | Value | Description |
|---|---|---|
| Code | 0 | Details are shown or hidden in code, using the showDetail and hideDetail methods. |
| Selection | 1 | Details are shown for the row that is currently selected. |
| ExpandSingle | 2 | Details are shown or hidden using buttons added to the row headers. Only one row may be expanded at a time. |
| ExpandMulti | 3 | Details are shown or hidden using buttons added to the row headers. Multiple rows may be expanded at a time. |
Extension that defines the FlexGridXlsxConverter class that provides client-side Excel xlsx file save/load capabilities for the FlexGrid control.
This class provides static load and save methods for loading and saving FlexGrid controls from and to Excel xlsx files.
load(grid: FlexGrid, workbook: any, options?: IFlexGridXlsxOptions): void
Loads a Workbook instance or a Blob object containing xlsx file content to the FlexGrid instance. This method works with JSZip 2.5.
For example:
// This sample opens an xlsx file chosen through Open File
// dialog and fills FlexGrid with the content of the first
// sheet.
// HTML
<input type="file"
id="importFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
/>
<div id="flexHost"></>
// JavaScript
var flexGrid = new wijmo.grid.FlexGrid("#flexHost"),
importFile = document.getElementById('importFile');
importFile.addEventListener('change', function () {
loadWorkbook();
});
function loadWorkbook() {
var reader,
file = importFile.files[0];
if (file) {
reader = new FileReader();
reader.onload = function (e) {
wijmo.grid.xlsx.FlexGridXlsxConverter.load(flexGrid, reader.result,
{ includeColumnHeaders: true });
};
reader.readAsArrayBuffer(file);
}
}A Workbook, Blob, base-64 string, or ArrayBuffer containing the xlsx file content.
IFlexGridXlsxOptions object specifying the load options.
loadAsync(grid: FlexGrid, workbook: any, options?: IFlexGridXlsxOptions, onLoaded?: Workbook), onError?: (reason?: any)): void
Asynchronously loads a Workbook or a Blob representing an xlsx file into a FlexGrid.
This method requires JSZip 3.0.
Workbook, Blob, base-64 string, or ArrayBuffer representing the xlsx file content.
IFlexGridXlsxOptions object specifying the load options.
Callback invoked when the method finishes executing. The callback provides access to the workbook that was loaded (passed as a parameter to the callback).
Callback invoked when there are errors saving the file. The error is passed as a parameter to the callback.
For example:
wijmo.grid.xlsx.FlexGridXlsxConverter.loadAsync(grid, blob, null, function (workbook) {
// user can access the loaded workbook instance in this callback.
var app = worksheet.application ;
...
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of save failure is ' + reason);
});save(grid: FlexGrid, options?: IFlexGridXlsxOptions, fileName?: string): Workbook
Save the FlexGrid instance to the Workbook instance. This method works with JSZip 2.5.
For example:
// This sample exports FlexGrid content to an xlsx file.
// click.
// HTML
<button
onclick="saveXlsx('FlexGrid.xlsx')">
Save
</button>
// JavaScript
function saveXlsx(fileName) {
// Save the flexGrid to xlsx file.
wijmo.grid.xlsx.FlexGridXlsxConverter.save(flexGrid,
{ includeColumnHeaders: true }, fileName);
}FlexGrid that will be saved.
IFlexGridXlsxOptions object specifying the save options.
Name of the file that will be generated.
saveAsync(grid: FlexGrid, options?: IFlexGridXlsxOptions, fileName?: string, onSaved?: (base64: string), onError?: (reason?: any)): Workbook
Asynchronously saves the content of a FlexGrid to a file.
This method requires JSZip 3.0.
FlexGrid that will be saved.
IFlexGridXlsxOptions object specifying the save options.
Name of the file that will be generated.
Callback invoked when the method finishes executing. The callback provides access to the content of the saved workbook (encoded as a base-64 string and passed as a parameter to the callback).
Callback invoked when there are errors saving the file. The error is passed as a parameter to the callback.
For example:
wijmo.grid.xlsx.FlexGridXlsxConverter.saveAsync(flexGrid,
{ includeColumnHeaders: true }, // options
'FlexGrid.xlsx', // filename
function (base64) { // onSaved
// User can access the base64 string in this callback.
document.getElementByID('export').href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;' + 'base64,' + base64;
},
function (reason) { // onError
// User can catch the failure reason in this callback.
console.log('The reason of save failure is ' + reason);
}
);Represents arguments of the IFlexGridXlsxOptions.formatItem callback.
constructor(p: GridPanel, rng: CellRange, data?: any): CellRangeEventArgs
Initializes a new instance of the CellRangeEventArgs class.
GridPanel that contains the range.
Range of cells affected by the event.
Data related to the event.
Gets or sets a value that indicates whether the event should be canceled.
If IFlexGridXlsxOptions.includeCellStyles is set to true then contains a reference to the element that represents the formatted grid cell; otherwise, a null value.
Provides a value to use with events that do not have event data.
Contains an exporting cell representation. Initially it contains a default cell representation created by FlexGrid export, and can be modified by the event handler to customize its final content. For example, the xlsxCell.value property can be updated to modify a cell content, xlsxCell.style to modify cell's style, and so on.
getFormattedCell(): HTMLElement
Returns a cell with a custom formatting applied (formatItem event, cell templates). This method is useful when export of custom formatting is disabled (IFlexGridXlsxOptions.includeCellStyles=false), but you need to export a custom content and/or style for a certain cells.
Defines additional worksheet properties that can be accesses via the dynamic wj_sheetInfo property of the FlexGrid instance.
Contains an array of font names used in the sheet.
Merged ranges in the sheet
The sheet name.
Styled cells in the sheet
The name of tables refered in this worksheet.
Sheet visibility.
FlexGrid Xlsx conversion options
Index or name of the active sheet in the xlsx file.
An optional callback which is called for every exported cell and allows to perform transformations of exported cell value and style. The callback is called irrespectively of the 'includeCellStyles' property value.
Indicates whether cells styling should be included in the generated xlsx file.
Indicates whether to include column headers as first rows in the generated xlsx file.
A callback to indicate which columns of FlexGrid need be included or omitted during exporting.
For example:
// This sample excludes the 'country' column from export.
// JavaScript
wijmo.grid.xlsx.FlexGridXlsxConverter.save(grid, {
includeColumns: function(column) {
return column.binding !== 'country';
}
}Indicates whether to include column headers as first rows in the generated xlsx file.
The index of the sheet in the workbook. It indicates to import which sheet.
The name of the sheet. It indicates to import which sheet for importing. If the sheetIndex and sheetName are both setting, the priority of sheetName is higher than sheetIndex. It sets the name of worksheet for exporting.
The visible of the sheet.
Defines the MultiRow control and its associated classes.
Extends the FlexGrid control to provide multiple rows per item.
Use the layoutDefinition property to define the layout of the rows used to display each data item.
A few FlexGrid properties are disabled in the MultiRow control because they would interfere with the custom multi-row layouts. The list of disabled properties includes allowMerging and childItemsPath.
constructor(element: any, options?): MultiRow
Initializes a new instance of the MultiRow class.
In most cases, the options parameter will include the value for the layoutDefinition property.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets a value that determines whether the content of cells that span multiple rows should be vertically centered.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets or sets a value that determines whether column headers should be collapsed and displayed as a single row containing the group headers.
If you set the collapsedHeaders property to true, remember to set the header property of every group in order to avoid empty header cells.
Setting the collapsedHeaders property to null causes the grid to show all header information (groups and columns). In this case, the first row will show the group headers and the remaining rows will show the individual column headers.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets the template used to instantiate FlexGrid controls.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Gets or sets an array that defines the layout of the rows used to display each data item.
The array contains a list of cell group objects which have the following properties:
When the layoutDefinition property is set, the grid scans the cells in each group as follows:
When all groups are ready, the grid calculates the number of rows per record to the maximum rowspan of all groups, and adds rows to each group to pad their height as needed.
This scheme is simple and flexible. For example:
{ header: 'Group 1', cells: [{ binding: 'c1' }, { bnding: 'c2'}, { binding: 'c3' }]}
The group has colspan 1, so there will be one cell per column. The result is:
| C1 | | C2 | | C3 |
To create a group with two columns, set colspan property of the group:
{ header: 'Group 1', colspan: 2, cells:[{ binding: 'c1' }, { binding: 'c2'}, { binding: 'c3' }]}
The cells will wrap as follows:
| C1 | C2 | | C3 |
Note that the last cell spans two columns (to fill the group).
You can also specify the colspan on individual cells rather than on the group:
{ header: 'Group 1', cells: [{binding: 'c1', colspan: 2 }, { bnding: 'c2'}, { binding: 'c3' }]}
Now the first cell has colspan 2, so the result is:
| C1 | | C2 | C3 |
Because cells extend the Column class, you can add all the usual Column properties to any cells:
{ header: 'Group 1', cells: [
{ binding: 'c1', colspan: 2 },
{ bnding: 'c2'},
{ binding: 'c3', format: 'n0', required: false, etc... }
]}Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets the number of rows used to display each item.
This value is calculated automatically based on the value of the layoutDefinition property.
Gets or sets a Point that represents the value of the grid's scrollbars.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that determines whether the grid should display a button in the column header panel to allow users to collapse and expand the column headers.
If the button is visible, clicking on it will cause the grid to toggle the value of the collapsedHeaders property.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getBindingColumn(p: GridPanel, r: number, c: number): Column
Gets the Column object used to bind a data item to a grid cell.
GridPanel that contains the cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Defines input controls for strings, numbers, dates, times, and colors.
The AutoComplete control is an input control that allows callers to customize the item list as the user types.
The control is similar to the ComboBox, except the item source is a function (itemsSourceFunction) rather than a static list. For example, you can look up items on remote databases as the user types.
The example below creates an AutoComplete control and populates it using a 'countries' array. The AutoComplete searches for the country as the user types, and narrows down the list of countries that match the current input.
constructor(element: any, options?: any): AutoComplete
Initializes a new instance of the AutoComplete class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the CSS class used to highlight any parts of the content that match the search terms.
Gets or sets the delay, in milliseconds, between when a keystroke occurs and when the search is performed.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets a function that provides list items dynamically as the user types.
The function takes three parameters:
For example:
autoComplete.itemsSourceFunction = function (query, max, callback) {
// get results from the server
var params = { query: query, max: max };
$.getJSON('companycatalog.ashx', params, function (response) {
// return results to the control
callback(response);
});
};Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display in the drop-down list.
Gets or sets the minimum input length to trigger auto-complete suggestions.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a string containing a comma-separated list of properties to use when searching for items.
By default, the AutoComplete control searches for matches against the property specified by the displayMemberPath property. The searchMemberPath property allows you to search using additional properties.
For example, the code below would cause the control to display the company name and search by company name, symbol, and country:
var ac = new wijmo.input.AutoComplete('#autoComplete', {
itemsSource: companies,
displayMemberPath: 'name',
searchMemberPath: 'symbol,country'
});Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
The Calendar control displays a one-month calendar and allows users to select a date.
You may use the min and max properties to restrict the range of dates that the user can select.
For details about using the min and max properties, please see the Using the min and max properties topic.
Use the value property to get or set the currently selected date.
Use the selectionMode property to determine whether users should be allowed to select days, months, or no values at all.
The example below shows a Date value with date and time information using an InputDate and an InputTime control. Notice how both controls are bound to the same controller variable, and each edits the appropriate information (either date or time). The example also shows a Calendar control that allows users to select the date with a single click.
constructor(element: any, options?): Calendar
Initializes a new instance of the Calendar class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the month displayed in the calendar.
Gets or sets a value that represents the first day of the week, the one displayed in the first column of the calendar.
Setting this property to null causes the calendar to use the default for the current culture. In the English culture, the first day of the week is Sunday (0); in most European cultures, the first day of the week is Monday (1).
Gets or sets the format used to display the headers above the days in month view.
The default value for this property is 'ddd'.
Gets or sets the format used to display the days in month view.
The default value for this property is 'd ' (the space after the 'd' prevents the format from being interpreted as 'd', the standard format used to represent the short date pattern).
Gets or sets the format used to display the months in year view.
The default value for this property is 'MMM'.
Gets or sets the format used to display the year above the months in year view.
The default value for this property is 'yyyy'.
Gets or sets the format used to display the month and year above the calendar in month view.
The default value for this property is 'y'.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
calendar.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below shows weekends in a disabled state and prevents users from selecting those dates:
calendar.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Gets or sets the latest date that the user can select in the calendar.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can select in the calendar.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets a value indicating whether the calendar displays a month or a year.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
Gets or sets a value indicating whether the control displays the header area with the current month and navigation buttons.
Gets or sets the currently selected date.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onDisplayMonthChanged(e?: EventArgs): void
Raises the displayMonthChanged event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Occurs when an element representing a day in the calendar has been created.
This event can be used to format calendar items for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, the code below uses the formatItem event to disable weekends so they appear dimmed in the calendar:
// disable Sundays and Saturdays
calendar.formatItem.addHandler(function (s, e) {
var day = e.data.getDay();
if (day == 0 || day == 6) {
wijmo.addClass(e.item, 'wj-state-disabled');
}
});The ColorPicker control allows users to select a color by clicking on panels to adjust color channels (hue, saturation, brightness, alpha).
Use the value property to get or set the currently selected color.
The control is used as a drop-down for the InputColor control.
constructor(element: any, options?): ColorPicker
Initializes a new instance of the ColorPicker class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets an array that contains the colors in the palette.
The palette contains ten colors, represented by an array with ten strings. The first two colors are usually white and black.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the ColorPicker allows users to edit the color's alpha channel (transparency).
Gets or sets a value indicating whether the ColorPicker shows a string representation of the current color.
Gets or sets the currently selected color.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
The ComboBox control allows users to pick strings from lists.
The control automatically completes entries as the user types, and allows users to show a drop-down list with the items available.
Use the itemsSource property to populate the list of options. The items may be strings or objects. If the items are objects, use the displayMemberPath to define which property of the items will be displayed in the list and use the selectedValuePath property to define which property of the items will be used to set the combo's selectedValue property.
Use the selectedIndex or the text properties to determine which item is currently selected.
The isEditable property determines whether users can enter values that are not present in the list.
The example below creates a ComboBox control and populates it with a list of countries. The ComboBox searches for the country as the user types. The isEditable property is set to false, so the user is forced to select one of the items in the list.
The example also shows how to create and populate a ComboBox using an HTML <select> element with <option> child elements.
constructor(element: any, options?): ComboBox
Initializes a new instance of the ComboBox class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
DropDown control (abstract).
Contains an input element and a button used to show or hide the drop-down.
Derived classes must override the _createDropDown method to create whatever editor they want to show in the drop down area (a list of items, a calendar, a color editor, etc).
constructor(element: any, options?): DropDown
Initializes a new instance of the DropDown class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the text shown on the control.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Provides arguments for the formatItem event.
constructor(index: number, data: any, item: HTMLElement): FormatItemEventArgs
Initializes a new instance of the FormatItemEventArgs class.
Index of the item being formatted.
Data item being formatted.
Element that represents the list item to be formatted.
Gets the data item being formatted.
Provides a value to use with events that do not have event data.
Gets the index of the data item in the list.
Gets a reference to the element that represents the list item to be formatted.
The InputColor control allows users to select colors by typing in HTML-supported color strings, or to pick colors from a drop-down that shows a ColorPicker control.
Use the value property to get or set the currently selected color.
constructor(element: any, options?): InputColor
Initializes a new instance of the InputColor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets or sets the template used to instantiate DropDown controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets an array that contains the colors in the palette.
The palette contains ten colors, represented by an array with ten strings. The first two colors are usually white and black.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the ColorPicker allows users to edit the color's alpha channel (transparency).
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the text shown on the control.
Gets or sets the current color.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
The InputDate control allows users to type in dates using any format supported by the Globalize class, or to pick dates from a drop-down box that shows a Calendar control.
Use the min and max properties to restrict the range of values that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Use the value property to gets or set the currently selected date.
The example below shows a Date value (that includes date and time information) using an InputDate and an an InputTime control. Notice how both controls are bound to the same controller variable, and each edits the appropriate information (either date or time). The example also shows a Calendar control that you can use to select the date with a single click.
constructor(element: any, options?): InputDate
Initializes a new instance of the InputDate class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets or sets the template used to instantiate DropDown controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected date.
The format string is expressed as a .NET-style Date format string.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the drop-down calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
inputDate.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below prevents users from selecting dates that fall on weekends:
inputDate.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Gets or sets a mask to use while editing.
The mask format is the same one that the InputMask control uses.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the latest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
This property affects the behavior of the drop-down calendar, but not the format used to display dates. If you set selectionMode to 'Month', you should normally set the format property to 'MMM yyyy' or some format that does not include the day. For example:
var inputDate = new wijmo.input.InputDate('#el, {
selectionMode: 'Month',
format: 'MMM yyyy'
});Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the text shown on the control.
Gets or sets the current date.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
The InputDateTime control extends the InputDate control to allows users to input dates and times, either by typing complete date/time values in any format supported by the Globalize class, or by picking dates from a drop-down calendar and times from a drop-down list.
Use the min and max properties to restrict the range of dates that the user can enter.
Use the timeMin and timeMax properties to restrict the range of times that the user can enter.
Use the value property to gets or set the currently selected date/time.
constructor(element: any, options?): InputDateTime
Initializes a new instance of the InputDateTime class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets a reference to the Calendar control shown in the drop-down box.
Gets or sets the template used to instantiate InputDateTime controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected date.
The format string is expressed as a .NET-style Date format string.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets a reference to the inner InputTime control so you can access its full object model.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the drop-down calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
inputDate.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below prevents users from selecting dates that fall on weekends:
inputDate.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Gets or sets a mask to use while editing.
The mask format is the same one that the InputMask control uses.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the latest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
This property affects the behavior of the drop-down calendar, but not the format used to display dates. If you set selectionMode to 'Month', you should normally set the format property to 'MMM yyyy' or some format that does not include the day. For example:
var inputDate = new wijmo.input.InputDate('#el, {
selectionMode: 'Month',
format: 'MMM yyyy'
});Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the format used to display times in the drop-down list.
This property does not affect the value shown in the control's input element. That value is formatted using the format property.
The format string is expressed as a .NET-style time format string.
Gets or sets the latest time that the user can enter.
Gets or sets the earliest time that the user can enter.
Gets or sets the number of minutes between entries in the drop-down list of times.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
The InputMask control provides a way to govern what a user is allowed to input.
The control prevents users from accidentally entering invalid data and saves time by skipping over literals (such as slashes in dates) as the user types.
The mask used to validate the input is defined by the mask property, which may contain one or more of the following special characters:
constructor(element: any, options?): InputMask
Initializes a new instance of the InputMask class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value indicating whether the control value must be a non-empty string.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the mask used to validate the input as the user types.
The mask is defined as a string with one or more of the masking characters listed in the InputMask topic.
Gets a value that indicates whether the mask has been completely filled.
Gets or sets the string shown as a hint when the control is empty.
Gets or sets the symbol used to show input positions in the control.
Gets or sets the raw value of the control (excluding mask literals).
The raw value of the control excludes prompt and literal characters. For example, if the mask property is set to "AA-9999" and the user enters the value "AB-1234", the rawValue property will return "AB1234", excluding the hyphen that is part of the mask.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the text currently shown in the control.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
The InputNumber control allows users to enter numbers.
The control prevents users from accidentally entering invalid data and formats the number as it is edited.
Pressing the minus key reverses the sign of the value being edited, regardless of cursor position.
You may use the min and max properties to limit the range of acceptable values, and the step property to provide spinner buttons that increase or decrease the value with a click.
For details about using the min and max properties, please see the Using the min and max properties topic.
Use the value property to get or set the currently selected number.
The example below creates several InputNumber controls and shows the effect of using different formats, ranges, and step values.
constructor(element: any, options?): InputNumber
Initializes a new instance of the InputNumber class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the format used to display the number being edited (see Globalize).
The format string is expressed as a .NET-style standard numeric format string.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value indicating whether the control value must be a number or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the largest number that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the smallest number that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the control displays spinner buttons to increment or decrement the value (the step property must be set to a value other than zero).
Gets or sets the amount to add or subtract to the value property when the user clicks the spinner buttons.
Gets or sets the text shown in the control.
Gets or sets the current value of the control.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
The InputTime control allows users to enter times using any format supported by the Globalize class, or to pick times from a drop-down list.
The min, max, and step properties determine the values shown in the list.
For details about using the min and max properties, please see the Using the min and max properties topic.
The value property gets or sets a Date object that represents the time selected by the user.
The example below shows a Date value (that includes date and time information) using an InputDate and an InputTime control. Notice how both controls are bound to the same controller variable, and each edits the appropriate information (either date or time). The example also shows a Calendar control that can be used to select the date with a single click.
constructor(element: any, options?): InputTime
Initializes a new instance of the InputTime class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected time (see Globalize).
The format string is expressed as a .NET-style time format string.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets a mask to use while the user is editing.
The mask format is the same used by the InputMask control.
If specified, the mask must be compatible with the value of the format property. For example, you can use the mask '99:99 >LL' for entering short times (format 't').
Gets or sets the latest time that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the earliest time that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the number of minutes between entries in the drop-down list.
The default value for this property is 15 minutes. Setting it to null, zero, or any negative value disables the drop-down.
Gets or sets the text shown in the control.
Gets or sets the current input time.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Occurs when the value of the text property changes.
The ListBox control displays a list of items which may contain plain text or HTML, and allows users to select items with the mouse or the keyboard.
Use the selectedIndex property to determine which item is currently selected.
You can populate a ListBox using an array of strings or you can use an array of objects, in which case the displayMemberPath property determines which object property is displayed on the list.
To display items that contain HTML rather than plain text, set the isContentHtml property to true.
The example below creates a ListBox control and populates it using a 'countries' array. The control updates its selectedIndex and selectedItem properties as the user moves the selection.
constructor(element: any, options?): ListBox
Initializes a new instance of the ListBox class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets an array containing the items that are currently checked.
Gets or sets the name of the property used to control the CheckBoxes placed next to each item.
Use this property to create multi-select LisBoxes. When an item is checked or unchecked, the control raises the itemChecked event. Use the selectedItem property to retrieve the item that was checked or unchecked, or use the checkedItems property to retrieve the list of items that are currently checked.
Gets or sets the name of the property to use as the visual representation of the items.
Gets or sets a value indicating whether items contain plain text or HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown on the list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
listBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the value or the "role" attribute added to the list items. The default value for this property is "option".
Gets or sets the maximum height of the list.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item.
Gets or sets the item that is currently selected.
Gets or sets the value of the selectedItem obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index: number): string
Gets the text displayed for the item at a given index (as plain text).
The index of the item.
getDisplayValue(index: number): string
Gets the string displayed for the item at a given index.
The string may be plain text or HTML, depending on the setting of the isContentHtml property.
The index of the item.
getItemChecked(index: number): boolean
Gets the checked state of an item on the list.
This method is applicable only on multi-select ListBoxes (see the checkedMemberPath property).
Item index.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isItemEnabled(index: number): void
Gets a value that determines whether the item at a given index is enabled.
The index of the item.
onCheckedItemsChanged(e?: EventArgs): void
Raises the checkedItemsChanged event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onItemChecked(e?: EventArgs): void
Raises the itemChecked event.
onItemsChanged(e?: EventArgs): void
Raises the itemsChanged event.
onLoadedItems(e?: EventArgs): void
Raises the loadedItems event.
onLoadingItems(e?: EventArgs): void
Raises the loadingItems event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
refresh(): void
Refreshes the list.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
setItemChecked(index: number, checked: boolean): void
Sets the checked state of an item on the list.
This method is applicable only on multi-select ListBoxes (see the checkedMemberPath property).
Item index.
Item's new checked state.
showSelection(): void
Highlights the selected item and scrolls it into view.
toggleItemChecked(index: number): void
Toggles the checked state of an item on the list. This method is applicable only to multi-select ListBoxes (see the checkedMemberPath property).
Item index.
Occurs when an element representing a list item has been created.
This event can be used to format list items for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
Occurs when the current item is checked or unchecked by the user.
This event is raised when the checkedMemberPath is set to the name of a property to add CheckBoxes to each item in the control.
Use the selectedItem property to retrieve the item that was checked or unchecked.
Occurs when the value of the selectedIndex property changes.
The Menu control shows a text element with a drop-down list of commands that the user can invoke by click or touch.
The Menu control inherits from ComboBox, so you populate and style it in the same way that you do the ComboBox (see the itemsSource property).
The Menu control adds an itemClicked event that fires when the user selects an item from the menu. The event handler can inspect the Menu control to determine which item was clicked. For example:
var menu = new wijmo.input.Menu(hostElement);
menu.header = 'Main Menu';
menu.itemsSource = ['option 1', 'option 2', 'option 3'];
menu.itemClicked.addHandler(function(sender, args) {
var menu = sender;
alert('Thanks for selecting item ' + menu.selectedIndex + ' from menu ' + menu.header + '!');
});
The example below illustrates how you can create value pickers, command-based menus, and menus that respond to the itemClicked event. The menus in this example are based on HTML <select;> and <option;> elements.
constructor(element: any, options?): Menu
Initializes a new instance of the Menu class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the command to execute when an item is clicked.
Commands are objects that implement two methods:
You can also set commands on individual items using the commandPath property.
Gets or sets the name of the property that contains a parameter to use with the command specified by the commandPath property.
Gets or sets the name of the property that contains the command to execute when the user clicks an item.
Commands are objects that implement two methods:
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether this Menu should act as a split button instead of a regular menu.
The difference between regular menus and split buttons is what happens when the user clicks the menu header. In regular menus, clicking the header shows or hides the menu options. In split buttons, clicking the header raises the itemClicked event and/or invokes the command associated with the last option selected by the user as if the user had picked the item from the drop-down list.
If you want to differentiate between clicks on menu items and the button part of a split button, check the value of the isDroppedDown property of the event sender. If that is true, then a menu item was clicked; if it is false, then the button was clicked.
For example, the code below implements a split button that uses the drop-down list only to change the default item/command, and triggers actions only when the button is clicked:
<-- view -->
<wj-menu is-button="true" header="Run" value="browser"
item-clicked="itemClicked(s, e)">
<wj-menu-item value="'Internet Explorer'">Internet Explorer</wj-menu-item>
<wj-menu-item value="'Chrome'">Chrome</wj-menu-item>
<wj-menu-item value="'Firefox'">Firefox</wj-menu-item>
<wj-menu-item value="'Safari'">Safari</wj-menu-item>
<wj-menu-item value="'Opera'">Opera</wj-menu-item>
</wj-menu>
// controller
$scope.browser = 'Internet Explorer';
$scope.itemClicked = function (s, e) {
// if not dropped down, click was on the button
if (!s.isDroppedDown) {
alert('running ' + $scope.browser);
}
}Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the element that owns this Menu.
This variable is set by the wj-context-menu directive in case a single menu is used as a context menu for several different elements.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hide(): void
Hides the menu.
This method is useful if you want to hide a context menu displayed with the show method.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onItemClicked(e?: EventArgs): void
Raises the itemClicked event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
show(position?: any): void
Shows the menu at a given location.
This method is useful if you want to use the menu as a context menu, attached to one or more elements on the page. For example:
// create menu
var div = document.createElement('div');
var menu = new wijmo.input.Menu(div, {
itemsSource: 'New,Open,Save,Exit'.split(','),
itemClicked: function (s, e) {
alert('thanks for picking ' + menu.selectedIndex);
}
});
// use it as a context menu for one or more elements
var element = document.getElementById('btn');
element.addEventListener('contextmenu', function (e) {
e.preventDefault();
menu.show(e);
});An optional MouseEvent or reference element that determines the position where the menu should be displayed. If not provided, the menu is displayed at the center of the screen.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the user picks an item from the menu.
The handler can determine which item was picked by reading the event sender's selectedIndex property.
Occurs when the value of the selectedIndex property changes.
The MultiAutoComplete control allows users to pick items from lists that contain custom objects or simple strings.
constructor(element: any, options?): MultiAutoComplete
Initializes a new instance of the MultiAutoComplete class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the CSS class used to highlight any parts of the content that match the search terms.
Gets or sets the delay, in milliseconds, between when a keystroke occurs and when the search is performed.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets a function that provides list items dynamically as the user types.
The function takes three parameters:
For example:
autoComplete.itemsSourceFunction = function (query, max, callback) {
// get results from the server
var params = { query: query, max: max };
$.getJSON('companycatalog.ashx', params, function (response) {
// return results to the control
callback(response);
});
};Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display in the drop-down list.
Gets or sets the maximum number of items that can be selected.
Setting this property to null (the default value) allows users to pick any number of items.
Gets or sets the minimum input length to trigger auto-complete suggestions.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a string containing a comma-separated list of properties to use when searching for items.
By default, the AutoComplete control searches for matches against the property specified by the displayMemberPath property. The searchMemberPath property allows you to search using additional properties.
For example, the code below would cause the control to display the company name and search by company name, symbol, and country:
var ac = new wijmo.input.AutoComplete('#autoComplete', {
itemsSource: companies,
displayMemberPath: 'name',
searchMemberPath: 'symbol,country'
});Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets an array containing the items that are currently selected.
Gets or sets the name of the property used to control which item will be selected.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Override the value for indicating control should not display a drop-down button.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onSelectedItemsChanged(e?: EventArgs): void
Raises the selectedItemsChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Occurs when the value of the selectedItems property changes.
The MultiSelect control allows users to select multiple items from drop-down lists that contain custom objects or simple strings.
The MultiSelect control extends ComboBox, with all the usual properties, including itemsSource and displayMemberPath.
Like the ListBox control, it has a checkedMemberPath property that defines the name of the property that determines whether an item is checked or not.
The items currently checked (selected) can be obtained using the checkedItems property.
The control header is fully customizable. By default, it shows up to two items selected and the item count after that. You can change the maximum number of items to display (maxHeaderItems), the message shown when no items are selected (placeholder), and the format string used to show the item count (headerFormat).
Alternatively, you can provide a function to generate the header content based on whatever criteria your application requires (headerFormatter).
constructor(element: any, options?): MultiSelect
Initializes a new instance of the MultiSelect class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets or sets an array containing the items that are currently checked.
Gets or sets the name of the property used to control the checkboxes placed next to each item.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Gets or sets the format string used to create the header content when the control has more than maxHeaderItems items checked.
The format string may contain the '{count}' replacement string which gets replaced with the number of items currently checked. The default value for this property in the English culture is '{count:n0} items selected'.
Gets or sets a function that gets the HTML in the control header.
By default, the control header content is determined based on the placeholder, maxHeaderItems, and on the current selection.
You may customize the header content by specifying a function that returns a custom string based on whatever criteria your application requires.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display on the control header.
If no items are selected, the header displays the text specified by the placeholder property.
If the number of selected items is smaller than or equal to the value of the maxHeaderItems property, the selected items are shown in the header.
If the number of selected items is greater than maxHeaderItems, the header displays the selected item count instead.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the string to be used as a label for the "Select All" checkbox that is displayed when the showSelectAllCheckbox property is set to true.
This property is set to null by default, which causes the control to show a localized version of the string "Select All".
Gets or sets the index of the currently selected item in the drop-down list.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets whether the control should display a "Select All" checkbox above the items to select or de-select all items.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onCheckedItemsChanged(e?: EventArgs): void
Raises the checkedItemsChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Class that shows an element as a popup.
Popups may be have owner elements, in which case they behave as rich tooltips that may be shown or hidden based on actions specified by the showTrigger and hideTrigger properties.
Popups with no owner elements behave like dialogs. They are centered on the screen and displayed using the show method.
To close a Popup, call the hide method.
Alternatively, any clickable elements within a Popup that have the classes starting with the 'wj-hide' string will hide the Popup when clicked and will set the dialogResult property to the class name so the caller may take appropriate action.
For example, the Popup below will be hidden when the user presses the OK or Cancel buttons, and the dialogResult property will be set to either 'wj-hide-cancel' or 'wj-hide-ok':
<button id="btnPopup">Show Popup</button> <wj-popup owner="#btnPopup" style="padding:12px"> <p>Press one of the buttons below to hide the Popup.</p> <hr/> <button class="wj-hide-ok" ng-click="handleOK()">OK</button> <button class="wj-hide-cancel">Cancel</button> </wj-popup>
constructor(element: any, options?: any): Popup
Initializes a new instance of the Popup class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets a value that can be used for handling the content of the Popup after it is hidden.
This property is set to null when the Popup is displayed, and it can be set in response to button click events or in the call to the hide method.
Gets or sets a value to be used as a dialogResult when the user presses the Enter key while the Popup is visible.
If the user presses Enter and the dialogResultEnter property is not null, the popup checks whether all its child elements are in a valid state. If so, the popup is closed and the dialogResult property is set to the value of the dialogResultEnter property.
Gets or sets a value that determines whether the Popup should use a fade-out animation when it is shown.
Gets or sets a value that determines whether the Popup should use a fade-out animation when it is hidden.
Gets or sets the actions that hide the Popup.
By default, the hideTrigger property is set to Blur, which hides the popup when it loses focus.
If you set the hideTrigger property to Click, the popup will be hidden only when the owner element is clicked.
If you set the hideTrigger property to None, the popup will be hidden only when the hide method is called.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value that determines whether the Popup should be displayed as a modal dialog.
Modal dialogs show a dark backdrop that makes the Popup stand out from other content on the page.
If you want to make a dialog truly modal, also set the hideTrigger property to None, so users won't be able to click the backdrop to dismiss the dialog. In this case, the dialog will close only if the hide method is called or if the user presses the Escape key.
Gets or sets the element that owns this Popup.
If the owner is null, the Popup behaves like a dialog. It is centered on the screen and must be shown using the show method.
Gets or sets a value that determines whether the Popup element should be removed from the DOM when the Popup is hidden, as opposed to being hidden.
This property is set to true by default.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the actions that show the Popup.
By default, the showTrigger property is set to Click, which causes the popup to appear when the user clicks the owner element.
If you set the showTrigger property to None, the popup will be shown only when the show method is called.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hide(dialogResult?: any): void
Hides the Popup.
Optional value assigned to the dialogResult property before closing the Popup.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onHidden(e?: EventArgs): void
Raises the hidden event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onShowing(e: CancelEventArgs): boolean
Raises the showing event.
onShown(e?: EventArgs): void
Raises the shown event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
show(modal?: boolean, handleResult?: Function): void
Shows the Popup.
Whether to show the popup as a modal dialog. If provided, this sets the value of the modal property.
Callback invoked when the popup is hidden. If provided, this should be a function that receives the popup as a parameter.
The handleResult callback allows callers to handle the result of modal dialogs without attaching handlers to the hidden event. For example, the code below shows a dialog used to edit the current item in a CollectionView. The edits are committed or canceled depending on the dialogResult value. For example:
$scope.editCurrentItem = function () {
$scope.data.editItem($scope.data.currentItem);
$scope.itemEditor.show(true, function (e) {
if (e.dialogResult == 'wj-hide-ok') {
$scope.data.commitEdit();
} else {
$scope.data.cancelEdit();
}
});
}Specifies constants that define the date selection behavior.
| Name | Value | Description |
|---|---|---|
| None | 0 | The user cannot change the current value using the mouse or keyboard. |
| Day | 1 | The user can select days. |
| Month | 2 | The user can select months. |
Specifies actions that trigger showing and hiding Popup controls.
| Name | Value | Description |
|---|---|---|
| None | 0 | No triggers; popups must be shown and hidden using code. |
| Click | 1 | Show or hide the popup when the owner element is clicked. |
| Blur | 2 | Hide the popup when it loses focus. |
| ClickOrBlur | Click | Blur | Show or hide the popup when the owner element is clicked, hide when it loses focus. |
Defines the FlexChart control and its associated classes.
The example below creates a FlexChart control and binds it to a data array. The chart has three series, each corresponding to a property in the objects contained in the source array.
The last series in the example uses the chartType property to override the default chart type used by the other series.
Represents an axis in the chart.
constructor(position?: Position): Axis
Initializes a new instance of the Axis class.
The position of the axis on the chart.
Gets the actual axis maximum.
It returns a number or a Date object (for time-based data).
Gets the actual axis minimum.
It returns a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis line is visible.
Gets or sets the comma-separated property names for the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents the corresponding axis label. The default value is 'value,text'.
Gets the axis host element.
Gets or sets the itemFormatter function for the axis labels.
If specified, the function takes two parameters:
The function returns the label parameters of labels for which properties are modified.
For example:
chart.axisY.itemFormatter = function(engine, label) {
if (label.val > 5){
engine.textFill = 'red'; // red text
label.cls = null; // no default CSS
}
return label;
}Gets or sets the items source for the axis labels.
Names of the properties are specified by the binding property.
For example:
// default value for Axis.binding is 'value,text'
chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];Gets or sets the label alignment.
By default the labels are centered. The supported values are 'left' and 'right for x-axis and 'top' and 'bottom' for y-axis.
Gets or sets the rotation angle of the axis labels.
The angle is measured in degrees with valid values ranging from -90 to 90.
Gets or sets the label padding.
Gets or sets a value indicating whether the axis labels are visible.
Gets or sets the logarithmic base of the axis.
If the base is not specified the axis uses a linear scale.
Use the logBase property to spread data that is clustered around the origin. This is common in several financial and economic data sets.
Gets or sets a value indicating whether the axis includes grid lines.
Gets or sets the number of units between axis labels.
If the axis contains date values, then the units are expressed in days.
Gets or sets the maximum value shown on the axis.
If not set, the maximum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the minimum value shown on the axis.
If not set, the minimum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis includes minor grid lines.
Gets or sets the number of units between minor axis ticks.
If the axis contains date values, then the units are expressed in days.
Gets or sets the axis name.
Gets or sets the value at which an axis crosses the perpendicular axis.
Gets or sets a value indicating how to handle the overlapping axis labels.
Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).
Gets or sets the title text shown next to the axis.
convert(val: number, maxValue?: number, minValue?: number): number
Converts the specified value from data to pixel coordinates.
The data value to convert.
The max value of the data, it's optional.
The min value of the data, it's optional.
convertBack(val: number): number
Converts the specified value from pixel to data coordinates.
The pixel coordinates to convert back.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
constructor(data?: any[]): ObservableArray
Initializes a new instance of the ObservableArray class.
Array containing items used to populate the ObservableArray.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getAxis(name: string): Axis
Gets an axis by name.
The name of the axis to look for.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(name: string): number
Gets the index of an axis by name.
The name of the axis to look for.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
push(...item: any[]): number
Adds one or more items to the end of the array.
One or more items to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Extends the Tooltip class to provide chart tooltips.
constructor(): ChartTooltip
Initializes a new instance of the ChartTooltip class.
Gets or sets the tooltip content.
The tooltip content can be specified as a string or as a function that takes a HitTestInfo object as a parameter.
When the tooltip content is a string, it may contain any of the following parameters:
Parameters must be enclosed in single curly brackets. For example:
// 'country' and 'sales' are properties of the data object.
chart.tooltip.content = '{country}, sales:{sales}';
The next example shows how to set the tooltip content using a function.
// Set the tooltip content
chart.tooltip.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}Gets or sets the distance between the tooltip and the target element.
Gets or sets the delay, in milliseconds, before hiding the tooltip after the mouse leaves the target element.
Gets or sets a value that determines whether the tooltip contents should be displayed as plain text or as HTML.
Gets a value that determines whether the tooltip is currently visible.
Gets or sets a value that determines whether the tooltip should be positioned with respect to the mouse position rather than the target element.
Gets or sets the delay, in milliseconds, before showing the tooltip after the mouse enters the target element.
Gets or sets the maximum distance from the element to display the tooltip.
dispose(): void
Removes all tooltips associated with this Tooltip instance.
getTooltip(element: any): string
Gets the tooltip content associated with a given element.
Element, element ID, or control that the tooltip explains.
onPopup(e: TooltipEventArgs): boolean
Raises the popup event.
TooltipEventArgs that contains the event data.
setTooltip(element: any, content: string): void
Assigns tooltip content to a given element on the page.
The same tooltip may be used to display information for any number of elements on the page. To remove the tooltip from an element, call setTooltip and specify null for the content.
Element, element ID, or control that the tooltip explains.
Tooltip content or ID of the element that contains the tooltip content.
show(element: any, content: string, bounds?: Rect): void
Shows the tooltip with the specified content, next to the specified element.
Element, element ID, or control that the tooltip explains.
Tooltip content or ID of the element that contains the tooltip content.
Optional element that defines the bounds of the area that the tooltip targets. If not provided, the bounds of the element are used (as reported by the getBoundingClientRect method).
Occurs before the tooltip content is displayed.
The event handler may customize the tooltip content or suppress the tooltip display by changing the event parameters.
The point data label for FlexChart.
Gets or sets a value indicating whether the data labels have borders.
Gets or sets a value indicating whether to draw lines that connect labels to the data points.
Gets or sets the content of data labels.
The content can be specified as a string or as a function that takes HitTestInfo object as a parameter.
When the label content is a string, it can contain any of the following parameters:
The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
In the following example, we show the y value of the data point in the labels.
// Create a chart and show y data in labels positioned above the data point.
var chart = new wijmo.chart.FlexChart('#theChart');
chart.initialize({
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads' }],
});
chart.dataLabel.position = "Top";
chart.dataLabel.content = "{country} {seriesName}:{y}";
The next example shows how to set data label content using a function.
// Set the data label content
chart.dataLabel.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}onRendering(e: DataLabelRenderEventArgs): void
Raises the rendering event.
The DataLabelRenderEventArgs object used to render the label.
Occurs before the data label is rendered.
Represents the base abstract class for the DataLabel and the PieDataLabel classes.
Gets or sets a value indicating whether the data labels have borders.
Gets or sets a value indicating whether to draw lines that connect labels to the data points.
Gets or sets the content of data labels.
The content can be specified as a string or as a function that takes HitTestInfo object as a parameter.
When the label content is a string, it can contain any of the following parameters:
The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
In the following example, we show the y value of the data point in the labels.
// Create a chart and show y data in labels positioned above the data point.
var chart = new wijmo.chart.FlexChart('#theChart');
chart.initialize({
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads' }],
});
chart.dataLabel.position = "Top";
chart.dataLabel.content = "{country} {seriesName}:{y}";
The next example shows how to set data label content using a function.
// Set the data label content
chart.dataLabel.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}Gets or sets the offset from label to the data point.
onRendering(e: DataLabelRenderEventArgs): void
Raises the rendering event.
The DataLabelRenderEventArgs object used to render the label.
Provides arguments for DataLabel rendering event.
constructor(engine: IRenderEngine, ht: HitTestInfo, pt: Point, text: string): DataLabelRenderEventArgs
Initializes a new instance of the DataLabelRenderEventArgs class.
(IRenderEngine) The rendering engine to use.
The hit test information.
The reference point.
The label text.
Gets or sets a value that indicates whether the event should be cancelled.
Provides a value to use with events that do not have event data.
Gets the IRenderEngine object to use for rendering the chart elements.
Gets or sets the label text.
Class that represents a data point (with x and y coordinates).
X and Y coordinates can be specified as a number or a Date object(time-based data).
constructor(x?: any, y?: any): DataPoint
Initializes a new instance of the DataPoint class.
X coordinate of the new DataPoint.
Y coordinate of the new DataPoint.
The FlexChart control provides a powerful and flexible way to visualize data.
You can use the FlexChart control to create charts that display data in several formats, including bar, line, symbol, bubble, and others.
To use the FlexChart control, set the itemsSource property to an array containing the data objects, then add one or more Series objects to the series property.
Use the chartType property to define the ChartType used as a default for all series. You may override the chart type for each series by setting the chartType property on the members of the series array.
constructor(element: any, options?): FlexChart
Initializes a new instance of the FlexChart class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets the ICollectionView object that contains the chart data.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Gets or sets various chart options.
The following options are supported:
bubble.maxSize: Specifies the maximum size of symbols in the Bubble chart. The default value is 30 pixels.
bubble.minSize: Specifies the minimum size of symbols in the Bubble chart. The default value is 5 pixels.
chart.options = {
bubble: { minSize: 5, maxSize: 30 }
}
funnel.neckWidth: Specifies the neck width as a percentage for the Funnel chart. The default value is 0.2.
funnel.neckHeight: Specifies the neck height as a percentage for the Funnel chart. The default value is 0.
funnel.type: Specifies the type of Funnel chart. It should be 'rectangle' or 'default'. neckWidth and neckHeight don't work if type is set to rectangle.
chart.options = {
funnel: { neckWidth: 0.3, neckHeight: 0.3, type: 'rectangle' }
}
groupWidth: Specifies the group width for the Column charts, or the group height for the Bar charts. The group width can be specified in pixels or as percentage of the available space. The default value is '70%'.
chart.options = {
groupWidth : 50; // 50 pixels
}
chart.options = {
groupWidth : '100%'; // 100% pixels
}Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether to flip the axes so that X becomes vertical and Y becomes horizontal.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets a value that determines whether and how the series objects are stacked.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
The FlexChartBase control from which the FlexChart and FlexPie derive.
constructor(element: any, options?, invalidateOnResize?: boolean): Control
Initializes a new instance of the Control class and attaches it to a DOM element.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Whether the control should be invalidated when it is resized.
Gets or sets the text displayed in the chart header.
Gets or sets the style of the chart header.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
The core charting control for FlexChart.
constructor(element: any, options?): FlexChartCore
Initializes a new instance of the FlexChart class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets the ICollectionView object that contains the chart data.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
The FlexPie control provides pie and doughnut charts with selectable slices.
To use the FlexPie control, set the itemsSource property to an array containing the data and use the binding and bindingName properties to set the properties that contain the item values and names.
constructor(element: any, options?): FlexPie
Initializes a new instance of the FlexPie class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property that contains the chart values.
Gets or sets the name of the property that contains the name of the data items.
Gets the ICollectionView object that contains the chart data.
Gets or sets the size of the pie's inner radius.
The inner radius is measured as a fraction of the pie radius.
The default value for this property is zero, which creates a pie. Setting this property to values greater than zero creates pies with a hole in the middle, also known as doughnut charts.
Gets or sets a value indicating whether to use animation when items are selected.
See also the selectedItemPosition and selectionMode properties.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets the offset of the slices from the pie center.
The offset is measured as a fraction of the pie radius.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the selected slice.
Gets or sets the offset of the selected slice from the pie center.
Offsets are measured as a fraction of the pie radius.
Gets or sets the position of the selected slice.
Setting this property to a value other than 'None' causes the pie to rotate when an item is selected.
Note that in order to select slices by clicking the chart, you must set the selectionMode property to "Point".
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the starting angle for the pie slices, in degrees.
Angles are measured clockwise, starting at the 9 o'clock position.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Contains information about a part of a FlexChart control at a specified page coordinate.
constructor(chart: FlexChartBase, point: Point, element?: ChartElement): HitTestInfo
Initializes a new instance of the HitTestInfo class.
The chart control.
The original point in window coordinates.
The chart element.
Gets the distance from the closest data point.
Gets the data object that corresponds to the closest data point.
Gets the data point index at the specified coordinates.
Gets the x-value of the closest data point.
Gets the y-value of the closest data point.
Represents the chart legend.
constructor(chart: FlexChartBase): Legend
Initializes a new instance of the Legend class.
FlexChartBase that owns this Legend.
Gets or sets a value that determines whether and where the legend appears in relation to the plot area.
Represents an extension of the LineMarker for the FlexChart.
The LineMarker consists of a text area with content reflecting data point values, and optional vertical or horizontal lines (or both for a cross-hair effect) positioned over the plot area.
It can be static (interaction = None), follow the mouse or touch position (interaction = Move), or move when the user drags the line (interaction = Drag).
For example:
// create an interactive marker with a horizontal line and y-value
var lm = new wijmo.chart.LineMarker($scope.ctx.chart, {
lines: wijmo.chart.LineMarkerLines.Horizontal,
interaction: wijmo.chart.LineMarkerInteraction.Move,
alignment : wijmo.chart.LineMarkerAlignment.Top
});
lm.content = function (ht) {
// show y-value
return lm.y.toFixed(2);
}constructor(chart: FlexChartCore, options?): LineMarker
Initializes a new instance of the LineMarker class.
The chart on which the LineMarker appears.
A JavaScript object containing initialization data for the control.
Gets or sets the alignment of the LineMarker content.
By default, the LineMarker shows to the right, at the bottom of the target point. Use '|' to combine alignment values.
// set the alignment to the left. marker.alignment = wijmo.chart.LineMarkerAlignment.Left; // set the alignment to the left top. marker.alignment = wijmo.chart.LineMarkerAlignment.Left | wijmo.chart.LineMarkerAlignment.Top;
Gets or sets the content function that allows you to customize the text content of the LineMarker.
Gets or sets a value indicating whether the content of the marker is draggable when the interaction mode is "Drag."
Gets or sets a value indicating whether the lines are linked when the horizontal or vertical line is dragged when the interaction mode is "Drag."
Gets or sets the maximum distance from the horizontal or vertical line that the marker can be dragged.
Gets or sets the horizontal position of the LineMarker relative to the plot area.
Its value range is (0, 1). If the value is null or undefined and interaction is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag, the horizontal position of the marker is calculated automatically based on the pointer's position.
Gets or sets the visibility of the LineMarker.
Gets or sets the index of the series in the chart in which the LineMarker appears. This takes effect when the interaction property is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag.
Gets or sets the vertical position of the LineMarker relative to the plot area.
Its value range is (0, 1). If the value is null or undefined and interaction is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag, the vertical position of the LineMarker is calculated automatically based on the pointer's position.
Gets the current x-value as chart data coordinates.
Gets the current y-value as chart data coordinates.
onPositionChanged(point: Point): void
Raises the positionChanged event.
The target point at which to show the LineMarker.
remove(): void
Removes the LineMarker from the chart.
These are predefined color palettes for chart Series objects.
To create custom color palettes, supply an array of strings or rgba values.
You can specify palettes for FlexChart and FlexPie controls. For example:
chart.palette = Palettes.light;
The following palettes are pre-defined:
The point data label for FlexPie.
Gets or sets a value indicating whether the data labels have borders.
Gets or sets a value indicating whether to draw lines that connect labels to the data points.
Gets or sets the content of data labels.
The content can be specified as a string or as a function that takes HitTestInfo object as a parameter.
When the label content is a string, it can contain any of the following parameters:
The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
In the following example, we show the y value of the data point in the labels.
// Create a chart and show y data in labels positioned above the data point.
var chart = new wijmo.chart.FlexChart('#theChart');
chart.initialize({
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads' }],
});
chart.dataLabel.position = "Top";
chart.dataLabel.content = "{country} {seriesName}:{y}";
The next example shows how to set data label content using a function.
// Set the data label content
chart.dataLabel.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}onRendering(e: DataLabelRenderEventArgs): void
Raises the rendering event.
The DataLabelRenderEventArgs object used to render the label.
Occurs before the data label is rendered.
Represents a plot area on the chart.
The chart can have multiple plot areas with multiple axes. To assign axis to plot area use Axis.plotArea property. For example:
// create a plot area var pa = new wijmo.chart.PlotArea(); pa.row = 1; chart.plotAreas.push(pa); // create auxiliary y-axis var ay2 = new wijmo.chart.Axis(wijmo.chart.Position.Left); ay2.plotArea = pa; // attach axis to the plot area chart.axes.push(ay2); // plot first series along y-axis chart.series[0].axisY = ay2;
constructor(options?: any): PlotArea
Initializes a new instance of the PlotArea class.
Initialization options for the plot area.
Gets or sets the column index of plot area. This determines the horizontal position of the plot area on the chart.
Gets or sets the height of the plot area.
The height can be specified as a number (in pixels) or as a string in the format '{number}*' (star sizing).
Gets or sets the plot area name.
Gets or sets the row index of plot area. This determines the vertical position of the plot area on the chart.
Gets or sets the style of the plot area.
Using style property, you can set appearance of the plot area. For example:
pa.style = { fill: 'rgba(0,255,0,0.1)' };Gets or sets width of the plot area.
The width can be specified as a number (in pixels) or as a string in the format '{number}*' (star sizing).
Represents a collection of PlotArea objects in a FlexChartCore control.
constructor(data?: any[]): ObservableArray
Initializes a new instance of the ObservableArray class.
Array containing items used to populate the ObservableArray.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getPlotArea(name: string): PlotArea
Gets a plot area by name.
The name of the plot area to look for.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(name: string): number
Gets the index of a plot area by name.
The name of the plot area to look for.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
push(...item: any[]): number
Adds one or more items to the end of the array.
One or more items to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Provides arguments for Series events.
constructor(engine: IRenderEngine): RenderEventArgs
Initializes a new instance of the RenderEventArgs class.
(IRenderEngine) The rendering engine to use.
Gets or sets a value that indicates whether the event should be canceled.
Provides a value to use with events that do not have event data.
Represents a series of data points to display in the chart.
The Series class supports all basic chart types. You may define a different chart type on each Series object that you add to the FlexChart series collection. This overrides the chartType property set on the chart that is the default for all Series objects in its collection.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a series of data points to display in the chart.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the series CSS class.
Gets the series host element.
Gets the series element in the legend.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the series style.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Provides arguments for Series events.
constructor(series: SeriesBase): SeriesEventArgs
Initializes a new instance of the SeriesEventArgs class.
Specifies the Series object affected by this event.
Provides a value to use with events that do not have event data.
Provides arguments for Series rendering event.
constructor(engine: IRenderEngine, index: number, count: number): SeriesRenderingEventArgs
Initializes a new instance of the SeriesRenderingEventArgs class.
(IRenderEngine) The rendering engine to use.
The index of the series to render.
Total number of the series to render.
Gets or sets a value that indicates whether the event should be canceled.
Gets total number of series to render.
Provides a value to use with events that do not have event data.
Gets the IRenderEngine object to use for rendering the chart elements.
Gets the index of the series to render.
Represents a rendering engine that performs the basic drawing routines.
Gets the rendered element.
Gets or sets the color used to fill the element.
Gets or sets the font family for the text output.
Gets or sets the font size for the text output.
Gets or sets the color used to outline the element.
Gets or sets the thickness of the outline.
Gets or sets the text color.
addClipRect(clipRect: Rect, id: string): void
Adds a clipping rectangle to the context.
The clipping rectangle.
The ID of the clipping rectangle.
beginRender(): void
Clears the viewport and starts the rendering cycle.
drawDonutSegment(cx: number, cy: number, radius: number, innerRadius: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): void
Draws a doughnut segment.
X coordinate of the segment center.
Y coordinate of the segment center.
Outer radius of the segment.
Inner radius of the segment.
Start angle of the segment, in degrees.
Sweep angle of the segment, in degrees clockwise.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawEllipse(cx: number, cy: number, rx: number, ry: number, className?: string, style?: any): void
Draws an ellipse.
X coordinate of the ellipse's center.
Y coordinate of the ellipse's center.
X radius (half of the ellipse's width).
Y radius (half of the ellipse's height).
Class name to be applied to the element.
Style object to be applied to the element.
drawImage(href: string, x: number, y: number, w: number, h: number): void
Draws an image.
Url of the image to draw.
Left coordinate of the image's bounding rectangle.
Bottom coordinate of the image's bounding rectangle.
Image width.
Image height.
drawLine(x1: number, y1: number, x2: number, y2: number, className?: string, style?: any): void
Draws a line.
X coordinate of the first point.
Y coordinate of the first point.
X coordinate of the second point.
Y coordinate of the second point.
Class name to be applied to the element.
Style object to be applied to the element.
drawLines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string): void
Draws a series of lines.
Array of X coordinates.
Array of Y coordinates.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawPieSegment(cx: number, cy: number, radius: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): void
Draws a pie segment.
X coordinate of the segment center.
Y coordinate of the segment center.
Radius of the segment.
Start angle of the segment, in degrees.
Sweep angle of the segment, in degrees clockwise.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawPolygon(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string): void
Draws a polygon.
Array of X coordinates.
Array of Y coordinates.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawRect(x: number, y: number, w: number, h: number, className?: string, style?: any, clipPath?: string): void
Draws a rectangle.
Left of the rectangle.
Bottom of the rectangle.
Width of the rectangle.
Height of the rectangle.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawSplines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string): void
Draws a series of splines (smooth path).
Array of X coordinates.
Array of Y coordinates.
Class name to be applied to the element.
Style object to be applied to the element.
Id of the path to use as a clipping path.
drawString(s: string, pt: Point, className?: string, style?: any): void
Draws a string.
String to be drawn.
Reference point for the string.
Class name to be applied to the element.
Style object to be applied to the element.
drawStringRotated(s: string, pt: Point, center: Point, angle: number, className?: string, style?: any): void
Draws a rotated string.
String to be drawn.
Reference point for rendering the string.
Reference point for rotating the string.
Rotation angle, in degrees, clockwise.
Class name to be applied to the element.
Style object to be applied to the element.
endGroup(): void
Ends a group.
endRender(): void
Finishes the rendering cycle.
measureString(s: string, className?: string, groupName?: string, style?: any): Size
Measures a string.
String to be measured.
Class name to use when measuring the string.
Name of the group to use when measuring the string.
Style object to use when measuring the string.
setViewportSize(w: number, h: number): void
Sets the size of the viewport.
Viewport width.
Viewport height.
startGroup(className?: string, clipPath?: string, createTransform?: boolean): void
Starts a group.
Class name to apply to the new group.
Id of the path to use as a clipping path.
Whether to create a new transform for the group.
| Name | Value | Description |
|---|---|---|
| X | 0 | Category axis (normally horizontal). |
| Y | 1 | Value axis (normally vertical). |
Specifies the type of chart element found by the hitTest method.
| Name | Value | Description |
|---|---|---|
| PlotArea | 0 | The area within the axes. |
| AxisX | 1 | X-axis. |
| AxisY | 2 | Y-axis. |
| ChartArea | 3 | The area within the control but outside the axes. |
| Legend | 4 | The chart legend. |
| Header | 5 | The chart header. |
| Footer | 6 | The chart footer. |
| Series | 7 | A chart series. |
| SeriesSymbol | 8 | A chart series symbol. |
| DataLabel | 9 | A data label. |
| None | 10 | No chart element. |
| Name | Value | Description |
|---|---|---|
| Column | 0 | Shows vertical bars and allows you to compare values of items across categories. |
| Bar | 1 | Shows horizontal bars. |
| Scatter | 2 | Shows patterns within the data using X and Y coordinates. |
| Line | 3 | Shows trends over a period of time or across categories. |
| LineSymbols | 4 | Shows a line chart with a symbol on each data point. |
| Area | 5 | Shows a line chart with the area below the line filled with color. |
| Bubble | 6 | Shows a Scatter chart with a third data value that determines the size of the symbol. The data for this chart type can be defined using the FlexChart or Series binding property as a comma separated value in the following format: "yProperty, bubbleSizeProperty". |
| Candlestick | 7 | Presents items with high, low, open, and close values. The size of the wick line is determined by the High and Low values, while the size of the bar is determined by the Open and Close values. The bar is displayed using different colors, depending on whether the close value is higher or lower than the open value. The data for this chart type can be defined using the FlexChart or Series binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| HighLowOpenClose | 8 | Displays the same information as a candlestick chart, except that opening values are displayed using lines to the left, while lines to the right indicate closing values. The data for this chart type can be defined using the FlexChart or Series binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| Spline | 9 | Displays a line chart that plots curves rather than angled lines through the data points. |
| SplineSymbols | 10 | Displays a spline chart with symbols on each data point. |
| SplineArea | 11 | Displays a spline chart with the area below the line filled with color. |
| Funnel | 12 | Displays a funnel chart, usually representing stages in a process such as a sales pipeline. |
Specifies the format of the image with embed base64-encoded binary data.
| Name | Value | Description |
|---|---|---|
| Png | 0 | Gets the W3C Portable Network Graphics (PNG) image format. |
| Jpeg | 1 | Gets the Joint Photographic Experts Group (JPEG) image format. |
| Svg | 2 | Gets the Scalable Vector Graphics(SVG) image format. |
Specifies the position of data labels on the chart.
| Name | Value | Description |
|---|---|---|
| None | 0 | No data labels appear. |
| Left | 1 | The labels appear to the left of the data points. |
| Top | 2 | The labels appear above the data points. |
| Right | 3 | The labels appear to the right of the data points. |
| Bottom | 4 | The labels appear below the data points. |
| Center | 5 | The labels appear centered on the data points. |
Specifies the alignment of the LineMarker.
| Name | Value | Description |
|---|---|---|
| Auto | 2 | The LineMarker alignment adjusts automatically so that it stays within the boundaries of the plot area. |
| Right | 0 | The LineMarker aligns to the right of the pointer. |
| Left | 1 | The LineMarker aligns to the left of the pointer. |
| Bottom | 4 | The LineMarker aligns to the bottom of the pointer. |
| Top | 6 | The LineMarker aligns to the top of the pointer. |
Specifies how the LineMarker interacts with the user.
| Name | Value | Description |
|---|---|---|
| None | 0 | No interaction, the user specifies the position by clicking. |
| Move | 1 | The LineMarker moves with the pointer. |
| Drag | 2 | The LineMarker moves when the user drags the lines. |
Specifies the direction of the lines shown by the LineMarker.
| Name | Value | Description |
|---|---|---|
| None | 0 | No lines. |
| Vertical | 1 | Vertical line. |
| Horizontal | 2 | Horizontal line. |
| Both | 3 | Vertical and horizontal lines. |
Specifies the type of marker to use for the symbolMarker property.
Applies to Scatter, LineSymbols, and SplineSymbols chart types.
| Name | Value | Description |
|---|---|---|
| Dot | 0 | Uses a circle to mark each data point. |
| Box | 1 | Uses a square to mark each data point. |
Specifies how to handle overlapping labels.
| Name | Value | Description |
|---|---|---|
| Auto | 0 | Hide overlapping labels. |
| Show | 1 | Show all labels, including overlapping ones. |
Specifies the position of data labels on the pie chart.
| Name | Value | Description |
|---|---|---|
| None | 0 | No data labels. |
| Inside | 1 | The label appears inside the pie slice. |
| Center | 2 | The item appears at the center of the pie slice. |
| Outside | 3 | The item appears outside the pie slice. |
Specifies the position of an axis or legend on the chart.
| Name | Value | Description |
|---|---|---|
| None | 0 | The item is not visible. |
| Left | 1 | The item appears to the left of the chart. |
| Top | 2 | The item appears above the chart. |
| Right | 3 | The item appears to the right of the chart. |
| Bottom | 4 | The item appears below the chart. |
| Auto | 5 | The item is positioned automatically. |
Specifies what is selected when the user clicks the chart.
| Name | Value | Description |
|---|---|---|
| None | 0 | Select neither series nor data points when the user clicks the chart. |
| Series | 1 | Select the whole Series when the user clicks it on the chart. |
| Point | 2 | Select the data point when the user clicks it on the chart. Since Line, Area, Spline, and SplineArea charts do not render individual data points, nothing is selected with this setting on those chart types. |
Specifies whether and where the Series is visible.
| Name | Value | Description |
|---|---|---|
| Visible | 0 | The series is visible on the plot and in the legend. |
| Plot | 1 | The series is visible only on the plot. |
| Legend | 2 | The series is visible only in the legend. |
| Hidden | 3 | The series is hidden. |
Specifies whether and how to stack the chart's data values.
| Name | Value | Description |
|---|---|---|
| None | 0 | No stacking. Each series object is plotted independently. |
| Stacked | 1 | Stacked charts show how each value contributes to the total. |
| Stacked100pc | 2 | 100% stacked charts show how each value contributes to the total with the relative size of each series representing its contribution to the total. |
Specifies whether and where the axis tick marks appear.
| Name | Value | Description |
|---|---|---|
| None | 0 | No tick marks appear. |
| Outside | 1 | Tick marks appear outside the plot area. |
| Inside | 2 | Tick marks appear inside the plot area. |
| Cross | 3 | Tick marks cross the axis. |
Defines classes that add analytics features to charts including TrendLine, MovingAverage and FunctionSeries.
Represents a Box&Whisker chart series.
The BoxWhisker series is normally used to compare distributions between different sets of numerical data.
constructor(options?: any): BoxWhisker
Initializes a new instance of the BoxWhisker class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that determines the width of the gab between groups as a percentage.
The default value for this property is 0.1. The min value is 0 and max value is 1.
Gets or sets a value that determines the group width as a percentage.
The default value for this property is 0.8. The min value is 0 and max value is 1.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets a value that specifies the style for the mean line.
Gets or sets a value that specifies the style for the mean marker.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets a value that specifies the quartile calculation method.
Gets or sets a value that determines whether to show the inner data points for each point in the series.
Gets or sets a value that determines whether to show the mean line.
Gets or sets a value that determines whether to show the mean marker.
Gets or sets a value that determines whether to show outliers.
Outliers are inner points outside the range between the first and third quartiles.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
constructor(options?: any): ErrorBar
Initializes a new instance of the ErrorBar class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that specifies the direction of the error bars.
Gets or sets the style used to render the error bars.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets a value that specifies the error value of the series.
This property works with the errorAmount property.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a base class of function series for FlexChart.
constructor(options?: any): FunctionSeries
Initializes a new instance of the FunctionSeries class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the maximum value of the parameter for calculating a function.
Gets or sets the minimum value of the parameter for calculating a function.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a moving average trend line for FlexChart and FinancialChart.
It is a calculation to analyze data points by creating a series of averages of different subsets of the full data set. You may define a different type on each MovingAverage object by setting the type property on the MovingAverage itself.
The MovingAverage class has a period property that allows you to set the number of periods for computing the average value.
constructor(options?: any): MovingAverage
Initializes a new instance of the MovingAverage class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period of the moving average series. It should be set to integer value greater than 1.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
constructor(options?: any): ParametricFunctionSeries
Initializes a new instance of the ParametricFunctionSeries class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the maximum value of the parameter for calculating a function.
Gets or sets the minimum value of the parameter for calculating a function.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets the function used to calculate the x value.
Gets or sets the function used to calculate the y value.
approximate(value: number): void
Gets the approximate x and y from the given value.
The value to calculate.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a trend line series in a FlexChart or FinancialChart.
A trend line is a line superimposed on a chart revealing the overall direction of data.
You may define a different fit type for each TrendLine series on the FlexChart by setting its fitType property.
constructor(options?: any): TrendLine
Initializes a new instance of the TrendLine class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the coefficients of the equation.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the number of terms in a polynomial or Fourier equation.
Set this value to an integer greater than 1. It gets applied when the fitType is set to wijmo.chart.analytics.TrendLineFitType.Polynomial or wijmo.chart.analytics.TrendLineFitType.Fourier.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getEquation(fmt?: Function): void
Gets the formatted equation string for the coefficients.
The formatting function used to convert the coefficients into strings. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents base class for various trend lines.
constructor(options?: any): TrendLineBase
Initializes a new instance of the TrendLineBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
constructor(options?: any): Waterfall
Initializes a new instance of the Waterfall class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that determines whether to show connector lines.
Gets or sets the name of the property that contains labels for the intermediate total bars. This should be an array or a string.
This property works with the showIntermediateTotal and intermediateTotalPositions properties.
Gets or sets a value of the property that contains the index for positions of the intermediate total bars.
This property works with the showIntermediateTotal and intermediateTotalLabels properties.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets a value that determines whether the given data represents absolute or relative values (differences).
Gets or sets a value that determines whether to show intermediate total bars.
This property works with intermediateTotalPositions and intermediateTotalLabels properties.
Gets or sets a value that determines whether to show the total bar at the end of the chart.
Gets or sets a value that determines the value of the start bar. If start is null, the start bar will not be shown.
Gets or sets the label of the start bar.
Gets or sets the Waterfall styles.
The following styles are supported:
waterfall.styles = {
start: { fill: 'blue', stroke: 'blue' },
total: { fill: 'yellow', stroke: 'yellow' },
falling: { fill: 'red', stroke: 'red' },
rising: { fill: 'green', stroke: 'green' },
connectorLines: { stroke: 'blue', 'stroke-dasharray': '10, 10' }
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the label of the total bar.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Y function series of FlexChart.
The YFunctionSeries plots a function defined by formulas of type y=f(x), specified using the func property.
constructor(options?: any): YFunctionSeries
Initializes a new instance of the YFunctionSeries class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the function used to calculate Y value.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the maximum value of the parameter for calculating a function.
Gets or sets the minimum value of the parameter for calculating a function.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
| Name | Value | Description |
|---|---|---|
| FixedValue | 0 | The value property represents the error as an absolute value. |
| Percentage | 1 | The value property represents the error as a percentage. |
| StandardDeviation | 2 | The value property represents the error as a number of standard deviations. |
| StandardError | 3 | The error is the standard error of the mean (value property is not used). |
| Custom | 4 | Error values are bound through the binding property or set to an object with 'plus' and 'minus' values. |
Specifies the direction of the error bar.
| Name | Value | Description |
|---|---|---|
| Both | 0 | Show errors in both directions. |
| Minus | 1 | Show errors only in the minus direction. |
| Plus | 2 | Show errors only in the plus direction. |
Specifies the end style of the error bars.
| Name | Value | Description |
|---|---|---|
| Cap | 0 | Error bars end with a cap. |
| NoCap | 1 | Error bars are simple lines. |
Specifies the type of MovingAverage Series.
| Name | Value | Description |
|---|---|---|
| Simple | 0 | An average of the last n values. |
| Weighted | 1 | Weighted average of the last n values, where the weight decreases by 1 with each previous value. |
| Exponential | 2 | Weighted average of the last n values, where the weight decreases exponentially with each previous value. |
| Triangular | 3 | Weighted average of the last n values, whose result is equivalent to a double smoothed simple moving average. |
Specifies the quartile calculation method of BoxWhisker series.
| Name | Value | Description |
|---|---|---|
| InclusiveMedian | 0 | Include median value when calculating quartile. |
| ExclusiveMedian | 1 | Exclude median value when calculating quartile. |
Specifies the fit type for a TrendLine series.
| Name | Value | Description |
|---|---|---|
| Linear | 0 | A straight line that most closely approximates the data. Y(x) = a * x + b. |
| Exponential | 1 | Regression fit to the equation Y(x) = a * exp(b*x). |
| Logarithmic | 2 | Regression fit to the equation Y(x) = a * ln(x) + b. |
| Power | 3 | Regression fit to the equation Y(x) = a * pow(x, b). |
| Fourier | 4 | Regression fit to the equation Y(x) = a + b * cos(x) + c * sin(x) + d * cos(2*x) + e * sin(2*x) + ... |
| Polynomial | 5 | Regression fit to the equation Y(x) = a * x^n + b * x^n-1 + c * x^n-2 + ... + z. |
| MinX | 6 | The minimum X-value. |
| MinY | 7 | The minimum Y-value. |
| MaxX | 8 | The maximum X-value. |
| MaxY | 9 | The maximum Y-value. |
| AverageX | 10 | The average X-value. |
| AverageY | 11 | The average Y-value. |
Defines the AnnotationLayer and various annotations for FlexChart and FinancialChart.
Represents the base class of annotations for the AnnotationLayer.
constructor(options?: any): AnnotationBase
Initializes a new instance of the AnnotationBase class.
JavaScript object containing initialization data for the object.
Gets or sets the visibility of the annotation.
Gets or sets the name of the annotation.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the style of the annotation.
Gets or sets the tooltip of the annotation.
destroy(): void
Destroy this annotation
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents an annotation layer for FlexChart and FinancialChart.
The AnnotationLayer contains a collection of various annotation elements: texts, lines, images, rectangles etc. To use the AnnotationLayer, create annotations and push them to the layer's items property.
constructor(chart: FlexChartCore, options?): AnnotationLayer
Initializes a new instance of the AnnotationLayer class.
A chart to which the AnnotationLayer is attached.
A JavaScript object containing initialization data for AnnotationLayer.
getItem(name: string): AnnotationBase
Gets an annotation element by name in the AnnotationLayer.
The annotation's name.
getItems(name: string): Array
Gets the annotation elements by name in the AnnotationLayer.
The annotations' name.
Represents a circle annotation for AnnotationLayer.
constructor(options?: any): Circle
Initializes a new instance of the Circle annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents an ellipse annotation for AnnotationLayer.
constructor(options?: any): Ellipse
Initializes a new instance of the Ellipse annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents an image annotation for AnnotationLayer.
constructor(options?: any): Image
Initializes a new instance of the Image annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a line annotation for AnnotationLayer.
constructor(options?: any): Line
Initializes a new instance of the Line annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a polygon annotation for AnnotationLayer.
constructor(options?: any): Polygon
Initializes a new instance of the Polygon annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a rectangle annotation for AnnotationLayer.
constructor(options?: any): Rectangle
Initializes a new instance of the Rectangle annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a base class of shape annotations for the AnnotationLayer.
constructor(options?: any): Shape
Initializes a new instance of the Shape annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the text of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a square annotation for the AnnotationLayer.
constructor(options?: any): Square
Initializes a new instance of the Square annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Represents a text annotation for the AnnotationLayer.
constructor(options?: any): Text
Initializes a new instance of the Text annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the text of the annotation.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Specifies the attachment of the annotation.
| Name | Value | Description |
|---|---|---|
| DataIndex | 0 | Coordinates of the annotation point are defined by the data series index and the data point index. |
| DataCoordinate | 1 | Annotation point is specified in data coordinates. |
| Relative | 2 | Annotation point is specified as a relative position inside the control where (0,0) is the top left corner and (1,1) is the bottom right corner. |
| Absolute | 3 | The annotation point is specified in control's pixel coordinates. |
Specifies the position of the annotation.
| Name | Value | Description |
|---|---|---|
| Center | 0 | The annotation appears at the Center of the target point. |
| Top | 1 | The annotation appears at the Top of the target point. |
| Bottom | 2 | The annotation appears at the Bottom of the target point. |
| Left | 4 | The annotation appears at the Left of the target point. |
| Right | 8 | The annotation appears at the Right of the target point. |
Defines classes that add interactive features to charts.
The ChartGestures control allows the user to zoom or pan on the specified FlexChart.
To use the ChartGestures control, specify the FlexChart control on which to zoom or pan.
var chartGestures = new wijmo.chart.interaction.ChartGestures(chart);
constructor(chart: FlexChartCore, options?): ChartGestures
Initializes a new instance of the ChartGestures class.
The FlexChart that allows the user to zoom or pan.
A JavaScript object containing initialization data for the control.
Gets or sets the enable of the ChartGestures.
Gets or sets the initial position of the axis X. The value represents initial position on the axis when the Scale is less than 1. Otherwise, the Value has no effect. The Value should lie between 0 to 1.
Gets or sets the initial position of the axis Y. The value represents initial position on the axis when the Scale is less than 1. Otherwise, the Value has no effect. The Value should lie between 0 to 1.
Gets or sets the initial scale of axis X. The scale should be more than 0 and less than or equal to 1. The scale specifies which part of the range between Min and Max is shown. When scale is 1 (default value), the whole axis range is visible.
Gets or sets the initial scale of axis Y. The scale should be more than 0 and less than or equal to 1. The scale specifies which part of the range between Min and Max is shown. When scale is 1 (default value), the whole axis range is visible.
reset(): void
Reset the axis of the chart.
The RangeSelector control displays a range selector that allows the user to choose the range of data to display on the specified FlexChart.
To use the RangeSelector control, specify the FlexChart control to display the selected range of data.
The rangeChanged event is fired when there is a change in min or max value. For example:
var rangeSelector = new wijmo.chart.interaction.RangeSelector(chart);
rangeSelector.rangeChanged.addHandler(function () {
// perform related updates
// e.g. modify displayed range of another chart
update(rangeSelector.min, rangeSelector.max);
});constructor(chart: FlexChartCore, options?): RangeSelector
Initializes a new instance of the RangeSelector class.
The FlexChart that displays the selected range.
A JavaScript object containing initialization data for the control.
Gets or sets the visibility of the range selector.
Gets or sets the maximum value of the range. If not set, the maximum is calculated automatically.
Gets or sets the maximum amount of data that can be selected, as a percentage of the total range. This property must be set to a value between zero and one.
Gets or sets the minimum value of the range. If not set, the minimum is calculated automatically.
Gets or sets the minimum amount of data that can be selected, as a percentage of the overall chart range. This property must be set to a value between zero and one.
Gets or sets a value that determines whether the min/max elements may be reversed by dragging one over the other.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
Specifies the interactive axes of the chart gestures.
| Name | Value | Description |
|---|---|---|
| X | 0 | Interactive Axis X. |
| Y | 1 | Interactive Axis Y. |
| XY | 2 | Interactive Both Axis X and Axis Y. |
Specifies the mouse action of the chart gestures.
| Name | Value | Description |
|---|---|---|
| Zoom | 0 | Zoom chart by mouse. |
| Pan | 1 | Pan chart by mouse. |
Specifies the orientation of the range selector.
| Name | Value | Description |
|---|---|---|
| X | 0 | Horizontal, x-data range. |
| Y | 1 | Vertical, y-data range. |
Defines the ChartAnimation for FlexChart, FinancialChart and FlexPie.
Represents the animation for FlexChart, FinancialChart and FlexPie.
The ChartAnimation provides built-in animation while loading and updating the chart. The animation can be configured by the user through several properties that include duration, easing function, animation mode.
constructor(chart: FlexChartBase, options?: any): ChartAnimation
Initializes a new instance of the ChartAnimation class.
A chart to which the ChartAnimation is attached.
A JavaScript object containing initialization data for ChartAnimation.
Gets or sets whether the plot points animate one at a time, series by series, or all at once. The whole animation is still completed within the duration.
Gets or sets a value indicating whether animation is applied to the axis.
Gets or sets the length of entire animation in milliseconds.
animate(): void
Performs the animation.
Specifies the animation mode whether chart should animate one point at a time, series by series, or all at once.
| Name | Value | Description |
|---|---|---|
| All | 0 | All points and series are animated at once. |
| Point | 1 | Animation is performed point by point. Multiple series are animated simultaneously at the same time. |
| Series | 2 | Animation is performed series by series. Entire series is animated at once, following the same animation as the "All" option, but just one series at a time. |
Specifies the rate of change of a parameter over time.
| Name | Value | Description |
|---|---|---|
| Linear | 0 | Simple linear tweening, no easing and no acceleration. |
| Swing | 1 | Easing equation for a swing easing |
| EaseInQuad | 2 | Easing equation for a quadratic easing in, accelerating from zero velocity. |
| EaseOutQuad | 3 | Easing equation for a quadratic easing out, decelerating to zero velocity. |
| EaseInOutQuad | 4 | Easing equation for a quadratic easing in and out, acceleration until halfway, then deceleration. |
| EaseInCubic | 5 | Easing equation for a cubic easing in - accelerating from zero velocity. |
| EaseOutCubic | 6 | Easing equation for a cubic easing out - decelerating to zero velocity. |
| EaseInOutCubic | 7 | Easing equation for a cubic easing in and out - acceleration until halfway, then deceleration. |
| EaseInQuart | 8 | Easing equation for a quartic easing in - accelerating from zero velocity. |
| EaseOutQuart | 9 | Easing equation for a quartic easing out - decelerating to zero velocity. |
| EaseInOutQuart | 10 | Easing equation for a quartic easing in and out - acceleration until halfway, then deceleration. |
| EaseInQuint | 11 | Easing equation for a quintic easing in - accelerating from zero velocity. |
| EaseOutQuint | 12 | Easing equation for a quintic easing out - decelerating to zero velocity. |
| EaseInOutQuint | 13 | Easing equation for a quintic easing in and out - acceleration until halfway, then deceleration. |
| EaseInSine | 14 | Easing equation for a sinusoidal easing in - accelerating from zero velocity. |
| EaseOutSine | 15 | Easing equation for a sinusoidal easing out - decelerating to zero velocity. |
| EaseInOutSine | 16 | Easing equation for a sinusoidal easing in and out - acceleration until halfway, then deceleration. |
| EaseInExpo | 17 | Easing equation for an exponential easing in - accelerating from zero velocity. |
| EaseOutExpo | 18 | Easing equation for an exponential easing out - decelerating to zero velocity. |
| EaseInOutExpo | 19 | Easing equation for an exponential easing in and out - acceleration until halfway, then deceleration. |
| EaseInCirc | 20 | Easing equation for a circular easing in - accelerating from zero velocity. |
| EaseOutCirc | 21 | Easing equation for a circular easing out - decelerating to zero velocity. |
| EaseInOutCirc | 22 | Easing equation for a circular easing in and out - acceleration until halfway, then deceleration. |
| EaseInBack | 23 | Easing equation for a back easing in - accelerating from zero velocity. |
| EaseOutBack | 24 | Easing equation for a back easing out - decelerating to zero velocity. |
| EaseInOutBack | 25 | Easing equation for a back easing in and out - acceleration until halfway, then deceleration. |
| EaseInBounce | 26 | Easing equation for a bounce easing in - accelerating from zero velocity. |
| EaseOutBounce | 27 | Easing equation for a bounce easing out - decelerating to zero velocity. |
| EaseInOutBounce | 28 | Easing equation for a bounce easing in and out - acceleration until halfway, then deceleration. |
| EaseInElastic | 29 | Easing equation for an elastic easing in - accelerating from zero velocity. |
| EaseOutElastic | 30 | Easing equation for an elastic easing out - decelerating to zero velocity. |
| EaseInOutElastic | 31 | Easing equation for an elastic easing in and out - acceleration until halfway, then deceleration. |
Provides various render engines to render wijmo chart. Add this module on page to support chart export in IE browsers.
Defines the Sunburst chart control and its associated classes.
Sunburst chart control.
constructor(element: any, options?): FlexPie
Initializes a new instance of the FlexPie class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property that contains the chart values.
Gets or sets the name of the property containing name of the data item; it should be an array or a string.
Gets or sets the name of the property (or properties) used to generate child items in hierarchical data.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
Set this property to an array containing the names of the properties
that contain child items at each level, when the items are child items
at different levels with different names
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the ICollectionView object that contains the chart data.
Gets or sets the size of the pie's inner radius.
The inner radius is measured as a fraction of the pie radius.
The default value for this property is zero, which creates a pie. Setting this property to values greater than zero creates pies with a hole in the middle, also known as doughnut charts.
Gets or sets a value indicating whether to use animation when items are selected.
See also the selectedItemPosition and selectionMode properties.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets the offset of the slices from the pie center.
The offset is measured as a fraction of the pie radius.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the offset of the selected slice from the pie center.
Offsets are measured as a fraction of the pie radius.
Gets or sets the position of the selected slice.
Setting this property to a value other than 'None' causes the pie to rotate when an item is selected.
Note that in order to select slices by clicking the chart, you must set the selectionMode property to "Point".
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the starting angle for the pie slices, in degrees.
Angles are measured clockwise, starting at the 9 o'clock position.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
The TreeMap control displays hierarchical (tree-structured) data as a set of nested rectangles. Each branch of the tree is given a rectangle, which is then tiled with smaller rectangles representing sub-branches. A leaf node's rectangle has an area proportional to a specified dimension of the data. Often the leaf nodes are colored to show a separate dimension of the data.
To use the TreeMap control, set the itemsSource property to an array containing the data and use the binding and bindingName properties to set the properties that contain the item values and names.
constructor(element: any, options?): TreeMap
Initializes a new instance of the TreeMap class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property of the data item that contains the chart value.
The binding property is used to calculate the size of the node as compared to other node values. The property should contain numeric data.
Gets or sets the name of the property containing name of the data item. The bindingName property is used to show name of the node. It should be an array or a string.
Gets or sets the name of the property (or properties) used to generate child items in hierarchical data.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
Set this property to an array containing the names of the properties
that contain child items at each level, when the items are child items
at different levels with different names
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the ICollectionView object that contains the chart data.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets the maximum number of node levels to show in the current view. These levels are flattened into the current plane. If a treemap has more levels than this value, user has to move up and down.
Gets or sets an array of default colors to be used in a treemap.
The array contains strings that represent CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
Or contains titleColor, maxColor, minColor separately. For example:
chart.palette = [{
titleColor: '#00277d',
maxColor: 'rgba(0,39,125,0.7)',
minColor: 'rgba(168,187,230,0.7)'
}, {
titleColor: '#7d1f00',
maxColor: 'rgba(125,21,0,0.7)',
minColor: 'rgba(230,183,168,0.7)'
}, {
titleColor: '#007d27',
maxColor: 'rgba(0,125,39,0.7)',
minColor: 'rgba(168,230,188,0.7)'
}];Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Specifies the treemap type.
| Name | Value | Description |
|---|---|---|
| Squarified | 0 | Shows squarified treemap. |
| Horizontal | 1 | Shows horizontal squarified treemap. |
| Vertical | 2 | Shows vertical squarified treemap. |
Defines the FlexRadar control and its associated classes.
radar chart control.
constructor(element: any, options?): FlexRadar
Initializes a new instance of the FlexRadar class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets the ICollectionView object that contains the chart data.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets a value that determines whether and how the series objects are stacked.
Gets or sets the starting angle for the radar, in degrees.
Angles are measured clockwise, starting at the 12 o'clock position.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
Gets or sets the total angle for the radar, in degrees. Its default value is 360. The value must be greater than 0, or less than or equal to 360.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
Represents an axis in the radar chart.
constructor(position?: Position): Axis
Initializes a new instance of the Axis class.
The position of the axis on the chart.
Gets the actual axis maximum.
It returns a number or a Date object (for time-based data).
Gets the actual axis minimum.
It returns a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis line is visible.
Gets or sets the comma-separated property names for the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents the corresponding axis label. The default value is 'value,text'.
Gets or sets the format string used for the axis labels (see Globalize).
Gets or sets the itemFormatter function for the axis labels.
If specified, the function takes two parameters:
The function returns the label parameters of labels for which properties are modified.
For example:
chart.axisY.itemFormatter = function(engine, label) {
if (label.val > 5){
engine.textFill = 'red'; // red text
label.cls = null; // no default CSS
}
return label;
}Gets or sets the items source for the axis labels.
Names of the properties are specified by the binding property.
For example:
// default value for Axis.binding is 'value,text'
chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];Gets or sets the label alignment.
By default the labels are centered. The supported values are 'left' and 'right for x-axis and 'top' and 'bottom' for y-axis.
Gets or sets the rotation angle of the axis labels.
The angle is measured in degrees with valid values ranging from -90 to 90.
Gets or sets a value indicating whether the axis labels are visible.
Gets or sets the logarithmic base of the axis.
If the base is not specified the axis uses a linear scale.
Use the logBase property to spread data that is clustered around the origin. This is common in several financial and economic data sets.
Gets or sets a value indicating whether the axis includes grid lines.
Gets or sets the number of units between axis labels.
If the axis contains date values, then the units are expressed in days.
Gets or sets the maximum value shown on the axis.
If not set, the maximum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the minimum value shown on the axis.
If not set, the minimum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis includes minor grid lines.
Gets or sets the location of the minor axis tick marks.
Gets or sets the number of units between minor axis ticks.
If the axis contains date values, then the units are expressed in days.
Gets or sets the value at which an axis crosses the perpendicular axis.
Gets or sets a value indicating how to handle the overlapping axis labels.
Gets or sets the position of the axis with respect to the plot area.
Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).
convert(val: number, maxValue?: number, minValue?: number): number
Converts the specified value from data to pixel coordinates.
The data value to convert.
The max value of the data, it's optional.
The min value of the data, it's optional.
convertBack(val: number): number
Converts the specified value from pixel to data coordinates.
The pixel coordinates to convert back.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
Represents a series of data points to display in the chart.
The FlexRadarSeries class supports all basic chart types. You may define a different chart type on each FlexRadarSeries object that you add to the FlexRadar series collection. This overrides the chartType property set on the chart that is the default for all FlexRadarSeries objects in its collection.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart. Please note that ColumnVolume, EquiVolume, CandleVolume and ArmsCandleVolume chart types are not supported and should be set on the FinancialChart.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Specifies the type of radar chart.
| Name | Value | Description |
|---|---|---|
| Column | 0 | Shows vertical bars and allows you to compare values of items across categories. |
| Scatter | 1 | Shows patterns within the data using X and Y coordinates. |
| Line | 2 | Shows trends over a period of time or across categories. |
| LineSymbols | 3 | Shows line chart with a symbol on each data point. |
| Area | 4 | Shows line chart with the area below the line filled with color. |
Defines the RadialGauge, LinearGauge, and BulletGraph controls.
Unlike many gauge controls, Wijmo gauges concentrate on the data being displayed, with little extraneous color and markup elements. They were designed to be easy to use and to read, especially on small-screen devices.
Wijmo gauges are composed of Range objects. Every Wijmo gauge has at least two ranges: the "face" and the "pointer".
In addition to these two special ranges, gauges may have any number of additional ranges added to their "ranges" collection. These additional ranges can be used for two things:
The BulletGraph is a type of linear gauge designed specifically for use in dashboards. It displays a single key measure along with a comparative measure and qualitative ranges to instantly signal whether the measure is good, bad, or in some other state.
Bullet Graphs were created and popularized by dashboard design expert Stephen Few. You can find more details and examples on Wikipedia.
constructor(element: any, options?): BulletGraph
Initializes a new instance of the BulletGraph class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a reference value considered bad for the measure.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the direction in which the gauge is filled.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Gets or sets a reference value considered good for the measure.
Gets or sets a value that indicates whether the gauge displays a shadow effect.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the target value for the measure.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Base class for the Wijmo Gauge controls (abstract).
constructor(element: any, options?): Gauge
Initializes a new instance of the Gauge class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Gets or sets a value that indicates whether the gauge displays a shadow effect.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
Gets or sets the value displayed on the gauge.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
The LinearGauge displays a linear scale with an indicator that represents a single value and optional ranges to represent reference values.
If you set the gauge's isReadOnly property to false, then users will be able to edit the value by clicking on the gauge.
constructor(element: any, options?): LinearGauge
Initializes a new instance of the LinearGauge class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Gets or sets a value that indicates whether the gauge displays a shadow effect.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
The RadialGauge displays a circular scale with an indicator that represents a single value and optional ranges to represent reference values.
If you set the gauge's isReadOnly property to false, then users will be able to edit the value by clicking on the gauge.
constructor(element: any, options?): RadialGauge
Initializes a new instance of the RadialGauge class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that indicates whether the gauge automatically scales to fill the host element.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Gets or sets a value that indicates whether the gauge displays a shadow effect.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the starting angle for the gauge, in degrees.
Angles are measured in degrees, clockwise, starting from the 9 o'clock position.
Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the sweeping angle for the gauge, in degrees.
Angles are measured in degrees, clockwise, starting from the 9 o'clock position.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Defines ranges to be used with Gauge controls.
Range objects have min and max properties that define the range's domain, as well as color and thickness properties that define the range's appearance.
Every Gauge control has at least two ranges: the 'face' defines the minimum and maximum values for the gauge, and the 'pointer' displays the gauge's current value.
In addition to the built-in ranges, gauges may have additional ranges used to display regions of significance (for example, low, medium, and high values).
constructor(name?: string): Range
Initializes a new instance of the Range class.
The name of the range.
Gets or sets the color used to display this range.
Gets or sets the maximum value for this range.
Gets or sets the minimum value for this range.
Gets or sets the thickness of this range as a percentage of the parent gauge's thickness.
onPropertyChanged(e: PropertyChangedEventArgs): void
Raises the propertyChanged event.
PropertyChangedEventArgs that contains the property name, old, and new values.
Occurs when the value of a property in this Range changes.
Represents the direction in which the pointer of a LinearGauge increases.
| Name | Value | Description |
|---|---|---|
| Right | 0 | Gauge value increases from left to right. |
| Left | 1 | Gauge value increases from right to left. |
| Up | 2 | Gauge value increases from bottom to top. |
| Down | 3 | Gauge value increases from top to bottom. |
Provides classes that support the OData protocol, including the ODataCollectionView class.
OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. (http://www.odata.org/)
Extends the CollectionView class to support loading and saving data to and from OData sources.
You can use the ODataCollectionView class to load data from OData services and use it as a data source for any Wijmo controls.
In addition to full CRUD support you get all the CollectionView features including sorting, filtering, paging, and grouping. The sorting, filtering, and paging functions may be performed on the server or on the client.
The code below shows how you can instantiate an ODataCollectionView that selects some fields from the data source and provides sorting on the client. Notice how the 'options' parameter is used to pass in initialization data, which is the same approach used when initializing controls:
var url = 'http://services.odata.org/Northwind/Northwind.svc';
var categories = new wijmo.odata.ODataCollectionView(url, 'Categories', {
fields: ['CategoryID', 'CategoryName', 'Description'],
sortOnServer: false
});constructor(url: string, tableName: string, options?: any): ODataCollectionView
Initializes a new instance of the ODataCollectionView class.
Url of the OData service (for example 'http://services.odata.org/Northwind/Northwind.svc').
Name of the table (entity) to retrieve from the service. If not provided, a list of the tables (entities) available is retrieved.
JavaScript object containing initialization data (property values and event handlers) for the ODataCollectionView.
Gets a value that indicates whether a new item can be added to the collection.
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Gets a value that indicates whether the pageIndex value can change.
Gets a value that indicates whether this view supports filtering via the filter property.
Gets a value that indicates whether this view supports grouping via the groupDescriptions property.
Gets a value that indicates whether items can be removed from the collection.
Gets a value that indicates whether this view supports sorting via the sortDescriptions property.
Gets the item that is being added during the current add transaction.
Gets the item that is being edited during the current edit transaction.
Gets the ordinal position of the current item in the view.
Gets or sets a JavaScript object to be used as a map for coercing data types when loading the data.
The object keys represent the field names and the values are DataType values that indicate how the data should be coerced.
For example, the code below creates an ODataCollectionView and specifies that 'Freight' values, which are stored as strings in the database, should be converted into numbers; and that three date fields should be converted into dates:
var orders = new wijmo.data.ODataCollectionView(url, 'Orders', {
dataTypes: {
Freight: wijmo.DataType.Number
OrderDate: wijmo.DataType.Date,
RequiredDate: wijmo.DataType.Date,
ShippedDate: wijmo.DataType.Date,
}
});
This property is useful when the database contains data stored in formats that do not conform to common usage.
In most cases you don't have to provide information about the data types, because the inferDataTypes property handles the conversion of Date values automatically.
If you do provide explicit type information, the inferDataTypes property is not applied. Because of this, any data type information that is provided should be complete, including all fields of type Date.
Gets or sets an array containing the names of the fields to retrieve from the data source.
If this property is set to null or to an empty array, all fields are retrieved.
For example, the code below creates an ODataCollectionView that gets only three fields from the 'Categories' table in the database:
var categories = new wijmo.data.ODataCollectionView(url, 'Categories', {
fields: ['CategoryID', 'CategoryName', 'Description']
});Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
The callback function should return true if the item passed in as a parameter should be included in the view.
NOTE: If the filter function needs a scope (i.e. a meaningful 'this' value) remember to set the filter using the 'bind' function to specify the 'this' object. For example:
collectionView.filter = this._filter.bind(this);
Gets or sets a string containing an OData filter specification to be used for filtering the data on the server.
The filter definition syntax is described in the OData documentation.
For example, the code below causes the server to return records where the 'CompanyName' field starts with 'A' and ends with 'S':
view.filterDefinition = "startswith(CompanyName, 'A') and endswith(CompanyName, 'B')";
Filter definitions can be generated automatically. For example, the FlexGridFilter component detects whether its data source is an ODataCollectionView and automatically updates both the filter and filterDefinition properties.
Note that the filterDefinition property is applied even if the filterOnServer property is set to false. This allows you to apply server and client filters to the same collection, which can be useful in many scenarios.
For example, the code below uses the filterDefinition property to filter on the server and the filter property to further filter on the client. The collection will show items with names that start with 'C' and have unit prices greater than 20:
var url = 'http://services.odata.org/V4/Northwind/Northwind.svc/';
var data = new wijmo.odata.ODataCollectionView(url, 'Products', {
oDataVersion: 4,
filterDefinition: 'startswith(ProductName, \'C\')', // server filter
filterOnServer: false, // client filter
filter: function(product) {
return product.UnitPrice > 20;
},
});Gets or sets a value that determines whether filtering should be performed on the server or on the client.
Use the filter property to perform filtering on the client, and use the filterDefinition property to perform filtering on the server.
In some cases it may be desirable to apply independent filters on the client and on the server.
You can achieve this by setting (1) the filterOnServer property to false and the filter property to a filter function (to enable client-side filtering) and (2) the filterDefinition property to a filter string (to enable server-side filtering).
Gets or sets a callback that determines whether a specific property of an item contains validation errors.
If provided, the callback should take two parameters containing the item and the property to validate, and should return a string describing the error (or null if there are no errors).
For example:
var view = new wijmo.collections.CollectionView(data, {
getError: function (item, property) {
switch (property) {
case 'country':
return countries.indexOf(item.country) < 0
? 'Invalid Country'
: null;
case 'downloads':
case 'sales':
case 'expenses':
return item[property] < 0
? 'Cannot be negative!'
: null;
case 'active':
return item.active && item.country.match(/US|UK/)
? 'No active items allowed in the US or UK!'
: null;
}
return null;
}
});Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Gets an array of CollectionViewGroup objects that represents the top-level groups.
Gets or sets a value that determines whether fields that contain strings that look like standard date representations should be converted to dates automatically.
This property is set to true by default, because the ODataCollectionView class uses JSON and that format does not support Date objects.
This property has no effect if specific type information is provided using the dataTypes property.
Gets a value that indicates whether an add transaction is in progress.
Gets a value that indicates whether an edit transaction is in progress.
Gets a value that indicates whether this view contains no items.
Gets a value that indicates the ODataCollectionView is currently loading data.
This property can be used to provide progress indicators.
Gets a value that indicates whether the page index is changing.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets the total number of items in the view taking paging into account.
Gets an ObservableArray containing the records that were added to the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were edited in the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were removed from the collection since trackChanges was enabled.
Gets or sets an array containing the names of the key fields.
Key fields are required for update operations (add/remove/delete).
Gets or sets a function that creates new items for the collection.
If the creator function is not supplied, the CollectionView will try to create an uninitialized item of the appropriate type.
If the creator function is supplied, it should be a function that takes no parameters and returns an initialized object of the proper type for the collection.
Gets or sets the OData version used by the server.
There are currently four versions of OData services, 1.0 through 4.0. Version 4.0 is used by the latest services, but there are many legacy services still in operation.
If you know what version of OData your service implements, set the oDataVersion property to the appropriate value (1 through 4) when creating the ODataCollectionView (see example below).
var url = 'http://services.odata.org/Northwind/Northwind.svc';
var categories = new wijmo.odata.ODataCollectionView(url, 'Categories', {
oDataVersion: 1.0, // legacy OData source
fields: ['CategoryID', 'CategoryName', 'Description'],
sortOnServer: false
});
If you do not know what version of OData your service implements (perhaps you are writing an OData explorer application), then do not specify the version. In this case, the ODataCollectionView will get this information from the server. This operation requires an extra request, but only once per service URL, so the overhead is small.
Gets the total number of pages.
Gets or sets a value that determines whether paging should be performed on the server or on the client.
Use the pageSize property to enable paging.
Gets or sets the number of items to display on a page.
Gets or sets an object containing request headers to be used when sending or requesting data.
The most typical use for this property is in scenarios where authentication is required. For example:
var categories = new wijmo.odata.ODataCollectionView(serviceUrl, 'Categories', {
fields: ['Category_ID', 'Category_Name'],
requestHeaders: { Authorization: db.token }
});Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
For example, see Dave Koele's Alphanum algorithm. It breaks up strings into chunks composed of strings or numbers, then sorts number chunks in value order and string chunks in ASCII order. Dave calls the result a "natural sorting order".
The example below shows a typical use for the sortComparer property:
// create a CollectionView with a custom sort comparer
var dataCustomSort = new wijmo.collections.CollectionView(data, {
sortComparer: function (a, b) {
return wijmo.isString(a) && wijmo.isString(b)
? alphanum(a, b) // custom comparer used for strings
: null; // use default comparer used for everything else
}
});Gets or sets a function used to convert values when sorting.
If provided, the function should take as parameters a SortDescription, a data item, and a value to convert, and should return the converted value.
This property provides a way to customize sorting. For example, the FlexGrid control uses it to sort mapped columns by display value instead of by raw value.
For example, the code below causes a CollectionView to sort the 'country' property, which contains country code integers, using the corresponding country names:
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(',');
collectionView.sortConverter = function (sd, item, value) {
if (sd.property == 'countryMapped') {
value = countries[value]; // convert country id into name
}
return value;
}Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Gets or sets a value that determines whether sort operations should be performed on the server or on the client.
Use the sortDescriptions property to specify how the data should be sorted.
Gets or sets the underlying (unfiltered and unsorted) collection.
Gets the name of the table (entity) that this collection is bound to.
Gets the total number of items in the view before paging is applied.
Gets or sets a value that determines whether the control should track changes to the data.
If trackChanges is set to true, the CollectionView keeps track of changes to the data and exposes them through the itemsAdded, itemsRemoved, and itemsEdited collections.
Tracking changes is useful in situations where you need to update the server after the user has confirmed that the modifications are valid.
After committing or cancelling changes, use the clearChanges method to clear the itemsAdded, itemsRemoved, and itemsEdited collections.
The CollectionView only tracks changes made when the proper CollectionView methods are used (editItem/commitEdit, addNew/commitNew, and remove). Changes made directly to the data are not tracked.
Gets or sets whether to use a stable sort algorithm.
Stable sorting algorithms maintain the relative order of records with equal keys. For example, consider a collection of objects with an "Amount" field. If you sort the collection by "Amount", a stable sort will keep the original order of records with the same Amount value.
This property is false by default, which causes the CollectionView to use JavaScript's built-in sort method, which is very fast but not stable. Setting the useStableSort property to true increases sort times by 30% to 50%, which can be significant for large collections.
addNew(): any
Creates a new item and adds it to the collection.
This method takes no parameters. It creates a new item, adds it to the collection, and defers refresh operations until the new item is committed using the commitNew method or canceled using the cancelNew method.
The code below shows how the addNew method is typically used:
// create the new item, add it to the collection var newItem = view.addNew(); // initialize the new item newItem.id = getFreshId(); newItem.name = 'New Customer'; // commit the new item so the view can be refreshed view.commitNew();
You can also add new items by pushing them into the sourceCollection and then calling the refresh method. The main advantage of addNew is in user-interactive scenarios (like adding new items in a data grid), because it gives users the ability to cancel the add operation. It also prevents the new item from being sorted or filtered out of view until the add operation is committed.
beginUpdate(): void
Suspend refreshes until the next call to endUpdate.
cancelEdit(): void
Ends the current edit transaction and, if possible, restores the original value to the item.
cancelNew(): void
Ends the current add transaction and discards the pending new item.
clearChanges(): void
Clears all changes by removing all items in the itemsAdded, itemsRemoved, and itemsEdited collections.
Call this method after committing changes to the server or after refreshing the data from the server.
contains(item: any): boolean
Returns a value indicating whether a given item belongs to this view.
Item to seek.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
editItem(item: any): void
Begins an edit transaction of the specified item.
Item to be edited.
endUpdate(): void
Resume refreshes suspended by a call to beginUpdate.
getAggregate(aggType: Aggregate, binding: string, currentPage?: boolean): void
Calculates an aggregate value for the items in this collection.
Type of aggregate to calculate.
Property to aggregate on.
Whether to include only items on the current page.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
load(): void
Loads or re-loads the data from the OData source.
moveCurrentTo(item: any): boolean
Sets the specified item to be the current item in the view.
Item that will become current.
moveCurrentToFirst(): boolean
Sets the first item in the view as the current item.
moveCurrentToLast(): boolean
Sets the last item in the view as the current item.
moveCurrentToNext(): boolean
Sets the item after the current item in the view as the current item.
moveCurrentToPosition(index: number): boolean
Sets the item at the specified index in the view as the current item.
Index of the item that will become current.
moveCurrentToPrevious(): boolean
Sets the item before the current item in the view as the current item.
moveToFirstPage(): boolean
Sets the first page as the current page.
moveToLastPage(): boolean
Sets the last page as the current page.
moveToNextPage(): boolean
Moves to the page after the current page.
moveToPage(index: number): boolean
Moves to the page at the specified index.
Index of the page to move to.
moveToPreviousPage(): boolean
Moves to the page before the current page.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
onCurrentChanged(e?: EventArgs): void
Raises the currentChanged event.
onCurrentChanging(e: CancelEventArgs): boolean
Raises the currentChanging event.
CancelEventArgs that contains the event data.
onError(e: RequestErrorEventArgs): boolean
Raises the error event.
By default, errors throw exceptions and trigger a data refresh. If you want to prevent this behavior, set the cancel parameter to true in the event handler.
RequestErrorEventArgs that contains information about the error.
onLoaded(e?: EventArgs): void
Raises the loaded event.
onLoading(e?: EventArgs): void
Raises the loading event.
onPageChanged(e?: EventArgs): void
Raises the pageChanged event.
onPageChanging(e: PageChangingEventArgs): boolean
Raises the pageChanging event.
PageChangingEventArgs that contains the event data.
onSourceCollectionChanged(e?: EventArgs): void
Raises the sourceCollectionChanged event.
onSourceCollectionChanging(e: CancelEventArgs): boolean
Raises the sourceCollectionChanging event.
CancelEventArgs that contains the event data.
refresh(): void
Re-creates the view using the current sort, filter, and group parameters.
remove(item: any): void
Override remove to remove the item from the database.
Item to be removed from the database.
removeAt(index: number): void
Removes the item at the specified index from the collection.
Index of the item to be removed from the collection. The index is relative to the view, not to the source collection.
updateFilterDefinition(filterProvider: any): void
Updates the filter definition based on a known filter provider such as the FlexGridFilter.
Known filter provider, typically an instance of a FlexGridFilter.
Occurs when the collection changes.
Occurs after the current item changes.
Occurs before the current item changes.
Occurs before the page index changes.
Occurs after the value of the sourceCollection property changes.
Occurs before the value of the sourceCollection property changes.
Extends the ODataCollectionView class to support loading data on demand, using the setWindow method.
The example below shows how you can declare an ODataCollectionView and synchronize it with a FlexGrid control to load the data that is within the grid's viewport:
// declare virtual collection view
var vcv = new wijmo.odata.ODataVirtualCollectionView(url, 'Order_Details_Extendeds', {
oDataVersion: 4
});
// use virtual collection as grid data source
flex.itemsSource = vcv;
// update data window when the grid scrolls
flex.scrollPositionChanged.addHandler(function () {
var rng = flex.viewRange;
vcv.setWindow(rng.row, rng.row2);
});
The ODataVirtualCollectionView class implements a 'data window' so only data that is actually being displayed is loaded from the server. Items that are not being displayed are added to the collection as null values until a call to the setWindow method causes them those items to be loaded.
This 'on-demand' method of loading data has advantages when dealing with large data sets, because it prevents the application from loading data until it is required. But it does impose some limitation: sorting and filtering must be done on the server; grouping and paging are not supported.
constructor(url: string, tableName: string, options?: any): ODataVirtualCollectionView
Initializes a new instance of the ODataVirtualCollectionView class.
Url of the OData service (for example 'http://services.odata.org/Northwind/Northwind.svc').
Name of the table (entity) to retrieve from the service. If not provided, a list of the tables (entities) available is retrieved.
JavaScript object containing initialization data (property values and event handlers) for the ODataVirtualCollectionView.
Gets a value that indicates whether a new item can be added to the collection.
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Gets a value that indicates whether the pageIndex value can change.
Gets a value that indicates whether this view supports filtering via the filter property.
Gets a value that indicates whether items can be removed from the collection.
Gets a value that indicates whether this view supports sorting via the sortDescriptions property.
Gets the item that is being added during the current add transaction.
Gets the item that is being edited during the current edit transaction.
Gets the ordinal position of the current item in the view.
Gets or sets a JavaScript object to be used as a map for coercing data types when loading the data.
The object keys represent the field names and the values are DataType values that indicate how the data should be coerced.
For example, the code below creates an ODataCollectionView and specifies that 'Freight' values, which are stored as strings in the database, should be converted into numbers; and that three date fields should be converted into dates:
var orders = new wijmo.data.ODataCollectionView(url, 'Orders', {
dataTypes: {
Freight: wijmo.DataType.Number
OrderDate: wijmo.DataType.Date,
RequiredDate: wijmo.DataType.Date,
ShippedDate: wijmo.DataType.Date,
}
});
This property is useful when the database contains data stored in formats that do not conform to common usage.
In most cases you don't have to provide information about the data types, because the inferDataTypes property handles the conversion of Date values automatically.
If you do provide explicit type information, the inferDataTypes property is not applied. Because of this, any data type information that is provided should be complete, including all fields of type Date.
Gets or sets an array containing the names of the fields to retrieve from the data source.
If this property is set to null or to an empty array, all fields are retrieved.
For example, the code below creates an ODataCollectionView that gets only three fields from the 'Categories' table in the database:
var categories = new wijmo.data.ODataCollectionView(url, 'Categories', {
fields: ['CategoryID', 'CategoryName', 'Description']
});Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
The callback function should return true if the item passed in as a parameter should be included in the view.
NOTE: If the filter function needs a scope (i.e. a meaningful 'this' value) remember to set the filter using the 'bind' function to specify the 'this' object. For example:
collectionView.filter = this._filter.bind(this);
Gets or sets a string containing an OData filter specification to be used for filtering the data on the server.
The filter definition syntax is described in the OData documentation.
For example, the code below causes the server to return records where the 'CompanyName' field starts with 'A' and ends with 'S':
view.filterDefinition = "startswith(CompanyName, 'A') and endswith(CompanyName, 'B')";
Filter definitions can be generated automatically. For example, the FlexGridFilter component detects whether its data source is an ODataCollectionView and automatically updates both the filter and filterDefinition properties.
Note that the filterDefinition property is applied even if the filterOnServer property is set to false. This allows you to apply server and client filters to the same collection, which can be useful in many scenarios.
For example, the code below uses the filterDefinition property to filter on the server and the filter property to further filter on the client. The collection will show items with names that start with 'C' and have unit prices greater than 20:
var url = 'http://services.odata.org/V4/Northwind/Northwind.svc/';
var data = new wijmo.odata.ODataCollectionView(url, 'Products', {
oDataVersion: 4,
filterDefinition: 'startswith(ProductName, \'C\')', // server filter
filterOnServer: false, // client filter
filter: function(product) {
return product.UnitPrice > 20;
},
});Gets or sets a callback that determines whether a specific property of an item contains validation errors.
If provided, the callback should take two parameters containing the item and the property to validate, and should return a string describing the error (or null if there are no errors).
For example:
var view = new wijmo.collections.CollectionView(data, {
getError: function (item, property) {
switch (property) {
case 'country':
return countries.indexOf(item.country) < 0
? 'Invalid Country'
: null;
case 'downloads':
case 'sales':
case 'expenses':
return item[property] < 0
? 'Cannot be negative!'
: null;
case 'active':
return item.active && item.country.match(/US|UK/)
? 'No active items allowed in the US or UK!'
: null;
}
return null;
}
});Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Gets an array of CollectionViewGroup objects that represents the top-level groups.
Gets or sets a value that determines whether fields that contain strings that look like standard date representations should be converted to dates automatically.
This property is set to true by default, because the ODataCollectionView class uses JSON and that format does not support Date objects.
This property has no effect if specific type information is provided using the dataTypes property.
Gets a value that indicates whether an add transaction is in progress.
Gets a value that indicates whether an edit transaction is in progress.
Gets a value that indicates whether this view contains no items.
Gets a value that indicates the ODataCollectionView is currently loading data.
This property can be used to provide progress indicators.
Gets a value that indicates whether the page index is changing.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets the total number of items in the view taking paging into account.
Gets an ObservableArray containing the records that were added to the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were edited in the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were removed from the collection since trackChanges was enabled.
Gets or sets an array containing the names of the key fields.
Key fields are required for update operations (add/remove/delete).
Gets or sets a function that creates new items for the collection.
If the creator function is not supplied, the CollectionView will try to create an uninitialized item of the appropriate type.
If the creator function is supplied, it should be a function that takes no parameters and returns an initialized object of the proper type for the collection.
Gets or sets the OData version used by the server.
There are currently four versions of OData services, 1.0 through 4.0. Version 4.0 is used by the latest services, but there are many legacy services still in operation.
If you know what version of OData your service implements, set the oDataVersion property to the appropriate value (1 through 4) when creating the ODataCollectionView (see example below).
var url = 'http://services.odata.org/Northwind/Northwind.svc';
var categories = new wijmo.odata.ODataCollectionView(url, 'Categories', {
oDataVersion: 1.0, // legacy OData source
fields: ['CategoryID', 'CategoryName', 'Description'],
sortOnServer: false
});
If you do not know what version of OData your service implements (perhaps you are writing an OData explorer application), then do not specify the version. In this case, the ODataCollectionView will get this information from the server. This operation requires an extra request, but only once per service URL, so the overhead is small.
Gets or sets the number of items to display on a page.
Gets or sets an object containing request headers to be used when sending or requesting data.
The most typical use for this property is in scenarios where authentication is required. For example:
var categories = new wijmo.odata.ODataCollectionView(serviceUrl, 'Categories', {
fields: ['Category_ID', 'Category_Name'],
requestHeaders: { Authorization: db.token }
});Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
For example, see Dave Koele's Alphanum algorithm. It breaks up strings into chunks composed of strings or numbers, then sorts number chunks in value order and string chunks in ASCII order. Dave calls the result a "natural sorting order".
The example below shows a typical use for the sortComparer property:
// create a CollectionView with a custom sort comparer
var dataCustomSort = new wijmo.collections.CollectionView(data, {
sortComparer: function (a, b) {
return wijmo.isString(a) && wijmo.isString(b)
? alphanum(a, b) // custom comparer used for strings
: null; // use default comparer used for everything else
}
});Gets or sets a function used to convert values when sorting.
If provided, the function should take as parameters a SortDescription, a data item, and a value to convert, and should return the converted value.
This property provides a way to customize sorting. For example, the FlexGrid control uses it to sort mapped columns by display value instead of by raw value.
For example, the code below causes a CollectionView to sort the 'country' property, which contains country code integers, using the corresponding country names:
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(',');
collectionView.sortConverter = function (sd, item, value) {
if (sd.property == 'countryMapped') {
value = countries[value]; // convert country id into name
}
return value;
}Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Gets or sets the underlying (unfiltered and unsorted) collection.
Gets the name of the table (entity) that this collection is bound to.
Gets the total number of items in the view before paging is applied.
Gets or sets a value that determines whether the control should track changes to the data.
If trackChanges is set to true, the CollectionView keeps track of changes to the data and exposes them through the itemsAdded, itemsRemoved, and itemsEdited collections.
Tracking changes is useful in situations where you need to update the server after the user has confirmed that the modifications are valid.
After committing or cancelling changes, use the clearChanges method to clear the itemsAdded, itemsRemoved, and itemsEdited collections.
The CollectionView only tracks changes made when the proper CollectionView methods are used (editItem/commitEdit, addNew/commitNew, and remove). Changes made directly to the data are not tracked.
Gets or sets whether to use a stable sort algorithm.
Stable sorting algorithms maintain the relative order of records with equal keys. For example, consider a collection of objects with an "Amount" field. If you sort the collection by "Amount", a stable sort will keep the original order of records with the same Amount value.
This property is false by default, which causes the CollectionView to use JavaScript's built-in sort method, which is very fast but not stable. Setting the useStableSort property to true increases sort times by 30% to 50%, which can be significant for large collections.
addNew(): any
Creates a new item and adds it to the collection.
This method takes no parameters. It creates a new item, adds it to the collection, and defers refresh operations until the new item is committed using the commitNew method or canceled using the cancelNew method.
The code below shows how the addNew method is typically used:
// create the new item, add it to the collection var newItem = view.addNew(); // initialize the new item newItem.id = getFreshId(); newItem.name = 'New Customer'; // commit the new item so the view can be refreshed view.commitNew();
You can also add new items by pushing them into the sourceCollection and then calling the refresh method. The main advantage of addNew is in user-interactive scenarios (like adding new items in a data grid), because it gives users the ability to cancel the add operation. It also prevents the new item from being sorted or filtered out of view until the add operation is committed.
beginUpdate(): void
Suspend refreshes until the next call to endUpdate.
cancelEdit(): void
Ends the current edit transaction and, if possible, restores the original value to the item.
cancelNew(): void
Ends the current add transaction and discards the pending new item.
clearChanges(): void
Clears all changes by removing all items in the itemsAdded, itemsRemoved, and itemsEdited collections.
Call this method after committing changes to the server or after refreshing the data from the server.
commitEdit(): void
Override commitEdit to modify the item in the database.
commitNew(): void
Override commitNew to add the new item to the database.
contains(item: any): boolean
Returns a value indicating whether a given item belongs to this view.
Item to seek.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
editItem(item: any): void
Begins an edit transaction of the specified item.
Item to be edited.
endUpdate(): void
Resume refreshes suspended by a call to beginUpdate.
getAggregate(aggType: Aggregate, binding: string, currentPage?: boolean): void
Calculates an aggregate value for the items in this collection.
Type of aggregate to calculate.
Property to aggregate on.
Whether to include only items on the current page.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
load(): void
Loads or re-loads the data from the OData source.
moveCurrentTo(item: any): boolean
Sets the specified item to be the current item in the view.
Item that will become current.
moveCurrentToFirst(): boolean
Sets the first item in the view as the current item.
moveCurrentToLast(): boolean
Sets the last item in the view as the current item.
moveCurrentToNext(): boolean
Sets the item after the current item in the view as the current item.
moveCurrentToPosition(index: number): boolean
Sets the item at the specified index in the view as the current item.
Index of the item that will become current.
moveCurrentToPrevious(): boolean
Sets the item before the current item in the view as the current item.
moveToFirstPage(): boolean
Sets the first page as the current page.
moveToLastPage(): boolean
Sets the last page as the current page.
moveToNextPage(): boolean
Moves to the page after the current page.
moveToPage(index: number): boolean
Moves to the page at the specified index.
Index of the page to move to.
moveToPreviousPage(): boolean
Moves to the page before the current page.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
onCurrentChanged(e?: EventArgs): void
Raises the currentChanged event.
onCurrentChanging(e: CancelEventArgs): boolean
Raises the currentChanging event.
CancelEventArgs that contains the event data.
onError(e: RequestErrorEventArgs): boolean
Raises the error event.
By default, errors throw exceptions and trigger a data refresh. If you want to prevent this behavior, set the cancel parameter to true in the event handler.
RequestErrorEventArgs that contains information about the error.
onLoaded(e?: EventArgs): void
Raises the loaded event.
onLoading(e?: EventArgs): void
Raises the loading event.
onPageChanged(e?: EventArgs): void
Raises the pageChanged event.
onPageChanging(e: PageChangingEventArgs): boolean
Raises the pageChanging event.
PageChangingEventArgs that contains the event data.
onSourceCollectionChanged(e?: EventArgs): void
Raises the sourceCollectionChanged event.
onSourceCollectionChanging(e: CancelEventArgs): boolean
Raises the sourceCollectionChanging event.
CancelEventArgs that contains the event data.
refresh(): void
Re-creates the view using the current sort, filter, and group parameters.
remove(item: any): void
Override remove to remove the item from the database.
Item to be removed from the database.
removeAt(index: number): void
Removes the item at the specified index from the collection.
Index of the item to be removed from the collection. The index is relative to the view, not to the source collection.
setWindow(start: number, end: number): void
Sets the data window to ensure a range of records are loaded into the view.
Index of the first item in the data window.
Index of the last item in the data window.
updateFilterDefinition(filterProvider: any): void
Updates the filter definition based on a known filter provider such as the FlexGridFilter.
Known filter provider, typically an instance of a FlexGridFilter.
Occurs when the collection changes.
Occurs after the current item changes.
Occurs before the current item changes.
Occurs when there is an error reading or writing data.
Occurs when the ODataCollectionView finishes loading data.
Occurs when the ODataCollectionView starts loading data.
Occurs before the page index changes.
Occurs after the value of the sourceCollection property changes.
Occurs before the value of the sourceCollection property changes.
The module has a dependency on the JSZip library which can be referenced as follows:
<script src="http://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
Indicates whether the original column index is absolute (for example: "$D") or relative (for example: "D").
Indicates whether the original row index is absolute (for example: "$15") or relative (for example: "15").
base64 string for the exported result.
Converted int array for base64 string result.
A zero-based column index.
Download link for the exported result.
A zero-based row index.
Represents the Workbook Object Model Defined Name item definition.
constructor(): DefinedName
Initializes a new instance of the DefinedName class.
The name of the defined name item.
Indicates the defined name item works in which sheet. If omitted, the defined name item works in workbook
The value of the defined name item. The value could be a formula, a string constant or a cell range. For e.g. "Sum(1, 2, 3)", "test" or "sheet1!A1:B2"
constructor(): Workbook
Initializes a new instance of the Workbook class.
Gets or sets the index of the active sheet in the xlsx file.
Gets or sets the name of application that generated the file that appears in the file properties.
Gets the color of the workbook themes.
Gets or sets the name of company that generated the file that appears in the file properties.
Gets or sets the creation time of the xlsx file.
Gets or sets the creator of the xlsx file.
Gets or sets the last modifier of the xlsx file.
Gets or sets the last modified time of the xlsx file.
Gets or sets the reserved content from xlsx file that flexgrid or flexsheet doesn't support yet.
fromXlsxFormat(xlsxFormat: string): string[]
Converts the xlsx multi-section format string to an array of corresponding wijmo formats.
The Excel format string, that may contain multiple format sections separated by a semicolon.
load(base64: string): void
Loads from base-64 string or data url. This method works with JSZip 2.5.
For example:
// This sample opens an xlsx file chosen from Open File
// dialog and creates a workbook instance to load the file.
// HTML
<input type="file"
id="importFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
/>
// JavaScript
var workbook, // receives imported IWorkbook
importFile = document.getElementById('importFile');
importFile.addEventListener('change', function () {
loadWorkbook();
});
function loadWorkbook() {
var reader,
workbook,
file = importFile.files[0];
if (file) {
reader = new FileReader();
reader.onload = function (e) {
workbook = new wijmo.xlsx.Workbook(),
workbook.load(reader.result);
};
reader.readAsDataURL(file);
}
}The base-64 string that contains the xlsx file content.
loadAsync(base64: string, onLoaded?: (workbook: Workbook), onError?: (reason?: any)): void
Loads from base-64 string or data url asynchronously. This method works with JSZip 3.0.
base64 string that contains the xlsx file content.
This callback provides an approach to get an instance of the loaded workbook. Since this method is an asynchronous method, user is not able to get instance of the loaded workbook immediately. User has to get the instance through this callback. This has a single parameter, instance of the loaded workbook. It will be passed to user.
This callback catches error information when loading. This has a single parameter, the failure reason. Return value is be passed to user, if he wants to catch the load failure reason.
For example:
workbook.loadAsync(base64, function (workbook) {
// User can access the loaded workbook instance in this callback.
var app = worksheet.application ;
...
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of load failure is ' + reason);
});save(fileName?: string): string
Saves the book to a file and returns a base-64 string representation of the book. This method works with JSZip 2.5.
For example, this sample creates an xlsx file with a single cell:
function exportXlsx(fileName) {
var book = new wijmo.xlsx.Workbook(),
sheet = new wijmo.xlsx.WorkSheet(),
bookRow = new wijmo.xlsx.WorkbookRow(),
bookCell = new wijmo.xlsx.WorkbookCell();
bookCell.value = 'Hello, Excel!';
bookRow.cells.push(bookCell);
sheet.rows.push(bookRow);
book.sheets.push(sheet);
book.save(fileName);
}
The file name is optional. If not provided, the method still returns a base-64 string representing the book. This string can be used for further processing on the client or on the server.
Name of the xlsx file to save.
saveAsync(fileName?: string, onSaved?: (base64?: string), onError?: (reason?: any)): void
Saves the book to a file asynchronously. This method works with JSZip 3.0.
Name of the xlsx file to save.
This callback provides an approach to get the base-64 string that represents the content of the saved workbook. Since this method is an asynchronous method, user does not get the base-64 string immediately. User has to get the base-64 string via this callback. This has a single parameter, the base-64 string of the saved workbook. It will be passed to user.
This callback catches error information when saving. This has a single parameter, the failure reason. Return value will be passed to user, if he wants to catch the save failure reason.
For example:
workbook.saveAsync('', function (base64){
// User can access the base64 string in this callback.
document.getElementByID('export').href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;' + 'base64,' + base64;
}, function (reason){
// User can catch the failure reason in this callback.
console.log('The reason of save failure is ' + reason);
});tableAddress(xlsxIndex: string): ITableAddress
Convert Excel's alphanumeric cell, row or column index to the zero-based row/column indices pair.
The alphanumeric Excel index that may include alphabetic A-based column index and/or numeric 1-based row index, like "D15", "D" or "15". The alphabetic column index can be in lower or upper case.
toXlsxDateFormat(format: string): string
Converts the wijmo date format to Excel format.
The wijmo date format.
toXlsxNumberFormat(format: string): string
Converts the wijmo number format to xlsx format.
The wijmo number format.
xlsxAddress(row: number, col: number, absolute?: boolean, absoluteCol?: boolean): string
Converts zero-based cell, row or column index to Excel alphanumeric representation.
The zero-based row index or a null value if only column index is to be converted.
The zero-based column index or a null value if only row index is to be converted.
True value indicates that absolute indices is to be returned for both, row and column (like $D$7). The absoluteCol parameter allows to redefine this value for the column index.
True value indicates that column index is absolute.
Represents the Workbook Object Model border definition.
constructor(): WorkbookBorder
Initializes a new instance of the WorkbookBorder class.
Represents the Workbook Object Model background setting definition.
constructor(): WorkbookBorderSetting
Initializes a new instance of the WorkbookBorderSetting class.
Gets or sets the border color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Represents the Workbook Object Model cell definition.
constructor(): WorkbookCell
Initializes a new instance of the WorkbookCell class.
Gets or sets the colSpan setting of cell.
Gets or sets the formula of cell.
Indicates whether the cell value is date or not.
Gets or sets the rowSpan setting of cell.
Gets or sets the cell value.
The type of the value can be String, Number, Boolean or Date.
Represents the Workbook Object Model column definition.
constructor(): WorkbookColumn
Initializes a new instance of the WorkbookColumn class.
Gets or sets a value indicating whether the column width is automatically adjusted to fit the content of its cells.
Gets or sets the column style.
The property defines the style for all cells in the column, and can be overridden by the specific cell styles.
Gets or sets the column visibility.
Gets or sets the width of the column in device-independent (1/96th inch) pixels or characters.
The numeric value defines the width in pixels. On import, the widths are always expressed in pixels.
The string value which is a number with the 'ch' suffix, for example '10ch', defines the width in characters. It has the same meaning as the column width defined through Excel UI. The width can be specified in characters for the export operations only.
If width is not specified, then the default width is applied.
Represents the Workbook Object Model background fill definition.
constructor(): WorkbookFill
Initializes a new instance of the WorkbookFill class.
Gets or sets the fill color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Represents the Workbook Object Model font definition.
constructor(): WorkbookFont
Initializes a new instance of the WorkbookFont class.
Indicates whether the current font is bold.
Gets or sets the font color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Gets or sets the font family name.
Indicates whether the current font has the italic style applied.
Gets or sets the font size in device-independent (1/96th inch) pixels.
Indicates whether the current font is underlined.
Workbook frozen pane definition
constructor(): WorkbookFrozenPane
Initializes a new instance of the WorkbookFrozenPane class.
Gets or sets the number of frozen columns.
Gets or sets the number of frozen rows.
Represents the Workbook Object Model row definition.
constructor(): WorkbookRow
Initializes a new instance of the WorkbookRow class.
Gets or sets an array of cells in the row.
Each WorkbookCell object in the array describes a cell at the corresponding position in the row, i.e. a cell with index 0 pertains to column with index A, a cell with index 1 defines cell pertaining to column with index B, and so on. If a certain cell has no definition (empty) in xlsx file, then corresponding array element is undefined for both export and import operations.
Indicating if the row is in the collapsed outline state.
Gets or sets the group level of the row.
Gets or sets the row height in device-independent (1/96th inch) pixels.
If height is not specified, then the default height is applied.
Gets or sets the row style.
The property defines the style for all cells in the row, and can be overridden by the specific cell styles.
Gets or sets the row visibility.
Represents the Workbook Object Model style definition used to style Excel cells, columns and rows.
constructor(): WorkbookStyle
Initializes a new instance of the WorkbookStyle class.
Defines the base style that this style inherits.
This property is applicable for the export operations only. The style gets all the properties defined in the base style, and can override or augment them by setting its own properties.
Cell value format, defined using Excel format syntax.
The description of Excel format syntax can be found here.
You may use the toXlsxNumberFormat and toXlsxDateFormat static functions of the Workbook class to convert from .Net (Globalize) format to Excel format.
Gets or sets the indent setting of style.
Gets or sets the word wrap setting of row.
Represents the WorkbookTable Object Model background setting definition.
constructor(): WorkbookTable
Initializes a new instance of the WorkbookTable class.
The name of the table. It is used to reference the table programmatically.
The range on the relevant sheet that the table occupies expressed using A1 style referencing. i.e. "A1:D4". The reference shall include the totals row if it is shown.
Indicating whether banded column formatting is applied.
Indicating whether banded row formatting is applied.
Indicating whether the first column in the table should have the style applied.
Indicates whether show the header row for the table.
Indicating whether the last column in the table should have the style applied.
Indicates whether show the total row for the table.
Represents the WorkbookTableStripeStyle Object Model background setting definition.
constructor(): WorkbookTableBandedStyle
Initializes a new instance of the WorkbookTableStripeStyle class.
Defines the base style that this style inherits.
This property is applicable for the export operations only. The style gets all the properties defined in the base style, and can override or augment them by setting its own properties.
Cell value format, defined using Excel format syntax.
The description of Excel format syntax can be found here.
You may use the toXlsxNumberFormat and toXlsxDateFormat static functions of the Workbook class to convert from .Net (Globalize) format to Excel format.
Number of rows or columns in a single band of striping.
Represents the Workbook Object Model table border definition.
constructor(): WorkbookTableBorder
Initializes a new instance of the WorkbooktableBorder class.
Gets or sets the bottom border setting.
Gets or sets the diagonal border setting.
Represents the WorkbookTableColumn Object Model background setting definition.
constructor(): WorkbookTableColumn
Initializes a new instance of the WorkbookTableColumn class.
The name of the table column. It is referenced through functions.
Indicating whether show filter button for the column.
The function to show in the totals row cell for this column.
The string to show in the totals row cell for the column.
Represents the WorkbookTableCommonStyle Object Model background setting definition.
constructor(): WorkbookTableCommonStyle
Initializes a new instance of the WorkbookTableCommonStyle class.
Defines the base style that this style inherits.
This property is applicable for the export operations only. The style gets all the properties defined in the base style, and can override or augment them by setting its own properties.
Cell value format, defined using Excel format syntax.
The description of Excel format syntax can be found here.
You may use the toXlsxNumberFormat and toXlsxDateFormat static functions of the Workbook class to convert from .Net (Globalize) format to Excel format.
Represents the WorkbookTableStyle Object Model background setting definition.
constructor(): WorkbookTableStyle
Initializes a new instance of the WorkbookTableStyle class.
The name of the table style.
Represents the Workbook Object Model sheet definition that includes sheet properties and data.
The sheet cells are stored in row objects and are accessible using JavaScript expressions like sheet.rows[i].cells[j].
constructor(): WorkSheet
Initializes a new instance of the WorkSheet class.
Gets or sets an array of sheet columns definitions.
Each WorkbookColumn object in the array describes a column at the corresponding position in xlsx sheet, i.e. the column with index 0 corresponds to xlsx sheet column with index A, object with index 1 defines sheet column with index B, and so on. If certain column has no description in xlsx file, then corresponding array element is undefined for both export and import operations.
If WorkbookColumn object in the array doesn't specify the width property value, then the default column width is applied.
Gets or sets the sheet name.
Gets an array of sheet rows definition.
Each WorkbookRow object in the array describes a row at the corresponding position in xlsx sheet, i.e. the row with index 0 corresponds to excel sheet row with index 1, object with index 1 defines sheet row with index 2, and so on. If certain row has no properties and data in xlsx file, then corresponding array element is undefined for both export and import operations.
If WorkbookRow object in the array doesn't specify the height property value, then the default row height is applied.
Gets or sets the row style.
The property defines the style for all cells in the worksheet, and can be overridden by the specific cell styles.
Gets or sets a value indicating whether summary rows appear below or above detail rows.
Gets the name of tables refered in this worksheet.
Gets or sets the worksheet visibility.
The name of the defined name item.
Indicates the defined name item works in which sheet. If omitted, the defined name item works in workbook.
The value of the defined name item. The value could be a formula, a string constant or a cell range. For e.g. "Sum(1, 2, 3)", "test" or "sheet1!A1:B2"
Defines a cell index with zero-based row and column components, as well as the properties indicating whether the index component is absolute (for example: "$D") or relative (for example: "D").
Indicates whether the original column index is absolute (for example: "$D") or relative (for example: "D").
Indicates whether the original row index is absolute (for example: "$15") or relative (for example: "15").
A zero-based column index.
A zero-based row index.
Represents an Excel Workbook. This interface is the root of the Excel Workbook Object Model (WOM) which provides a way to define properties and data stored in xlsx file.
To create an xlsx file, create a Workbook object and populate them with WorkSheet, WorkbookColumn, WorkbookRow, and WorkbookCell objects.
To save xlsx files, use the save method which can save the book to a file or return it as a base-64 string.
To load existing xlsx files, use the load method which will populate the book.
Index of the active sheet in the xlsx file.
Name of the application that generated the file that appears in the file properties.
The color of the workbook themes.
Name of the company that generated the file that appears in the file properties.
Creation time of the xlsx file.
Creator of the xlsx file.
Last modifier of the xlsx file.
Last modified time of the xlsx file.
The reserved content for the workbook.
Border color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Represents the Workbook Object Model cell definition.
Cell colSpan setting
Cell formula
Indicates whether the cell value is date or not.
Cell rowSpan setting
Gets or sets the cell value.
The type of the value can be String, Number, Boolean or Date.
Represents the Workbook Object Model column definition.
Gets or sets a value indicating whether the column width is automatically adjusted to fit the content of its cells.
Gets or sets the column style.
The property defines the style for all cells in the column, and can be overridden by the specific cell styles.
Gets or sets the column visibility.
Gets or sets the width of the column in device-independent (1/96th inch) pixels or characters.
The numeric value defines the width in pixels. On import, the widths are always expressed in pixels.
The string value which is a number with the 'ch' suffix, for example '10ch', defines the width in characters. It has the same meaning as the column width defined through Excel UI. The width can be specified in characters for the export operations only.
If width is not specified, then the default width is applied.
Represents the Workbook Object Model background fill definition.
Gets or sets the fill color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Represents the Workbook Object Model font definition.
Gets or sets a value indicating whether this font is bold.
Gets or sets the font color.
For export, the color can be specified in any valid HTML format like 6-character dash notation or rgb/rgba/hsl/hsla functional form. In case of rgba/hsla representations, specified alpha channel value is ignored.
For import, a value is always represented in the HTML 6-character dash notation, for example, "#afbfcf".
Gets or sets the font family name.
Gets or sets a value indicating whether this font has the italic style applied.
Gets or sets the font size in device-independent (1/96th inch) pixels.
Gets or sets a value indicating whether this font is underlined.
Gets or sets the number of frozen columns.
Gets or sets the number of frozen rows.
Represents the Workbook Object Model row definition.
Gets or sets an array of cells in the row.
Each IWorkbookCell object in the array describes a cell at the corresponding position in the row, i.e. cell with index 0 pertains to column with index A, cell with index 1 defines cell pertaining to column with index B, and so on. If a certain cell has no definition (empty) in xlsx file, then corresponding array element is undefined for both export and import operations.
TBD: Indicating if the row is in the collapsed outline state.
Gets or sets the group level of the row.
Gets or sets the row height in device-independent (1/96th inch) pixels.
If height is not specified, then the default height is applied.
Gets or sets the row style.
The property defines the style for all cells in the row, and can be overridden by the specific cell styles.
Gets or sets the row visibility.
Represents the Workbook Object Model style definition used to style Excel cells, columns and rows.
Defines the base style that this style inherits.
This property is applicable for export operations only. The style gets all the properties defined in the base style, and can override or augment them by setting its own properties.
Cell value format, defined using Excel format syntax.
The description of Excel format syntax can be found here.
You may use the toXlsxNumberFormat and toXlsxDateFormat static functions of the Workbook class to convert from .Net (Globalize) format to Excel format.
Text indent. It is an integer value, where an increment of 1 represents 3 spaces.
Word wrap setting.
The name of the table. It is used to reference the table programmatically.
The range on the relevant sheet that the table occupies expressed using A1 style referencing. i.e. "A1:D4". The reference shall include the totals row if it is shown.
Indicating whether banded column formatting is applied.
Indicating whether banded row formatting is applied.
Indicating whether the first column in the table should have the style applied.
Indicates whether show the header row for the table.
Indicating whether the last column in the table should have the style applied.
Indicates whether show the total row for the table.
Represents the Table Stripe Style definition.
Number of rows or columns in a single band of striping.
Table border definition.
Represents the Table Column definition.
The name of the table column. It is referenced through functions.
Indicating whether show filter button for the column.
The function to show in the totals row cell for this column.
The string to show in the totals row cell for the column.
Represents the Table Common Style definition.
Represents the Table Style definition.
The name of the table style.
Represents the Workbook Object Model sheet definition that includes sheet properties and data.
The sheet cells are stored in row objects and are accessible using JavaScript expressions like sheet.rows[i].cells[j].
Gets or sets an array of sheet columns definitions.
Each IWorkbookColumn object in the array describes a column at the corresponding position in xlsx sheet, i.e. column with index 0 corresponds to xlsx sheet column with index A, object with index 1 defines sheet column with index B, and so on. If certain column has no description in xlsx file, then corresponding array element is undefined for both export and import operations.
If IWorkbookColumn object in the array doesn't specify the width property value, then the default column width is applied.
Gets or sets the sheet name.
Gets or sets an array of sheet rows definition.
Each IWorkbookRow object in the array describes a row at the corresponding position in xlsx sheet, i.e. row with index 0 corresponds to xlsx sheet row with index A, object with index 1 defines sheet row with index B, and so on. If certain row has no description in xlsx file, then corresponding array element is undefined for both export and import operations.
If IWorkbookRow object in the array doesn't specify the height property value, then the default row height is applied.
Gets or sets the sheet style.
The property defines the style for all cells in the worksheet, and can be overridden by the specific cell styles.
Gets or sets a value indicating whether summary rows appear below or above detail rows.
Gets the name of tables refered in this worksheet.
Gets or sets the worksheet visibility.
| Name | Value | Description |
|---|---|---|
| None | 0 | No border |
| Thin | 1 | Thin border |
| Medium | 2 | Medium border |
| Dashed | 3 | Dashed border |
| Dotted | 4 | Dotted border |
| Thick | 5 | Thick line border |
| Double | 6 | Double line border |
| Hair | 7 | Hair line border |
| MediumDashed | 8 | Medium dashed border |
| ThinDashDotted | 9 | Thin dash dotted border |
| MediumDashDotted | 10 | Medium dash dotted border |
| ThinDashDotDotted | 11 | Thin dash dot dotted border |
| MediumDashDotDotted | 12 | Medium dash dot dotted border |
| SlantedMediumDashDotted | 13 | Slanted medium dash dotted border |
Defines the Workbook Object Model horizontal text alignment.
| Name | Value | Description |
|---|---|---|
| General | 0 | Alignment depends on the cell value type. |
| Left | 1 | Text is aligned to the left. |
| Center | 2 | Text is centered. |
| Right | 3 | Text is aligned to the right. |
| Fill | 4 | Text is replicated to fill the whole cell width. |
| Justify | 5 | Text is justified. |
| Name | Value | Description |
|---|---|---|
| Top | 0 | Top vertical alignment |
| Center | 1 | Center vertical alignment |
| Bottom | 2 | Bottom vertical alignment |
| Justify | 3 | Justified vertical alignment |
Defines the PdfDocument class and associated classes.
ptToPx(value: number): number
Converts a point unit value to a pixel unit value.
The value to convert.
pxToPt(value: number): number
Converts a pixel unit value to a point unit value.
The value to convert.
saveBlob(blob: Blob, fileName: string): void
Saves the Blob object as a file.
The Blob object to save.
The name with which the file is saved.
Represents an abstract class that serves as a base class for all brushes. Instances of any class that derives from this class are used to fill areas and text.
This class is not intended to be instantiated in your code.
Represents the dash pattern used to stroke paths.
constructor(dash?: number, gap?: number, phase?: number): PdfDashPattern
Initializes a new instance of the PdfDashPattern class.
The length of alternating dashes, in points.
The length of alternating gaps, in points.
The distance in the dash pattern to start the dash at, in points.
Gets or sets the length of alternating dashes, in points. The default value is null which indicates no dash pattern, but a solid line.
Gets or sets the length of alternating gaps, in points. The default value is equal to dash which indicates that dashes and gaps will have the same length.
Gets or sets the distance in the dash pattern to start the dash at, in points. The default value is 0.
equals(value: PdfDashPattern): boolean
Determines whether the specified PdfDashPattern instance is equal to the current one.
PdfDashPattern to compare.
Represents a PDF document object, based on PDFKit JavaScript library.
constructor(options?: any): PdfDocument
Initializes a new instance of the PdfDocument class.
An optional object containing initialization settings.
Gets a value that indicates whether the pages buffering mode is enabled which means that the document's pages can be iterated over using pageIndex and bufferedPageRange.
This property can be assigned using the PdfDocument constructor only. This property can be set to false only if both header and footer are invisible.
The default value is true.
Gets a value that indicates whether the document compression is enabled. This property can be assigned using the PdfDocument constructor only.
The default value is true.
Gets an object that represents the current page settings (read-only).
Gets an object that represents a header, the page area positioned right below the top margin.
Gets or sets the document information, such as author name, document's creation date and so on.
Gets or sets the spacing between each line of text, in points.
The default value is 0.
Gets or sets the index of the current page within the buffered pages range.
Use the bufferedPageRange method to get the range of buffered pages.
Gets an object that represents the default page settings for the pages added automatically and for the addPage method.
Gets or sets the X-coordinate (in points) of the current point in the text flow used to draw a text or an image.
Gets or sets the Y-coordinate (in points) of the current point in the text flow used to draw a text or an image.
addPage(settings?: IPdfPageSettings): PdfDocument
Adds a new page with the given settings.
If the settings parameter is omitted, then pageSettings will be used instead.
Page settings.
bufferedPageRange(): IPdfBufferedPageRange
Gets the range of buffered pages.
dispose(): void
Disposes the document.
drawImage(url: string, x?: number, y?: number, options?: IPdfImageDrawSettings): PdfPageArea
Draws an image in JPG or PNG format with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point.
A string containing the URL to get the image from or the data URI containing a base64 encoded image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the image drawing options.
drawSvg(url: string, x?: number, y?: number, options?: IPdfSvgDrawSettings): PdfPageArea
Draws a SVG image with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
The method uses the values of the width and height attributes of the outermost svg element to determine the scale factor according to the options.width and options.height properties. If any of these attributes are omitted then scaling is not performed and the image will be rendered in its original size.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point. The increment value is defined by the options.height property or by the outermost svg element's height attribute, which comes first. If none of them is provided then @see:y will stay unchanged.
The method supports a limited set of SVG features and provided primarily for rendering wijmo 5 chart controls.
A string containing the URL to get the SVG image from or the data URI containing a base64 encoded SVG image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the SVG image drawing options.
drawText(text: string, x?: number, y?: number, options?: IPdfTextDrawSettings): IPdfTextMeasurementInfo
Draws a string with the given options and returns the measurement information.
If options.pen, options.brush or options.font are omitted, the current document's pen, brush or font are used (see setPen, setBrush, and setFont).
The string is drawn within the rectangular area for which top-left corner, width and height are defined by the x, y, options.width and options.height values. If x and y are not provided, the x and y properties are used instead.
The text is wrapped and clipped automatically within the area. If options.height is not provided and the text exceeds the bottom body edge, then a new page will be added to accommodate the text.
Finally, the method updates the value of the x and y properties. Hence, any subsequent text or image starts below this point (depending on the value of options.continued).
The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
The text to draw.
The X-coordinate of the point to draw the text at, in points.
The Y-coordinate of the point to draw the text at, in points.
Determines the text drawing options.
end(): void
Finishes the document rendering.
lineHeight(font?: PdfFont): number
Gets the line height with a given font.
If font is not specified, then font used in the current document is used.
Font to get the line height.
measureText(text: string, font?: PdfFont, options?: IPdfTextMeasurementSettings): IPdfTextMeasurementInfo
Measures a text with the given font and text drawing options without rendering it.
If font is not specified, then the font used in the current document is used.
The method uses the same text rendering engine as drawText, so it is tied up in the same way to @see:x and the right page margin, if options.width is not provided. The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
Text to measure.
Font to be applied on the text.
Determines the text drawing options.
moveDown(lines?: number, font?: PdfFont): PdfPageArea
Moves down the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move down.
Font to calculate the line height.
moveUp(lines?: number, font?: PdfFont): PdfPageArea
Moves up the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move up.
Font to calculate the line height.
onEnded(args: PdfDocumentEndedEventArgs): void
Raises the end event.
A PdfDocumentEndedEventArgs object that contains the event data.
registerFont(font: IPdfFontFile): PdfDocument
Registers a font from a source and associates it with a given font family name and font attributes.
The font to register.
registerFontAsync(font: IPdfFontFile, callback: Function): void
Registers a font from a URL asynchronously and associates it with a given font family name and font attributes.
The callback function takes a IPdfFontFile object as a parameter.
The font to register.
A callback function which will be called, when the font has been registered.
restoreState(): PdfDocument
Restores the state from the stack and applies it to the graphic context.
rotate(angle: number, origin?: Point): PdfPageArea
Rotates the graphic context clockwise by a specified angle.
The rotation angle, in degrees.
The Point of rotation, in points. If it is not provided, then the top left corner is used.
saveState(): PdfDocument
Saves the state of the graphic context (including current pen, brush and transformation state) and pushes it onto stack.
scale(xFactor: number, yFactor?: number, origin?: Point): PdfPageArea
Scales the graphic context by a specified scaling factor.
The scaling factor value within the range [0, 1] indicates that the size will be decreased. The scaling factor value greater than 1 indicates that the size will be increased.
The factor to scale the X dimension.
The factor to scale the Y dimension. If it is not provided, it is assumed to be equal to xFactor.
The Point to scale around, in points. If it is not provided, then the top left corner is used.
setBrush(brushOrColor: any): PdfDocument
Sets the default document brush. This brush will be used by the fill, fillAndStroke and drawText methods, if no specific brush is provided.
The brushOrColor argument can accept the following values:
The brush or color to use.
setFont(font: PdfFont): PdfDocument
Sets the document font. If exact font with given style and weight properties is not found then,
The font object to set.
setPen(penOrColor: any): PdfDocument
Sets the default document pen. This pen will be used by the stroke, fillAndStroke and drawText methods, if no specific pen is provided.
The penOrColor argument can accept the following values:
The pen or color to use.
transform(a: number, b: number, c: number, d: number, e: number, f: number): PdfPageArea
Transforms the graphic context with given six numbers which represents a 3x3 transformation matrix.
A transformation matrix is written as follows:
| a | b | 0 |
| c | d | 0 |
| e | f | 1 |
Value of the first row and first column.
Value of the first row and second column.
Value of the second row and first column.
Value of the second row and second column.
Value of the third row and first column.
Value of the third row and second column.
translate(x: number, y: number): PdfPageArea
Translates the graphic context with a given distance.
The distance to translate along the X-axis, in points.
The distance to translate along the Y-axis, in points.
Provides arguments for the end event.
constructor(blob: Blob): PdfDocumentEndedEventArgs
Initializes a new instance of the PdfDocumentEndedEventArgs class.
A Blob object that contains the document data.
constructor(family?: string, size?: number, style?: string, weight?: string): PdfFont
Initializes a new instance of the PdfFont class.
The family name of the font.
The size of the font.
The style of the font.
The weight of the font.
Gets or sets the family name of the font.
The list of the font family names in the order of preferences, separated by commas. Each font family name can be the one that was registered using the registerFont method or the name of one of the PDF standard font families: 'courier', 'helvetica', 'symbol', 'times', 'zapfdingbats' or the superfamily name: 'cursive', 'fantasy', 'monospace', 'serif', 'sans-serif'.
Gets or sets the size of the font.
Gets or sets the style of the font.
The following values are supported: 'normal', 'italic', 'oblique'.
Gets or sets the weight of the font.
The following values are supported: 'normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'.
Represents an abstract class that serves as a base class for the PdfLinearGradientBrush and PdfRadialGradientBrush classes.
This class is not intended to be instantiated in your code.
constructor(stops?: PdfGradientStop[], opacity?: number): PdfGradientBrush
Initializes a new instance of the PdfGradientBrush class.
The PdfGradientStop array to set on this brush.
The opacity of this brush.
Gets or sets the opacity of the brush. The value must be in range [0, 1], where 0 indicates that the brush is completely transparent and 1 indicates that the brush is completely opaque. The default value is 1.
Gets or sets an array of PdfGradientStop objects representing a color, offset and opacity within the brush's gradient axis. The default value is an empty array.
equals(value: PdfGradientBrush): boolean
Determines whether the specified PdfGradientBrush instance is equal to the current one.
PdfGradientBrush to compare.
Represents an object which determines a transition point of a gradient.
constructor(offset?: number, color?: any, opacity?: number): PdfGradientStop
Initializes a new instance of the PdfGradientStop class.
The location of the gradient stop on the gradient axis.
The color of the gradient stop. A Color object or any string acceptable by the fromString method.
The opacity of the gradient stop.
Gets or sets the location of the gradient stop on gradient axis of the brush. The value must be in range [0, 1], where 0 indicates that the gradient stop is placed at the beginning of the gradient axis, while 1 indicates that the gradient stop is placed at the end of the gradient axis. The default value is 0.
Gets or sets the opacity of the gradient stop. The value must be in range [0, 1], where 0 indicates that the gradient stop is completely transparent, while 1 indicates that the gradient stop is completely opaque. The default value is 1.
equals(value: PdfGradientStop): boolean
Determines whether the specified PdfGradientStop instance is equal to the current one.
PdfGradientStop to compare.
Represents a brush used to fill an area with a linear gradient.
constructor(x1: number, y1: number, x2: number, y2: number, stops: PdfGradientStop[], opacity?: number): PdfLinearGradientBrush
Initializes a new instance of the PdfLinearGradientBrush class.
The X-coordinate of the starting point of the linear gradient.
The Y-coordinate of the starting point of the linear gradient.
The X-coordinate of the ending point of the linear gradient.
The Y-coordinate of the ending point of the linear gradient.
The PdfGradientStop array to set on this brush.
The opacity of this brush.
Gets or sets the opacity of the brush. The value must be in range [0, 1], where 0 indicates that the brush is completely transparent and 1 indicates that the brush is completely opaque. The default value is 1.
Gets or sets an array of PdfGradientStop objects representing a color, offset and opacity within the brush's gradient axis. The default value is an empty array.
Gets or sets the X-coordinate of the starting point of the linear gradient, in page area coordinates, in points.
Gets or sets the X-coordinate of the ending point of the linear gradient, in page area coordinates, in points.
Gets or sets the Y-coordinate of the starting point of the linear gradient, in page area coordinates, in points.
Gets or sets the Y-coordinate of the ending point of the linear gradient, in page area coordinates, in points.
clone(): PdfLinearGradientBrush
Creates a copy of this PdfLinearGradientBrush.
equals(value: PdfLinearGradientBrush): boolean
Determines whether the specified PdfLinearGradientBrush instance is equal to the current one.
PdfLinearGradientBrush to compare.
Represents an area of a page with its own coordinate system, where (0, 0) points to the top-left corner. Provides methods for drawing text, images, paths and transformations.
This class is not intended to be instantiated in your code.
constructor(): PdfPageArea
Initializes a new instance of the PdfRunningTitle class.
Gets the height of the area, in points.
Gets or sets the spacing between each line of text, in points.
The default value is 0.
Gets the width of the area, in points.
Gets or sets the X-coordinate (in points) of the current point in the text flow used to draw a text or an image.
Gets or sets the Y-coordinate (in points) of the current point in the text flow used to draw a text or an image.
drawImage(url: string, x?: number, y?: number, options?: IPdfImageDrawSettings): PdfPageArea
Draws an image in JPG or PNG format with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point.
A string containing the URL to get the image from or the data URI containing a base64 encoded image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the image drawing options.
drawSvg(url: string, x?: number, y?: number, options?: IPdfSvgDrawSettings): PdfPageArea
Draws a SVG image with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
The method uses the values of the width and height attributes of the outermost svg element to determine the scale factor according to the options.width and options.height properties. If any of these attributes are omitted then scaling is not performed and the image will be rendered in its original size.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point. The increment value is defined by the options.height property or by the outermost svg element's height attribute, which comes first. If none of them is provided then @see:y will stay unchanged.
The method supports a limited set of SVG features and provided primarily for rendering wijmo 5 chart controls.
A string containing the URL to get the SVG image from or the data URI containing a base64 encoded SVG image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the SVG image drawing options.
drawText(text: string, x?: number, y?: number, options?: IPdfTextDrawSettings): IPdfTextMeasurementInfo
Draws a string with the given options and returns the measurement information.
If options.pen, options.brush or options.font are omitted, the current document's pen, brush or font are used (see setPen, setBrush, and setFont).
The string is drawn within the rectangular area for which top-left corner, width and height are defined by the x, y, options.width and options.height values. If x and y are not provided, the x and y properties are used instead.
The text is wrapped and clipped automatically within the area. If options.height is not provided and the text exceeds the bottom body edge, then a new page will be added to accommodate the text.
Finally, the method updates the value of the x and y properties. Hence, any subsequent text or image starts below this point (depending on the value of options.continued).
The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
The text to draw.
The X-coordinate of the point to draw the text at, in points.
The Y-coordinate of the point to draw the text at, in points.
Determines the text drawing options.
lineHeight(font?: PdfFont): number
Gets the line height with a given font.
If font is not specified, then font used in the current document is used.
Font to get the line height.
measureText(text: string, font?: PdfFont, options?: IPdfTextMeasurementSettings): IPdfTextMeasurementInfo
Measures a text with the given font and text drawing options without rendering it.
If font is not specified, then the font used in the current document is used.
The method uses the same text rendering engine as drawText, so it is tied up in the same way to @see:x and the right page margin, if options.width is not provided. The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
Text to measure.
Font to be applied on the text.
Determines the text drawing options.
moveDown(lines?: number, font?: PdfFont): PdfPageArea
Moves down the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move down.
Font to calculate the line height.
moveUp(lines?: number, font?: PdfFont): PdfPageArea
Moves up the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move up.
Font to calculate the line height.
rotate(angle: number, origin?: Point): PdfPageArea
Rotates the graphic context clockwise by a specified angle.
The rotation angle, in degrees.
The Point of rotation, in points. If it is not provided, then the top left corner is used.
scale(xFactor: number, yFactor?: number, origin?: Point): PdfPageArea
Scales the graphic context by a specified scaling factor.
The scaling factor value within the range [0, 1] indicates that the size will be decreased. The scaling factor value greater than 1 indicates that the size will be increased.
The factor to scale the X dimension.
The factor to scale the Y dimension. If it is not provided, it is assumed to be equal to xFactor.
The Point to scale around, in points. If it is not provided, then the top left corner is used.
transform(a: number, b: number, c: number, d: number, e: number, f: number): PdfPageArea
Transforms the graphic context with given six numbers which represents a 3x3 transformation matrix.
A transformation matrix is written as follows:
| a | b | 0 |
| c | d | 0 |
| e | f | 1 |
Value of the first row and first column.
Value of the first row and second column.
Value of the second row and first column.
Value of the second row and second column.
Value of the third row and first column.
Value of the third row and second column.
translate(x: number, y: number): PdfPageArea
Translates the graphic context with a given distance.
The distance to translate along the X-axis, in points.
The distance to translate along the Y-axis, in points.
Provides methods for creating graphics paths and drawing them or using them for clipping.
Path creation method calls must be finished with the stroke, fill, fillAndStroke or clip method. Any document methods which don't apply directly to path creation/ drawing/ clipping (changing a pen, drawing a text, saving the graphics state etc) are prohibited to use until the path is finished. The lineTo, bezierCurveTo and quadraticCurveTo methods should not start the path, they must be preceded with the moveTo.
The methods are chainable:
doc.paths.moveTo(0, 0).lineTo(100, 100).stroke();
This class is not intended to be instantiated in your code.
constructor(doc: PdfDocument, offset: Point): PdfPaths
Initializes a new instance of the PdfPaths class.
Document.
Offset.
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): PdfPaths
Draws a bezier curve from the current point to a new point using the (cp1x, cp1y) and (cp2x, cp2y) as the control points.
The new current point is (x, y).
The X-coordinate of the first control point, in points.
The Y-coordinate of the first control point, in points.
The X-coordinate of the second control point, in points.
The Y-coordinate of the second control point, in points.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
circle(x: number, y: number, radius: number): PdfPaths
Draws a circle.
The X-coordinate of the center of the circle, in points.
The Y-coordinate of the center of the circle, in points.
The radius of the circle, in points.
clip(rule?: PdfFillRule): PdfPaths
Creates a clipping path used to limit the regions of the page affected by painting operators.
The fill rule to use.
closePath(): PdfPaths
Closes the current path and draws a line from the current point to the initial point of the current path.
ellipse(x: number, y: number, radiusX: number, radiusY?: number): PdfPaths
Draws an ellipse.
The X-coordinate of the center of the ellipse, in points.
The Y-coordinate of the center of the ellipse, in points.
The radius of the ellipse along the X-axis, in points.
The radius of the ellipse along the Y-axis, in points. If it is not provided, then it is assumed to be equal to radiusX.
fill(brushOrColor?: any, rule?: PdfFillRule): PdfPaths
Fills the path with the specified brush and rule. If brush is not specified, then the default document brush will be used (see the setBrush method).
The brushOrColor argument can accept the following values:
The brush or color to use.
The fill rule to use.
fillAndStroke(brushOrColor?: any, penOrColor?: any, rule?: PdfFillRule): PdfPaths
Fills and strokes the path with the specified brush, pen and rule. If brush and pen is not specified, then the default document brush and pen will be used (See the setBrush, setPen methods).
The brushOrColor argument can accept the following values:
The penOrColor argument can accept the following values:
The brush or color to use.
The pen or color to use.
The fill rule to use.
lineTo(x: number, y: number): PdfPaths
Draws a line from the current point to a new point.
The new current point is (x, y).
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
moveTo(x: number, y: number): PdfPaths
Sets a new current point.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
polygon(points: number[][]): PdfPaths
Draws a polygon using a given points array.
An array of two-elements arrays [x, y] specifying the X and Y coordinates of the point, in points.
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): PdfPaths
Draws a quadratic curve from the current point to a new point using the current point and (cpx, cpy) as the control points.
The new current point is (x, y).
The X-coordinate of the control point, in points.
The Y-coordinate of the control point, in points.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
rect(x: number, y: number, width: number, height: number): PdfPaths
Draws a rectangle.
The X-coordinate of the topleft corner of the rectangle, in points.
The Y-coordinate of the topleft corner of the rectangle, in points.
The width of the rectangle, in points.
The width of the rectangle, in points.
roundedRect(x: number, y: number, width: number, height: number, cornerRadius?: number): PdfPaths
Draws a rounded rectangle.
The X-coordinate of the upper-left corner of the rectangle, in points.
The Y-coordinate of the upper-left corner of the rectangle, in points.
The width of the rectangle, in points.
The width of the rectangle, in points.
The corner radius of the rectangle, in points. The default value is 0.
stroke(penOrColor?: any): PdfPaths
Strokes the path with the specified pen. If pen is not specified, then the default document pen will be used (See the setPen method).
The penOrColor argument can accept the following values:
The pen or color to use.
constructor(colorOrBrushOrOptions?: any, width?: number, dashPattern?: PdfDashPattern, cap?: PdfLineCapStyle, join?: PdfLineJoinStyle, miterLimit?: number): PdfPen
Initializes a new instance of the PdfPen class with the specified color or brush or JavaScript object.
The first argument can accept the following values:
The color or brush or JavaScript object to use.
The width to use.
The dash pattern to use.
The line cap style to use.
The line join style to use.
The miter limit to use.
Gets or sets the brush used to stroke paths. Takes precedence over the color property, if defined.
Gets or sets the shape that shall be used at the open ends of a stroked path. The default value is Butt.
Gets the dash pattern used to stroke paths. The default value is a solid line.
Gets or sets the shape to be used at the corners of a stroked path. The default value is Miter.
Determines the maximum value of the miter length to the line width ratio, when the line join is converted from miter to bevel. The default value is 10.
Gets or sets the line width used to stroke paths, in points. The default width is 1.
Represents a brush used to fill an area with a radial gradient.
constructor(x1: number, y1: number, r1: number, x2: number, y2: number, r2: number, stops: PdfGradientStop[], opacity?: number): PdfRadialGradientBrush
Initializes a new instance of the PdfRadialGradientBrush class.
The X-coordinate of the inner circle's center of the radial gradient.
The Y-coordinate of the inner circle's center of the radial gradient.
The radius of the inner circle of the radial gradient.
The X-coordinate of the outer circle's center of the radial gradient.
The Y-coordinate of the outer circle's center of the radial gradient.
The radius of the outer circle of the radial gradient.
The PdfGradientStop array to set on this brush.
The opacity of this brush.
Gets or sets the opacity of the brush. The value must be in range [0, 1], where 0 indicates that the brush is completely transparent and 1 indicates that the brush is completely opaque. The default value is 1.
Gets or sets the radius of the inner circle that represents the starting point of the radial gradient, in page area coordinates, in points.
Gets or sets the radius of the outer circle that represents the ending point of the radial gradient, in page area coordinates, in points.
Gets or sets an array of PdfGradientStop objects representing a color, offset and opacity within the brush's gradient axis. The default value is an empty array.
Gets or sets the X-coordinate of the inner circle's center that represents the starting point of the radial gradient, in page area coordinates, in points.
Gets or sets the X-coordinate of the outer circle's center that represents the ending point of the radial gradient, in page area coordinates, in points.
Gets or sets the Y-coordinate of the inner circle's center that represents the starting point of the radial gradient, in page area coordinates, in points.
Gets or sets the Y-coordinate of the outer circle's center that represents the ending point of the radial gradient, in page area coordinates, in points.
clone(): PdfRadialGradientBrush
Creates a copy of this PdfRadialGradientBrush.
equals(value: PdfRadialGradientBrush): boolean
Determines whether the specified PdfRadialGradientBrush instance is equal to the current one.
PdfRadialGradientBrush to compare.
Represents a running title of the page, like header and footer.
This class is not intended to be instantiated in your code.
constructor(options?: any): PdfRunningTitle
Initializes a new instance of the PdfRunningTitle class.
An optional object containing initialization settings.
Gets or sets an object that provides the ability to setup the running title content declaratively.
Gets or sets the height of the running title, in points. To hide the running title, set this property to 0. Changing this property has no effect on previous drawings; they will not be resized or clipped.
The default value is 24.
Gets or sets the spacing between each line of text, in points.
The default value is 0.
Gets or sets the X-coordinate (in points) of the current point in the text flow used to draw a text or an image.
Gets or sets the Y-coordinate (in points) of the current point in the text flow used to draw a text or an image.
drawImage(url: string, x?: number, y?: number, options?: IPdfImageDrawSettings): PdfPageArea
Draws an image in JPG or PNG format with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point.
A string containing the URL to get the image from or the data URI containing a base64 encoded image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the image drawing options.
drawSvg(url: string, x?: number, y?: number, options?: IPdfSvgDrawSettings): PdfPageArea
Draws a SVG image with the given options.
If x and y are not defined, then @see:x and @see:y are used instead.
The method uses the values of the width and height attributes of the outermost svg element to determine the scale factor according to the options.width and options.height properties. If any of these attributes are omitted then scaling is not performed and the image will be rendered in its original size.
Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point. The increment value is defined by the options.height property or by the outermost svg element's height attribute, which comes first. If none of them is provided then @see:y will stay unchanged.
The method supports a limited set of SVG features and provided primarily for rendering wijmo 5 chart controls.
A string containing the URL to get the SVG image from or the data URI containing a base64 encoded SVG image.
The x-coordinate of the point to draw the image at, in points.
The y-coordinate of the point to draw the image at, in points.
Determines the SVG image drawing options.
drawText(text: string, x?: number, y?: number, options?: IPdfTextDrawSettings): IPdfTextMeasurementInfo
Draws a string with the given options and returns the measurement information.
If options.pen, options.brush or options.font are omitted, the current document's pen, brush or font are used (see setPen, setBrush, and setFont).
The string is drawn within the rectangular area for which top-left corner, width and height are defined by the x, y, options.width and options.height values. If x and y are not provided, the x and y properties are used instead.
The text is wrapped and clipped automatically within the area. If options.height is not provided and the text exceeds the bottom body edge, then a new page will be added to accommodate the text.
Finally, the method updates the value of the x and y properties. Hence, any subsequent text or image starts below this point (depending on the value of options.continued).
The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
The text to draw.
The X-coordinate of the point to draw the text at, in points.
The Y-coordinate of the point to draw the text at, in points.
Determines the text drawing options.
lineHeight(font?: PdfFont): number
Gets the line height with a given font.
If font is not specified, then font used in the current document is used.
Font to get the line height.
measureText(text: string, font?: PdfFont, options?: IPdfTextMeasurementSettings): IPdfTextMeasurementInfo
Measures a text with the given font and text drawing options without rendering it.
If font is not specified, then the font used in the current document is used.
The method uses the same text rendering engine as drawText, so it is tied up in the same way to @see:x and the right page margin, if options.width is not provided. The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.
Text to measure.
Font to be applied on the text.
Determines the text drawing options.
moveDown(lines?: number, font?: PdfFont): PdfPageArea
Moves down the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move down.
Font to calculate the line height.
moveUp(lines?: number, font?: PdfFont): PdfPageArea
Moves up the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.
Number of lines to move up.
Font to calculate the line height.
rotate(angle: number, origin?: Point): PdfPageArea
Rotates the graphic context clockwise by a specified angle.
The rotation angle, in degrees.
The Point of rotation, in points. If it is not provided, then the top left corner is used.
scale(xFactor: number, yFactor?: number, origin?: Point): PdfPageArea
Scales the graphic context by a specified scaling factor.
The scaling factor value within the range [0, 1] indicates that the size will be decreased. The scaling factor value greater than 1 indicates that the size will be increased.
The factor to scale the X dimension.
The factor to scale the Y dimension. If it is not provided, it is assumed to be equal to xFactor.
The Point to scale around, in points. If it is not provided, then the top left corner is used.
transform(a: number, b: number, c: number, d: number, e: number, f: number): PdfPageArea
Transforms the graphic context with given six numbers which represents a 3x3 transformation matrix.
A transformation matrix is written as follows:
| a | b | 0 |
| c | d | 0 |
| e | f | 1 |
Value of the first row and first column.
Value of the first row and second column.
Value of the second row and first column.
Value of the second row and second column.
Value of the third row and first column.
Value of the third row and second column.
translate(x: number, y: number): PdfPageArea
Translates the graphic context with a given distance.
The distance to translate along the X-axis, in points.
The distance to translate along the Y-axis, in points.
Represents the declarative content of the running title.
constructor(text?: string, font?: PdfFont, brushOrColor?: any): PdfRunningTitleDeclarativeContent
Initializes a new instance of the PdfRunningTitleDeclarativeContent class.
The text of the running title.
Font of the text.
The PdfBrush or Color or any string acceptable by the fromString method used to fill the text.
Gets or sets the text of the running title.
May contain up to 3 tabular characters ('\t') which are used for separating the text into the parts that will be aligned within the page area using left, center and right alignment. Two kinds of macros are supported, '&[Page]' and '&[Pages]'. The former one designates the current page index while the latter one designates the page count.
For example, for the first page of a document having ten pages, the following string:
'&[Page]\\&[Pages]\theader\t&[Page]\\&[Pages]'
will be translated to:
'1\10 header 1\10'
clone(): PdfRunningTitleDeclarativeContent
Creates a copy of this PdfRunningTitleDeclarativeContent.
equals(value: PdfRunningTitleDeclarativeContent): boolean
Determines whether the specified PdfRunningTitleDeclarativeContent instance is equal to the current one.
PdfRunningTitleDeclarativeContent to compare.
Represents a brush used to fill an area with a color.
constructor(color?: any): PdfSolidBrush
Initializes a new instance of the PdfSolidBrush class.
The color of this brush. A Color object or any string acceptable by the fromString method.
equals(value: PdfSolidBrush): boolean
Determines whether the specified PdfSolidBrush instance is equal to the current one.
PdfSolidBrush to compare.
Represents a range of buffered pages returned by bufferedPageRange method.
Determines the count of buffered pages.
Determines the zero-based index of the first buffered page.
Represents the document information used by info property.
Determines the date and time the document was created on.
Determines the keywords associated with the document.
Determines the date and time when the document was last modified.
Determines the subject of the document.
Determines the title of the document.
Glyphs have finishing strokes, flared or tapering ends, or have actual serifed endings.
Fantasy fonts are primarily decorative fonts that contain playful representations of characters.
All glyphs have the same width.
Glyphs have stroke endings that are plain.
Glyphs have finishing strokes, flared or tapering ends, or have actual serifed endings.
Represents the settings of the font to register by registerFont and registerFontAsync methods.
An optional parameter determining the TrueType Collection or Datafork TrueType font family.
The name of the font to use.
An ArrayBuffer containing binary data or URL to load the font from. Following font formats are supported: TrueType (.ttf), TrueType Collection (.ttc), Datafork TrueType (.dfont).
The style of the font. One of the following values: 'normal', 'italic', 'oblique'.
The weight of the font. One of the following values: 'normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'.
Represents the image drawing settings used by drawImage method.
If neither width nor height options are provided, then the image will be rendered in its original size. If only width is provided, then the image will be scaled proportionally to fit in the provided width. If only height is provided, then the image will be scaled proportionally to fit in the provided height. If both width and height are provided, then image will be stretched to the dimensions depending on the stretchProportionally property.
Determines the horizontal alignment in case of proportional stretching.
Determines the height of the image, in points.
Indicates whether an image will be stretched proportionally or not, if both width and height options are provided.
Determines the vertical alignment in case of proportional stretching.
Determines the width of the image, in points.
Determines the bottom margin, in points.
Determines the left margin, in points.
Determines the right margin, in points.
Determines the top margin, in points.
Determines the dimensions of the page. The following values are supported:
Represents the settings used by drawSvg method to draw a SVG image.
Determines a callback function used to convert a relative URL to a URL that is correct for the current request path. The function gets passed the relative URL as its argument and should return the resolved URL.
Determines the brush to fill the text. If not specified, the default document brush will be used (setBrush method).
Determines the font to use. If not specified, the default document font will be used (setFont method).
Determines the pen to stroke the text. If not specified, the default document pen will be used (setPen method).
Represents the text measurement information returned by measureText method.
Determines the character count.
Represents the settings used by measureText method.
Determines whether the last line external leading value should be included into the measurements result. The default value is true.
Represents text settings used by drawText and measureText methods.
Determines how text is aligned within the drawing area. The default value is Left.
Determines the spacing between text characters. The default value is 0.
Determines the spacing between each column, in points. The default value is 18.
Determines the number of columns to flow the text into. The default value is 1.
Indicates whether subsequent text should be continued right after that or it will be a new paragraph. If true, the text settings will be retained between drawText calls. It means that options argument will be merged with the one taken from the previous drawText call.
The default value is false.
Determines the character to display at the end of the text when it exceeds the given area.The default value is undefined, that is, ellipsis is not displayed. Set to true to use the default character.
Indicates whether the text should be filled or not. The default value is true.
Determines the height of the drawing area in points to which the text should be clipped. The default value is undefined which means that the text area will be limited by bottom edge of the body section. Use Infinity to indicate that the text area has an infinite height.
Determines the value of indentaion in each paragraph of text, in points. The default value is 0.
Indicates whether line wrapping should be used or not. The property is ignored if width is defined. The default value is true.
Determines the spacing between lines of text. The default value is 0.
Determines a URL used to create a link annotation (URI action).
Determines the spacing between paragraphs of text. The default value is 0.
Indicates whether the text should be striked out or not. The default value is false.
Indicates whether the text should be stroked or not. The default value is false.
Indicates whether the text should be underlined or not. The default value is false.
Determines the width of the text area in points to which the text should wrap. The default value is undefined which means that the text area will be limited by right margin of the page. Use Infinity to indicate that the text area has an infinite width. If defined, forces the lineBreak property to be enabled.
Determines the spacing between words in the text. The default value is 0.
Specifies a rule that determines if a point falls inside the enclosed path.
| Name | Value | Description |
|---|---|---|
| NonZero | 0 | Non-zero rule. |
| EvenOdd | 1 | Even-odd rule. |
Specifies the horizontal alignment of the image.
| Name | Value | Description |
|---|---|---|
| Left | 0 | Aligns the image to the left edge of the drawing area. |
| Center | 1 | Aligns the image in the middle of the drawing area. |
| Right | 2 | Aligns the image to the right edge of the drawing area. |
Specifies the vertical alignment of the image.
| Name | Value | Description |
|---|---|---|
| Top | 0 | Aligns the image to the top edge of the drawing area. |
| Center | 1 | Aligns the image in the middle of the drawing area. |
| Bottom | 2 | Aligns the image to the bottom edge of the drawing area. |
Specifies the shape that shall be used at the ends of open subpaths (and dashes, if any) when they are stroked.
| Name | Value | Description |
|---|---|---|
| Butt | 0 | The stroke is squared off at the endpoint of the path. |
| Round | 1 | A semicircular arc with a diameter equal to the line width is drawn around the endpoint and is filled in. |
| Square | 2 | The stroke continues beyond the endpoint of the path for a distance equal to the half of the line width and is squared off. |
Specifies the shape to be used at the corners of paths that are stroked.
| Name | Value | Description |
|---|---|---|
| Miter | 0 | The outer edges of the strokes for the two segments are extended until they meet at an angle. |
| Round | 1 | An arc of a circle with a diameter equal to the line width is drawn around the point where the two segments meet. |
| Bevel | 2 | The two segments are finished with butt caps and the resulting notch beyond the ends of the segments is filled with a triangle. |
| Name | Value | Description |
|---|---|---|
| Portrait | 0 | Portrait orientation. |
| Landscape | 1 | Landscape orientation. |
| Name | Value | Description |
|---|---|---|
| A0 | 0 | Represents the A0 page size. |
| A1 | 1 | Represents the A1 page size. |
| A2 | 2 | Represents the A2 page size. |
| A3 | 3 | Represents the A3 page size. |
| A4 | 4 | Represents the A4 page size. |
| A5 | 5 | Represents the A5 page size. |
| A6 | 6 | Represents the A6 page size. |
| A7 | 7 | Represents the A7 page size. |
| A8 | 8 | Represents the A8 page size. |
| A9 | 9 | Represents the A9 page size. |
| A10 | 10 | Represents the A10 page size. |
| B0 | 11 | Represents the B0 page size. |
| B1 | 12 | Represents the B1 page size. |
| B2 | 13 | Represents the B2 page size. |
| B3 | 14 | Represents the B3 page size. |
| B4 | 15 | Represents the B4 page size. |
| B5 | 16 | Represents the B5 page size. |
| B6 | 17 | Represents the B6 page size. |
| B7 | 18 | Represents the B7 page size. |
| B8 | 19 | Represents the B8 page size. |
| B9 | 20 | Represents the B9 page size. |
| B10 | 21 | Represents the B10 page size. |
| C0 | 22 | Represents the C0 page size. |
| C1 | 23 | Represents the C1 page size. |
| C2 | 24 | Represents the C2 page size. |
| C3 | 25 | Represents the C3 page size. |
| C4 | 26 | Represents the C4 page size. |
| C5 | 27 | Represents the C5 page size. |
| C6 | 28 | Represents the C6 page size. |
| C7 | 29 | Represents the C7 page size. |
| C8 | 30 | Represents the C8 page size. |
| C9 | 31 | Represents the C9 page size. |
| C10 | 32 | Represents the C10 page size. |
| RA0 | 33 | Represents the RA0 page size. |
| RA1 | 34 | Represents the RA1 page size. |
| RA2 | 35 | Represents the RA2 page size. |
| RA3 | 36 | Represents the RA3 page size. |
| RA4 | 37 | Represents the RA4 page size. |
| SRA0 | 38 | Represents the SRA0 page size. |
| SRA1 | 39 | Represents the SRA1 page size. |
| SRA2 | 40 | Represents the SRA2 page size. |
| SRA3 | 41 | Represents the SRA3 page size. |
| SRA4 | 42 | Represents the SRA4 page size. |
| Executive | 43 | Represents the executive page size. |
| Folio | 44 | Represents the folio page size. |
| Legal | 45 | Represents the legal page size. |
| Letter | 46 | Represents the letter page size. |
| Tabloid | 47 | Represents the tabloid page size. |
Specifies the horizontal alignment of text content.
| Name | Value | Description |
|---|---|---|
| Left | 0 | Text is aligned to the left. |
| Center | 1 | Text is centered. |
| Right | 2 | Text is aligned to the right. |
| Justify | 3 | Text is justified. |
Defines the FlexGridPdfConverter class used to export the FlexGrid to PDF.
Provides a functionality to export the FlexGrid to PDF.
draw(flex: FlexGrid, doc: PdfDocument, width?: number, height?: number, settings?: IFlexGridDrawSettings): void
Draws the FlexGrid to an existing PdfDocument at the (0, @wijmo.pdf.PdfDocument.y) coordinates.
If width is not specified, then grid will be rendered in actual size, breaking into pages as needed. If height is not specified, then grid will be scaled to fit the width, breaking into pages vertically as needed. If both, width and height are determined, then grid will be scaled to fit the specified rectangle without any page breaks.
var doc = new wijmo.pdf.PdfDocument({
ended: function (sender, args) {
wijmo.pdf.saveBlob(args.blob, 'FlexGrid.pdf');
}
});
wijmo.grid.pdf.FlexGridPdfConverter.draw(grid, doc, null, null, {
maxPages: 10,
styles: {
cellStyle: {
backgroundColor: '#ffffff',
borderColor: '#c6c6c6'
},
headerCellStyle: {
backgroundColor: '#eaeaea'
}
}
});The FlexGrid instance to export.
The PdfDocument instance to draw in.
The width of the drawing area in points.
The height of the drawing area in points.
The draw settings.
drawToPosition(flex: FlexGrid, doc: PdfDocument, point: Point, width?: number, height?: number, settings?: IFlexGridDrawSettings): void
Draws the FlexGrid to an existing PdfDocument instance at the specified coordinates.
If width is not specified, then grid will be rendered in actual size without any page breaks. If height is not specified, then grid will be scaled to fit the width without any page breaks. If both, width and height are determined, then grid will be scaled to fit the specified rectangle without any page breaks.
var doc = new wijmo.pdf.PdfDocument({
ended: function (sender, args) {
wijmo.pdf.saveBlob(args.blob, 'FlexGrid.pdf');
}
});
wijmo.grid.pdf.FlexGridPdfConverter.drawToPosition(grid, doc, new wijmo.Point(0, 0), null, null, {
maxPages: 10,
styles: {
cellStyle: {
backgroundColor: '#ffffff',
borderColor: '#c6c6c6'
},
headerCellStyle: {
backgroundColor: '#eaeaea'
}
}
});The FlexGrid instance to export.
The PdfDocument instance to draw in.
The position to draw at, in points.
The width of the drawing area in points.
The height of the drawing area in points.
The draw settings.
export(flex: FlexGrid, fileName: string, settings?: IFlexGridExportSettings): void
Exports the FlexGrid to PDF.
wijmo.grid.pdf.FlexGridPdfConverter.export(grid, 'FlexGrid.pdf', {
scaleMode: wijmo.grid.pdf.ScaleMode.PageWidth,
maxPages: 10,
styles: {
cellStyle: {
backgroundColor: '#ffffff',
borderColor: '#c6c6c6'
},
headerCellStyle: {
backgroundColor: '#eaeaea'
}
},
documentOptions: {
info: {
title: 'Sample'
}
}
});The FlexGrid instance to export.
Name of the file to export.
The export settings.
Represents arguments of the IFlexGridDrawSettings.formatItem callback.
constructor(p: GridPanel, rng: CellRange, cell: HTMLElement, canvas: PdfPageArea, clientRect: Rect, contentRect: Rect, textTop: number, style: ICellStyle, getFormattedCell?: Function): PdfFormatItemEventArgs
Initializes a new instance of the PdfFormatItemEventArgs class.
GridPanel that contains the range.
Range of cells affected by the event.
Element that represents the grid cell to be rendered.
Canvas to perform the custom painting on.
Object that represents the client rectangle of the grid cell to be rendered in canvas coordinates.
Object that represents the content rectangle of the grid cell to be rendered in canvas coordinates.
Object that represents the top position of the text in canvas coordinates.
Object that represents the style of the grid cell to be rendered.
Callback function that should return the grid cell when the getFormattedCell method is called.
Gets or sets a value that indicates whether the event should be canceled.
Gets or sets a value that indicates that default cell borders drawing should be canceled.
Gets a reference to the element that represents the grid cell being rendered. If IFlexGridDrawSettings.customCellContent is set to true then contains reference to the element that represents the formatted grid cell; otherwise, a null value.
Provides a value to use with events that do not have event data.
Gets an object that represents the style of the cell being rendered. If IFlexGridDrawSettings.customCellContent is set to true then the style is inferred from the cell style; othwerwise it contains a combination of the IFlexGridDrawSettings.styles export setting, according to the row type of exported cell.
Gets the value that represents the top position of the text of the cell being rendered in canvas coordinates.
getFormattedCell(): HTMLElement
Returns a reference to the element that represents the grid cell being rendered. This method is useful when export of custom formatting is disabled, but you need to export custom content for certain cells.
Represents the look and feel of a cell.
Represents the background color of a cell.
Represents the border color of a cell.
Represents the font of a cell.
Represents the settings used by the draw and drawToPosition methods.
Indicates whether custom cell content and style should be evaluated and exported. If set to true then export logic will retrieve cell content using cell.textContent property, and cell style using getComputedStyle(cell). Default is 'undefined' (i.e. false).
Represents an array of custom fonts that will be embedded into the document.
This sample illustrates how to setup the FlexGridPdfConverter to use two custom fonts, Cuprum-Bold.ttf and Cuprum-Regular.ttf. The first one is applied to the header cells only, while the second one is applied to all the remaining cells.
wijmo.grid.pdf.FlexGridPdfConverter.export(flex, fileName, {
embeddedFonts: [{
source: 'resources/ttf/Cuprum-Bold.ttf',
name: 'cuprum',
style: 'normal',
weight: 'bold'
}, {
source: 'resources/ttf/Cuprum-Regular.ttf',
name: 'cuprum',
style: 'normal',
weight: 'normal'
}],
styles: {
cellStyle: {
font: {
family: 'cuprum'
}
},
headerCellStyle: {
font: {
weight: 'bold'
}
}
}
});An optional callback function called for every exported cell that allows to perform transformations of exported cell value and style, or perform a custom drawing.
The function accepts the PdfFormatItemEventArgs class instance as the first argument.
In case of custom drawing the cancel property should be set to true to cancel the default cell content drawing, and the cancelBorders property should be set to true to cancel the default cell borders drawing.
wijmo.grid.pdf.FlexGridPdfConverter.export(flex, fileName, {
formatItem: function(args) {
// Change the background color of the regular cells of "Country" column.
if (args.panel.cellType === wijmo.grid.CellType.Cell && args.panel.columns[args.col].binding === "country") {
args.style.backgroundColor = 'blue';
}
}
});Determines the maximum number of pages to export.
Indicates whether star-sized columns widths should be recalculated against the PDF page width instead of using the grid's width.
Indicates whether merged values should be repeated across pages when the merged range is split on multiple pages.
Represents the settings used by the export method.
Represents the look and feel of the FlexGrid being exported.
Represents the cell style applied to cells of the FlexGrid that contain validation errors if the showErrors property is enabled.
Represents the cell style applied to row headers and column headers of the FlexGrid.
Specifies whether the whole grid or just a section should be rendered.
| Name | Value | Description |
|---|---|---|
| All | 0 | Exports all the data from grid. |
| Selection | 1 | Exports the current selection only. |
Specifies how the grid content should be scaled to fit the page.
| Name | Value | Description |
|---|---|---|
| ActualSize | 0 | Render the grid in actual size, breaking into pages as needed. |
| PageWidth | 1 | Scale the grid, so that it fits the page width. |
| SinglePage | 2 | Scale the grid, so that it fits on a single page. |
Describes a FlexSheet column sorting criterion.
constructor(columnIndex: number, ascending: boolean): ColumnSortDescription
Initializes a new instance of the ColumnSortDescription class.
Indicates which column to sort the rows by.
The sort order.
Gets or sets the ascending.
Gets or sets the column index.
clone(): ColumnSortDescription
Creates a copy of the ColumnSortDescription.
Represents a defined name item of FlexSheet.
constructor(owner: FlexSheet, name: string, value: any, sheetName?: string): DefinedName
Initializes a new instance of the DefinedName class.
The owner @see: FlexSheet control.
The name of the defined name item.
The value of the defined name item.
The sheet name indicates the defined name item works in which sheet of FlexSheet. If omitted, the defined name item works in all sheets of FlexSheet.
Gets or sets the name of the defined name item.
Gets the sheetName of the defined name item.
Gets or sets the value of the defined name item.
Provides arguments for the draggingRowColumn event.
constructor(isDraggingRows: boolean, isShiftKey: boolean): DraggingRowColumnEventArgs
Initializes a new instance of the DraggingRowColumnEventArgs class.
Indicates whether the dragging event is triggered due to dragging rows or columns.
Indicates whether the shift key is pressed when dragging.
Provides a value to use with events that do not have event data.
Gets a value indicating whether the event refers to dragging rows or columns.
Gets a value indicating whether the shift key is pressed.
Defines the FlexSheet control.
The FlexSheet control extends the FlexGrid control to provide Excel-like features such as a calculation engine, multiple sheets, undo/redo, and XLSX import/export.
A complete list of the functions supported by the FlexSheet's calculation engine can be found here: FlexSheet Functions.
constructor(element: any, options?): FlexSheet
Initializes a new instance of the FlexSheet class.
The DOM element that will host the control, or a jQuery selector (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Gets an array the IDefinedName objects representing named ranges/expressions defined in the FlexSheet.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value indicating whether the function list is opened.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets or sets a value indicating whether the TabHolder is visible.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets or sets a Point that represents the value of the grid's scrollbars.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets the visiblity of the filter icon.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Gets the UndoStack instance that controls undo and redo operations of the FlexSheet.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
addBoundSheet(sheetName: string, source: any, pos?: number, grid?: FlexGrid): Sheet
Add a bound Sheet to the FlexSheet.
The name of the Sheet.
The items source for the Sheet.
The position in the sheets collection.
The FlexGrid instance associated with the Sheet. If not specified then new FlexGrid instance will be created.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
addFunction(name: string, func: Function, description?: string, minParamsCount?: number, maxParamsCount?: number): void
Add custom function in FlexSheet.
the name of the custom function.
the custom function.
The function signature looks as follows:
function (...params: any[][][]): any;
The function takes a variable number of parameters, each parameter corresponds to an expression
passed as a function argument. Independently of whether the expression passed as a function argument
resolves to a single value or to a cell range, each parameter value is always a two dimensional array
of resolved values. The number of rows (first index) and columns (second index) in the array corresponds
to the size of the specified cell range. In case where argument is an expression that resolves
to a single value, it will be a one-to-one array where its value can be retrieved using the
param[0][0] indexer.
The sample below adds a custom Sum Product function ('customSumProduct') to the FlexSheet:
flexSheet.addFunction('customSumProduct', (...params: any[][][]) => {
let result = 0,
range1 = params[0],
range2 = params[1];
if (range1.length > 0 && range1.length === range2.length && range1[0].length === range2[0].length) {
for (let i = 0; i < range1.length; i++) {
for (let j = 0; j < range1[0].length; j++) {
result += range1[i][j] * range2[i][j];
}
}
}
return result;
}, 'Custom SumProduct Function', 2, 2);
After adding this function, it can be used it in sheet cell expressions, like here:
=customSumProduct(A1:B5, B1:C5)
the description of the custom function, it will be shown in the function autocompletion of the FlexSheet.
the minimum count of the parameter that the function need.
the maximum count of the parameter that the function need. If the count of the parameters in the custom function is arbitrary, the minParamsCount and maxParamsCount should be set to null.
addTable(rowIndex: number, colIndex: number, rowSpan: number, colSpan: number, tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, sheet?: Sheet): Table
Add empty table in FlexSheet.
The top row position of the table.
The left column position of the table.
The number of the rows in the table.
The number of the columns in the table.
The name of the table.
The table style is applied to the table.
The options of the table.
Indicates the table will be added in which sheet. If the sheet is omitted, it will be added in current sheet.
addTableFromDataSource(rowIndex: number, colIndex: number, dataSource: any[], tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, sheet?: Sheet): Table
Add the table from the data source in FlexSheet.
The top row position of the table.
The left column position of the table.
The dataSource load to the table.
The name of the table.
The table style is applied to the table.
The options of the table.
Indicates the table will be added in which sheet. If the sheet is omitted, it will be added in current sheet.
addUnboundSheet(sheetName?: string, rows?: number, cols?: number, pos?: number, grid?: FlexGrid): Sheet
Add an unbound Sheet to the FlexSheet.
The name of the Sheet.
The row count of the Sheet.
The column count of the Sheet.
The position in the sheets collection.
The FlexGrid instance associated with the Sheet. If not specified then new FlexGrid instance will be created.
applyCellsStyle(cellStyle: ICellStyle, cells?: CellRange[], isPreview?: boolean): void
Apply the style to a range of cells.
The ICellStyle object to apply.
An array of CellRange objects to apply the style to. If not specified then style is applied to the currently selected cells.
Indicates whether the applied style is just for preview.
applyFunctionToCell(): void
Inserts the selected function from the function list to the cell value editor.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
clear(): void
Clears the content of the FlexSheet control.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Overrides the base class method to take into account the function list.
convertNumberToAlpha(c: number): string
Converts the number value to its corresponding alpha value. For instance: 0, 1, 2...to a, b, c...
The number value need to be converted.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
deleteColumns(index?: number, count?: number): void
Deletes columns from the current Sheet of the FlexSheet control.
The starting index of the deleting columns. If not specified then columns will be deleted starting from the first column of the current selection.
The numbers of columns to delete. If not specified then one column will be deleted.
deleteRows(index?: number, count?: number): void
Deletes rows from the current Sheet of the FlexSheet control.
The starting index of the deleting rows. If not specified then rows will be deleted starting from the first row of the current selection.
The numbers of rows to delete. If not specified then one row will be deleted.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
evaluate(formula: string, format?: string, sheet?: Sheet): any
Evaluates a formula.
FlexSheet formulas follow the Excel syntax, including a large subset of the functions supported by Excel. A complete list of the functions supported by FlexSheet can be found here: FlexSheet Functions.
The formula to evaluate. The formula may start with an optional equals sign ('=').
If specified, defines the .Net format that will be applied to the evaluated value.
The Sheet whose data will be used for evaluation. If not specified then the current sheet is used.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
freezeAtCursor(): void
Freeze or unfreeze the columns and rows of the FlexSheet control.
getBuiltInTableStyle(styleName: string): TableStyle
Get the built-in table style via its name.
The name of the built-in table style.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getCellValue(rowIndex: number, colIndex: number, formatted?: boolean, sheet?: Sheet): any
Gets the evaluated cell value.
Unlike the getCellData method that returns a raw data that can be a value or a formula, the getCellValue method always returns an evaluated value, that is if the cell contains a formula then it will be evaluated first and the resulting value will be returned.
The row index of the cell.
The column index of the cell.
Indicates whether to return an original or a formatted value of the cell.
The Sheet whose value to evaluate. If not specified then the data from current sheet is used.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
FlexSheet overrides this method to support multiple rows or columns selection in FlexSheet.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(panel: GridPanel, r: number, c: number, clip?: boolean): CellRange
Gets a CellRange that specifies the merged extent of a cell in a GridPanel. This method overrides the getMergedRange method of its parent class FlexGrid
GridPanel that contains the range.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to clip the merged range to the grid's current view range.
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getSelectionFormatState(): IFormatState
Gets the IFormatState object describing formatting of the selected cells.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hideFunctionList(): void
Close the function list.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
insertColumns(index?: number, count?: number): void
Inserts columns in the current Sheet of the FlexSheet control.
The position where new columns should be added. If not specified then columns will be added before the left column of the current selection.
The numbers of columns to add. If not specified then one column will be added.
insertRows(index?: number, count?: number): void
Inserts rows in the current Sheet of the FlexSheet control.
The position where new rows should be added. If not specified then rows will be added before the first row of the current selection.
The numbers of rows to add. If not specified then one row will be added.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
load(workbook: any): void
Loads the workbook into FlexSheet. This method works with JSZip 2.5.
For example:
// This sample opens an xlsx file chosen through Open File
// dialog and fills FlexSheet
// HTML
<input type="file"
id="importFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
/>
<div id="flexHost"></>
// JavaScript
var flexSheet = new wijmo.grid.FlexSheet("#flexHost"),
importFile = document.getElementById('importFile');
importFile.addEventListener('change', function () {
loadWorkbook();
});
function loadWorkbook() {
var reader,
file = importFile.files[0];
if (file) {
reader = new FileReader();
reader.onload = function (e) {
flexSheet.load(reader.result);
};
reader.readAsArrayBuffer(file);
}
}A workbook instance or a Blob instance or a base-64 string or an ArrayBuffer containing xlsx file content.
loadAsync(workbook: any, onLoaded?: (workbook: wijmo.xlsx.Workbook), onError?: (reason?: any)): void
Loads the workbook into FlexSheet asynchronously. This method works with JSZip 3.0.
A workbook instance or a Blob instance or a base-64 string or an ArrayBuffer containing xlsx file content.
This callback provides an approach to get the loaded workbook instance. Since this method is an asynchronous method, user is not able to get the loaded workbook instance immediately. User has to get the loaded workbook instance through this callback. This has a single parameter, the loaded workbook instance. It is passed to user.
This callback catches error information when loading. This has a single parameter, the failure reason. The return value is passed to user if he wants to catch the load failure reason.
For example:
flexsheet.loadAsync(blob, function (workbook) {
// user can access the loaded workbook instance in this callback.
var app = worksheet.application ;
...
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of load failure is ' + reason);
});mergeRange(cells?: CellRange, isCopyMergeCell?: boolean): void
Merges the selected CellRange into one cell.
The CellRange to merge.
This parameter indicates that merge operation is done by copy\paste merge cell or not.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onColumnChanged(e: RowColumnChangedEventArgs): void
Raises the columnChanged event.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowColumn(e: DraggingRowColumnEventArgs): void
Raises the draggingRowColumn event.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onDroppingRowColumn(e?: EventArgs): void
Raises the droppingRowColumn event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoaded(e?: EventArgs): void
Raises the loaded event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onPrepareChangingColumn(): void
Raises the prepareChangingColumn event.
onPrepareChangingRow(): void
Raises the prepareChangingRow event.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowChanged(e: RowColumnChangedEventArgs): void
Raises the rowChanged event.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectedSheetChanged(e: PropertyChangedEventArgs): void
Raises the currentSheetChanged event.
PropertyChangedEventArgs that contains the event data.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSheetCleared(e?: EventArgs): void
Raises the sheetCleared event.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUnknownFunction(e: UnknownFunctionEventArgs): void
Raises the unknownFunction event.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
redo(): void
Redo the last user action.
refresh(fullUpdate?: boolean): void
Overridden to refresh the sheet and the TabHolder.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
save(fileName?: string): Workbook
Saves FlexSheet to xlsx file. This method works with JSZip 2.5.
For example:
// This sample exports FlexSheet content to an xlsx file.
// click.
// HTML
<button
onclick="saveXlsx('FlexSheet.xlsx')">
Save
</button>
// JavaScript
function saveXlsx(fileName) {
// Save the flexGrid to xlsx file.
flexsheet.save(fileName);
}Name of the file that is generated.
saveAsync(fileName?: string, onSaved?: (base64?: string), onError?: (reason?: any)): void
Saves the FlexSheet to xlsx file asynchronously. This method works with JSZip 3.0.
Name of the file that is generated.
This callback provides an approach to get the base-64 string that represents the content of the saved FlexSheet. Since this method is an asynchronous method, user is not able to get the base-64 string immediately. User has to get the base-64 string through this callback. This has a single parameter, the base64 string of the saved flexsheet. It is passed to user.
This callback catches error information when saving. This has a single parameter, the failure reason. The return value is passed to user if he wants to catch the save failure reason.
For example:
flexsheet.saveAsync('', function (base64) {
// user can access the base64 string in this callback.
document.getElementByID('export').href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;' + 'base64,' + base64;
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of save failure is ' + reason);
});scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
FlexSheet overrides this method to adjust the selection cell range for the merged cells in the FlexSheet.
The cell range to select.
Indicates whether to scroll the new selection into view.
selectNextFunction(): void
Select next function in the function list.
selectPreviousFunction(): void
Select previous function in the function list.
setCellData(r: number, c: any, value: any, coerce?: boolean): boolean
Overrides the setCellData function of the base class.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Override the setClipString method of FlexGrid.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
showColumnFilter(): void
Show the filter editor.
showFunctionList(target: HTMLElement): void
Open the function list.
The DOM element that toggle the function list.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);undo(): void
Undo the last user action.
Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs when dragging the rows or the columns of the FlexSheet.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs when the FlexSheet meets the unknown formula.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
constructor(grid: FlexGrid, cellType: CellType, rows: RowCollection, cols: ColumnCollection, element: HTMLElement): FlexSheetPanel
Initializes a new instance of the FlexSheetPanel class.
The FlexGrid object that owns the panel.
The type of cell in the panel.
The rows displayed in the panel.
The columns displayed in the panel.
The HTMLElement that hosts the cells in the control.
Gets a CellRange that indicates the range of cells currently visible on the panel.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a cell's bounds in viewport coordinates.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same as those used by the getBoundingClientRect method.
The index of the row that contains the cell.
The index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: any, formatted: boolean): any
Gets the value stored in a cell in the panel.
The row index of the cell.
The index, name, or binding of the column that contains the cell.
Whether to format the value for display.
getCellElement(r: number, c: number): HTMLElement
Gets the element that represents a cell within this GridPanel.
If the cell is not currently in view, this method returns null.
The index of the row that contains the cell.
The index of the column that contains the cell.
getSelectedState(r: number, c: number, rng: CellRange): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Overrides this method to support multiple selection showSelectedHeaders for FlexSheet
Specifies Row index of the cell.
Specifies Column index of the cell.
CellRange that contains the cell that would be included.
setCellData(r: number, c: any, value: any, coerce?: boolean): boolean
Sets the content of a cell in the panel.
The index of the row that contains the cell.
The index, name, or binding of the column that contains the cell.
The value to store in the cell.
A value indicating whether to change the value automatically to match the column's data type.
Represents a row used to display column header information for a bound sheet.
constructor(): HeaderRow
Initializes a new instance of the HeaderRow class.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets or sets the item in the data collection that the item is bound to.
Gets or sets the height of the row. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets the render height of the row.
The value returned takes into account the row's visibility, default size, and min and max sizes.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets a value that indicates whether cells in the row or column wrap their content.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Provides arguments for rows or columns changed events.
constructor(index: number, count: number, added: boolean): RowColumnChangedEventArgs
Initializes a new instance of the UnknownFunctionEventArgs class.
The start index of the changed rows or columns.
The added or removed count of the rows or columns.
The value indicates the event is for adding ot removing rows or columns.
Gets the value indicates the event is for adding ot removing rows or columns.
Gets the added or removed count of the rows or columns.
Provides a value to use with events that do not have event data.
Gets the start index of the changed rows or columns.
Represents a sheet within the FlexSheet control.
constructor(owner?: FlexSheet, grid?: FlexGrid, sheetName?: string, rows?: number, cols?: number): Sheet
Initializes a new instance of the Sheet class.
The owner @see: FlexSheet control.
The associated FlexGrid control used to store the sheet data. If not specified then the new FlexGrid control will be created.
The name of the sheet within the FlexSheet control.
The row count for the sheet.
The column count for the sheet.
Gets or sets the number of columns in the sheet.
Gets or sets the array or ICollectionView for the FlexGrid instance of the sheet.
Gets or sets the name of the sheet.
Gets or sets the number of rows in the sheet.
Gets the names of tables render in this sheet.
Gets or sets the sheet visibility.
findTable(rowIndex: number, columnIndex: number): Table
Finds the table via the cell location.
the row index of the specified cell.
the column index of the specified cell.
getCellStyle(rowIndex: number, columnIndex: number): ICellStyle
Gets the style of specified cell.
the row index of the specified cell.
the column index of the specified cell.
onNameChanged(e: PropertyChangedEventArgs): void
Raises the nameChanged event.
onVisibleChanged(e: EventArgs): void
Raises the visibleChanged event.
Defines the collection of the Sheet objects.
constructor(data?: any[]): ObservableArray
Initializes a new instance of the ObservableArray class.
Array containing items used to populate the ObservableArray.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the index of the currently selected sheet.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
clear(): void
Clear the SheetCollection.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getValidSheetName(currentSheet: Sheet): string
Gets the valid name for the sheet.
hide(pos: number): boolean
Hides the sheet at the specified position.
The position of the sheet to hide.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array. Overrides the insert method of its base class ObservableArray.
Position where the item will be added.
Item to add to the array.
isValidSheetName(sheet: Sheet): boolean
Checks whether the sheet name is valid.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
onSelectedSheetChanged(e: PropertyChangedEventArgs): void
Raises the currentChanged event.
PropertyChangedEventArgs that contains the event data.
onSheetCleared(): void
Raises the sheetCleared event.
onSheetNameChanged(e: NotifyCollectionChangedEventArgs): void
Raises the sheetNameChanged event.
onSheetVisibleChanged(e: NotifyCollectionChangedEventArgs): void
Raises the sheetVisibleChanged event.
push(...item: any[]): number
Adds one or more items to the end of the array. Overrides the push method of its base class ObservableArray.
One or more items to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array. Overrides the removeAt method of its base class ObservableArray.
Position of the item to remove.
selectLast(): boolean
Selects the last sheet in the owner FlexSheet control.
selectNext(): boolean
Select the next sheet in the owner FlexSheet control.
selectPrevious(): boolean
Selects the previous sheet in the owner FlexSheet control.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
show(pos: number): boolean
Unhide and selects the Sheet at the specified position.
The position of the sheet to show.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array. Overrides the splice method of its base class ObservableArray.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Occurs when the selectedIndex property changes.
Occurs after the name of the sheet in the collection has changed.
Occurs after the visible of the sheet in the collection has changed.
constructor(owner: FlexSheet): SortManager
Initializes a new instance of the SortManager class.
Gets or sets the collection of the sort descriptions represented by the ColumnSortDescription objects.
addSortLevel(columnIndex?: number, ascending?: boolean): void
Adds a blank sorting level to the sort descriptions.
The index of the column in the FlexSheet control.
The sort order for the sort level.
cancelSort(): void
Cancel the current sort descriptions to the FlexSheet control.
checkSortItemExists(columnIndex): number
Check whether the sort item of specific column exists or not
The index of the column in the FlexSheet control.
commitSort(undoable?: boolean): void
Commits the current sort descriptions to the FlexSheet control.
The boolean value indicating whether the commit sort action is undoable.
copySortLevel(): void
Adds a copy of the current sorting level to the sort descriptions.
deleteSortLevel(columnIndex?: number): void
Removes the current sorting level from the sort descriptions.
The index of the column in the FlexSheet control.
editSortLevel(columnIndex?: number, ascending?: boolean): void
Updates the current sort level.
The column index for the sort level.
The sort order for the sort level.
moveSortLevel(offset: number): void
Moves the current sorting level to a new position.
The offset to move the current level by.
Represents a Table within the FlexSheet control.
constructor(owner: FlexSheet, name: string, range: CellRange, style?: TableStyle, columns?: TableColumn[], showHeaderRow?: boolean, showTotalRow?: boolean, showBandedColumns?: boolean, showBandedRows?: boolean, showFirstColumn?: boolean, showLastColumn?: boolean): Table
Initializes a new instance of the Table class.
The owner FlexSheet control.
The name of the table.
The range of the table.
The table style to use with the table. The default style is the 'TableStyleMedium9' built-in table style, if the style is omitted.
The columns of the table.
Indicates whether show the header row for the table. The default showHeaderRow is true, if the showHeaderRow is omitted.
Indicates whether show the total row for the table. The default showTotalRow is false, if the showTotalRow is omitted.
Indicating whether banded column formatting is applied. The default showBandedColumns is false, if the showBandedColumns is omitted.
Indicating whether banded row formatting is applied. The default showBandedRows is true, if the showBandedRows is omitted.
Indicating whether the first column in the table should have the style applied. The default showFirstColumn is false, if the showFirstColumn is omitted.
Indicating whether the last column in the table should have the style applied. The default showLastColumn is false, if the showLastColumn is omitted.
Gets or sets the name of the table. It is used to reference the table programmatically.
Gets the range on the relevant sheet that the table occupies. The reference shall include the totals row if it is shown.
Indicating whether banded column formatting is applied.
Indicating whether banded row formatting is applied.
Indicating whether the first column in the table should have the style applied.
Indicates whether show the header row for the table.
Indicating whether the last column in the table should have the style applied.
Indicates whether show the total row for the table.
Represents a Table column within the Table.
constructor(name: string, totalRowLabel?: string, totalRowFunction?: string, showFilterButton?: boolean): TableColumn
Initializes a new instance of the TableColumn class.
The name of the table column.
The string to show in the totals row cell for the column.
The function to show in the totals row cell for this column.
Indicating whether show the filter button for the table column. The default value of showFilterButton is true.
Gets the name of the table column. It is referenced through functions.
Indicating whether show the filter button for the table column.
The function to show in the totals row cell for the column.
The string to show in the totals row cell for the column.
Represents a Table style for the Table.
constructor(name: string, isBuiltIn?: boolean): TableStyle
Initializes a new instance of the TableStyle class.
The name of the table style.
Indicates whether the table style is built-in style.
Indicates whether the table style is built-in style.
Gets or sets the name of the table style.
Controls undo and redo operations in the FlexSheet.
constructor(owner: FlexSheet): UndoStack
Initializes a new instance of the UndoStack class.
Checks whether a redo action can be performed.
Checks whether an undo action can be performed.
clear(): void
Clears the undo stack.
redo(): void
Redo the last undone action.
undo(): void
Undo the last action.
Provides arguments for unknown function events.
constructor(funcName: string, params: any[]): UnknownFunctionEventArgs
Initializes a new instance of the UnknownFunctionEventArgs class.
The name of the unknown function.
The parameters' value list of the nuknown function.
Provides a value to use with events that do not have event data.
Gets the name of the unknown function.
Gets the parameters' value list of the nuknown function.
Gets or sets the result for the unknown funtion.
Defines the table stripe styling properties.
Number of rows or columns in a single band of striping.
Defines the cell styling properties.
The background color.
Color of the Bottom border.
Style of the Bottom border.
Width of the Bottom border.
Color of the Left border.
Style of the Left border.
Width of the Left border.
Color of the Right border.
Style of the Right border.
Width of the Right border.
Color of the Top border.
Style of the Top border.
Width of the Top border.
The CSS class name to add to a cell.
The font color.
The font family.
The font size.
The font style.
The font weight.
Format string for formatting the value of the cell.
The text alignment.
The text decoration.
The vertical alignment.
Describes how whitespace inside the element is handled.
Defines the format states for the cells.
Indicates whether the bold style is applied.
Indicates whether the italic style is applied.
Indicate whether the current selection is a merged cell.
Indicates whether the underlined style is applied.
Gets the applied text alignment.
Defines the table options for creating table.
Indicating whether banded column formatting is applied.
Indicating whether banded row formatting is applied.
Indicating whether the first column in the table should have the style applied.
Indicates whether show the header row for the table.
Indicating whether the last column in the table should have the style applied.
Indicates whether show the total row for the table.
Defines the table styling properties.
Color of the Horizontal border.
Style of the Horizontal border.
Width of the Horizontal border.
Color of the Vertical border.
Style of the Vertical border.
Width of the Vertical border.
Defines the FinancialChart control and its associated classes.
Financial charting control.
constructor(element: any, options?): FinancialChart
Initializes a new instance of the FlexChart class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets the ICollectionView object that contains the chart data.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Gets or sets various chart options.
The following options are supported:
kagi.fields: Specifies the DataFields used for the Kagi chart. The default value is DataFields.Close.
kagi.rangeMode: Specifies the RangeMode for the Kagi chart. The default value is RangeMode.Fixed.
kagi.reversalAmount: Specifies the reversal amount for the Kagi chart. The default value is 14.
chart.options = {
kagi: {
fields: wijmo.chart.finance.DataFields.Close,
rangeMode: wijmo.chart.finance.RangeMode.Fixed,
reversalAmount: 14
}
}
lineBreak.newLineBreaks: Gets or sets the number of previous boxes that must be compared before a new box is drawn in Line Break charts. The default value is 3.
chart.options = {
lineBreak: { newLineBreaks: 3 }
}
renko.fields: Specifies the DataFields used for the Renko chart. The default value is DataFields.Close.
renko.rangeMode: Specifies the RangeMode for the Renko chart. The default value is RangeMode.Fixed.
renko.boxSize: Specifies the box size for the Renko chart. The default value is 14.
chart.options = {
renko: {
fields: wijmo.chart.finance.DataFields.Close,
rangeMode: wijmo.chart.finance.RangeMode.Fixed,
boxSize: 14
}
}Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
Represents a series of data points to display in the chart.
The Series class supports all basic chart types. You may define a different chart type on each Series object that you add to the FlexChart series collection. This overrides the chartType property set on the chart that is the default for all Series objects in its collection.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart. Please note that ColumnVolume, EquiVolume, CandleVolume and ArmsCandleVolume chart types are not supported and should be set on the FinancialChart.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Specifies which fields are to be used for calculation. Applies to Renko and Kagi chart types.
| Name | Value | Description |
|---|---|---|
| Close | 0 | Close values are used for calculations. |
| High | 1 | High values are used for calculations. |
| Low | 2 | Low values are used for calculations. |
| Open | 3 | Open values are used for calculations. |
| HighLow | 4 | High-Low method is used for calculations. DataFields.HighLow is currently not supported with Renko chart types. |
| HL2 | 5 | Average of high and low values is used for calculations. |
| HLC3 | 6 | Average of high, low, and close values is used for calculations. |
| HLOC4 | 7 | Average of high, low, open, and close values is used for calculations. |
Specifies the type of financial chart.
| Name | Value | Description |
|---|---|---|
| Column | 0 | Shows vertical bars and allows you to compare values of items across categories. |
| Scatter | 1 | Uses X and Y coordinates to show patterns within the data. |
| Line | 2 | Shows trends over a period of time or across categories. |
| LineSymbols | 3 | Shows line chart with a symbol on each data point. |
| Area | 4 | Shows line chart with area below the line filled with color. |
| Candlestick | 5 | Presents items with high, low, open, and close values. The size of the wick line is determined by the High and Low values, while the size of the bar is determined by the Open and Close values. The bar is displayed using different colors, depending on whether the close value is higher or lower than the open value. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| HighLowOpenClose | 6 | Displays the same information as a candlestick chart, except that opening values are displayed using lines to the left, while lines to the right indicate closing values. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| HeikinAshi | 7 | Derived from the candlestick chart and uses information from the current and prior period in order to filter out the noise. These charts cannot be combined with any other series objects. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| LineBreak | 8 | Filters out noise by focusing exclusively on price changes. These charts cannot be combined with any other series objects. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| Renko | 9 | Ignores time and focuses on price changes that meet a specified amount. These charts cannot be combined with any other series objects. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| Kagi | 10 | Ignores time and focuses on price action. These charts cannot be combined with any other series objects. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty". |
| ColumnVolume | 11 | Identical to the standard Column chart, except that the width of each bar is determined by the Volume value. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "yProperty, volumeProperty". This chart type can only be used at the FinancialChart level, and should not be applied on FinancialSeries objects. Only one set of volume data is currently supported per FinancialChart. |
| EquiVolume | 12 | Similar to the Candlestick chart, but shows the high and low values only. In addition, the width of each bar is determined by Volume value. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty, volumeProperty". This chart type can only be used at the FinancialChart level, and should not be applied on FinancialSeries objects. Only one set of volume data is currently supported per FinancialChart. |
| CandleVolume | 13 | Identical to the standard Candlestick chart, except that the width of each bar is determined by Volume value. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty, volumeProperty". This chart type can only be used at the FinancialChart level, and should not be applied on FinancialSeries objects. Only one set of volume data is currently supported per FinancialChart. |
| ArmsCandleVolume | 14 | Created by Richard Arms, this chart is a combination of EquiVolume and CandleVolume chart types. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, openProperty, closeProperty, volumeProperty". This chart type can only be used at the FinancialChart level, and should not be applied on FinancialSeries objects. Only one set of volume data is currently supported per FinancialChart. |
| PointAndFigure | 15 | Point and figure financial chart. The data for this chart type can be defined using the FinancialChart or FinancialSeries binding property as a comma separated value in the following format: "highProperty, lowProperty, closeProperty". This chart type can only be used at the FinancialChart level, and should not be applied on FinancialSeries objects. |
Specifies the scaling mode for point and figure chart.
| Name | Value | Description |
|---|---|---|
| Traditional | 0 | Traditional scaling. The box size is calculated automatically based on price range. |
| Fixed | 1 | Fixed scaling. The box size is defined by boxSize property. |
| Dynamic | 2 | Dynamic(ATR) scaling. The box size is calculated based on ATR. |
Specifies the unit for Kagi and Renko chart types.
| Name | Value | Description |
|---|---|---|
| Fixed | 0 | Uses a fixed, positive number for the Kagi chart's reversal amount or Renko chart's box size. |
| ATR | 1 | Uses the current Average True Range value for Kagi chart's reversal amount or Renko chart's box size. When ATR is used, the reversal amount or box size option of these charts must be an integer and will be used as the period for the ATR calculation. |
| Percentage | 2 | Uses a percentage for the Kagi chart's reversal amount. RangeMode.Percentage is currently not supported with Renko chart types. |
Analytics extensions for FinancialChart.
Represents an Average True Range indicator series for the FinancialChart.
Average true range is used to measure the volatility of an asset. Average true range does not provide any indication of the price's trend, but rather the degree of price volatility.
constructor(options?: any): ATR
Initializes a new instance of the ATR class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Bollinger Bands® overlay series for the FinancialChart.
Bollinger Bands is a registered trademark of John Bollinger.
constructor(options?: any): BollingerBands
Initializes a new instance of the BollingerBands class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the standard deviation multiplier.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Commodity Channel Index indicator series for the FinancialChart.
The commodity channel index is an oscillator that measures an asset's current price level relative to an average price level over a specified period of time.
constructor(options?: any): CCI
Initializes a new instance of the CCI class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the constant value for the CCI calculation. The default value is 0.015.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Moving Average Envelopes overlay series for the FinancialChart.
Moving average envelopes are moving averages set above and below a standard moving average. The amount above/below the standard moving average is percentage based and dictated by the size property.
constructor(options?: any): Envelopes
Initializes a new instance of the Envelopes class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or set the size of the moving average envelopes. The default value is 2.5 percent (0.025).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the moving average type for the envelopes. The default value is Simple.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Fibonacci Retracements tool for the FinancialChart. The tool enables the calculation and plotting of various alert levels that are useful in financial charts.
To add Fibonacci tool to a FinancialChart control, create an instance of the Fibonacci and add it to the series collection of the chart. For example:
// create chart
var chart = new wijmo.chart.finance.FinancialChart('#chartElement');
// create Fibonacci tool
var ftool = new wijmo.chart.finance.analytics.Fibonacci();
chart.series.push(ftool);constructor(options?: any): Fibonacci
Initializes a new instance of the Fibonacci class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the high value of Fibonacci tool.
If not specified, the high value is caclulated based on data values provided by the itemsSource.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the array of levels for plotting.
Default value is [0, 23.6, 38.2, 50, 61.8, 100].
Gets or sets the low value of Fibonacci tool.
If not specified, the low value is calculated based on data values provided by itemsSource.
Gets or sets the x maximum value of the Fibonacci tool.
If not specified, current maximum of x-axis is used. The value can be specified as a number or Date object.
Gets or sets the x minimal value of the Fibonacci tool.
If not specified, current minimum of x-axis is used. The value can be specified as a number or Date object.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets a value indicating whether to create uptrending Fibonacci tool.
Default value is true(uptrend). If the value is false, the downtrending levels are plotted.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Fibonacci Arcs tool for the FinancialChart.
constructor(options?: any): FibonacciArcs
Initializes a new instance of the FibonacciArcs class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending DataPoint for the base line.
The DataPoint x value can be a number or a Date object (for time-based data).
Unlike some of the other Fibonacci tools, the ending DataPoint is not calculated automatically if undefined.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the array of levels for plotting.
Default value is [38.2, 50, 61.8].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the starting DataPoint for the base line.
The DataPoint x value can be a number or a Date object (for time-based data).
Unlike some of the other Fibonacci tools, the starting DataPoint is not calculated automatically if undefined.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Fibonacci Fans tool for the FinancialChart.
constructor(options?: any): FibonacciFans
Initializes a new instance of the FibonacciFans class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending DataPoint for the base line.
If not set, the starting DataPoint is calculated automatically. The DataPoint x value can be a number or a Date object (for time-based data).
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the array of levels for plotting.
Default value is [0, 23.6, 38.2, 50, 61.8, 100].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the starting DataPoint for the base line.
If not set, the starting DataPoint is calculated automatically. The DataPoint x value can be a number or a Date object (for time-based data).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Fibonacci Time Zones tool for the FinancialChart.
constructor(options?: any): FibonacciTimeZones
Initializes a new instance of the FibonacciTimeZones class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending X data point for the time zones.
If not set, the ending X data point is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the LabelPosition for levels in FibonacciTimeZones tool.
Gets or sets the array of levels for plotting.
Default value is [0, 1, 2, 3, 5, 8, 13, 21, 34].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the starting X data point for the time zones.
If not set, the starting X data point is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Moving Average Convergence/Divergence (MACD) indicator series for the FinancialChart.
The MACD indicator is designed to reveal changes in strength, direction, momentum, and duration of an asset's price trend.
constructor(options?: any): Macd
Initializes a new instance of the Macd class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the fast exponential moving average period for the MACD line.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the slow exponential moving average period for the MACD line.
Gets or sets the exponential moving average period for the signal line.
Gets or sets the styles for the MACD and Signal lines.
The following options are supported:
series.styles = {
macdLine: {
stroke: 'red',
strokeWidth: 1
},
signalLine: {
stroke: 'green',
strokeWidth: 1
},
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Base class for Macd and MacdHistogram series (abstract).
constructor(options?: any): MacdBase
Initializes a new instance of the MacdBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the fast exponential moving average period for the MACD line.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the slow exponential moving average period for the MACD line.
Gets or sets the exponential moving average period for the signal line.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Moving Average Convergence/Divergence (MACD) Histogram indicator series for the FinancialChart.
The MACD indicator is designed to reveal changes in strength, direction, momentum, and duration of an asset's price trend.
constructor(options?: any): MacdHistogram
Initializes a new instance of the MacdHistogram class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the fast exponential moving average period for the MACD line.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the slow exponential moving average period for the MACD line.
Gets or sets the exponential moving average period for the signal line.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Base class for overlay and indicator series (abstract).
constructor(options?: any): OverlayIndicatorBase
Initializes a new instance of the OverlayIndicatorBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Relative Strength Index indicator series for the FinancialChart.
Relative strength index is a momentum oscillator designed to measure the current and historical strength or weakness of an asset based on the closing prices of a recent trading period.
constructor(options?: any): RSI
Initializes a new instance of the RSI class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Base class for overlay and indicator series that render a single series (abstract).
constructor(options?: any): SingleOverlayIndicatorBase
Initializes a new instance of the SingleOverlayIndicatorBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Stochastic Oscillator indicator series for the FinancialChart.
Stochastic oscillators are momentum indicators designed to predict price turning points by comparing an asset's closing price to its high-low range.
The Stochastic series can be used for fast (default), slow and full stochastic oscillators. To create a slow or full stochastic oscillator, set the smoothingPeriod to an integer value greater than one; slow stochastic oscillators generally use a fixed smoothingPeriod of three. To create or revert to a fast stochastic oscillator, set the smoothingPeriod to an integer value of one.
constructor(options?: any): Stochastic
Initializes a new instance of the Stochastic class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the period for the %D simple moving average.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the period for the %K calculation.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the smoothing period for full %K.
Gets or sets the styles for the %K and %D lines.
The following options are supported:
series.styles = {
kLine: {
stroke: 'red',
strokeWidth: 1
},
dLine: {
stroke: 'green',
strokeWidth: 1
},
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Represents a Willaims %R indicator series for the FinancialChart.
Williams %R is a momentum indicator that is the inverse of a fast stochastic oscillator (Stochastic). The Williams %R indicator is designed to tell whether an asset is trading near the high or low of its trading range.
constructor(options?: any): WilliamsR
Initializes a new instance of the WilliamsR class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Contains components that provide OLAP functionality such as pivot tables and charts.
The PivotEngine class is responsible for summarizing raw data into pivot views.
The PivotPanel control provides a UI for editing the pivot views by dragging fields into view lists and editing their properties.
The PivotGrid control extends the FlexGrid to display pivot tables with collapsible row and column groups.
The PivotChart control provides visual representations of pivot tables with hierarchical axes.
Extends the PivotField class to represent a field in a server-based cube data source.
constructor(engine: PivotEngine, binding: string, header?: string, options?: any): CubePivotField
Initializes a new instance of the PivotField class.
PivotEngine that owns this field.
Property that this field is bound to.
Header shown to identify this field (defaults to the binding).
JavaScript object containing initialization data for the field.
Gets or sets the name of the property the field is bound to.
Gets the ICollectionView bound to this field.
Gets or sets a value that determines whether keys should be sorted in descending order for this field.
Gets a reference to the PivotEngine that owns this PivotField.
Gets a reference to the PivotFilter used to filter values for this field.
Gets or sets the format to use when displaying field values.
Gets or sets a string used to represent this field in the user interface.
Gets or sets a value that determines whether this field is currently being used in the view.
Setting this property to true causes the field to be added to the view's rowFields or valueFields, depending on the field's data type.
Gets or sets a value indicating whether items in this field contain HTML content rather than plain text.
Gets the key for this CubePivotField.
For this type of field, the key is the field's binding.
Gets this field's parent field.
When you drag the same field into the Values list multiple times, copies of the field are created so you can use the same binding with different parameters. The copies keep a reference to their parent fields.
Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
The example below shows a typical use for the sortComparer property:
// define list of products
app.products = 'Wijmo,Aoba,Olap,Xuni'.split(',');
// sort products by position in the 'app.products' array
ng.viewDefinitionChanged.addHandler(function () {
var fld = ng.fields.getField('Product');
if (fld) {
fld.sortComparer = function (val1, val2) {
return app.products.indexOf(val1) - app.products.indexOf(val2);
}
}
});Gets or sets the PivotField used as a weight for calculating aggregates on this field.
If this property is set to null, all values are assumed to have weight one.
This property allows you to calculate weighted averages and totals. For example, if the data contains a 'Quantity' field and a 'Price' field, you could use the 'Price' field as a value field and the 'Quantity' field as a weight. The output would contain a weighted average of the data.
Gets or sets the preferred width to be used for showing this field in the user interface.
Gets or sets a value that indicates whether the content of this field should be allowed to wrap within cells.
onPropertyChanged(e: PropertyChangedEventArgs): void
Raises the propertyChanged event.
PropertyChangedEventArgs that contains the property name, old, and new values.
Occurs when the value of a property in this Range changes.
Represents a dialog used to display details for a grid cell.
constructor(element: any, options?): DetailDialog
Initializes a new instance of the DetailDialog class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate PivotFieldEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Provides visual representations of wijmo.olap pivot tables.
To use the control, set its itemsSource property to an instance of a PivotPanel control or to a PivotEngine.
constructor(element: any, options?): PivotChart
Initializes a new instance of the PivotChart class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the PivotEngine or PivotPanel that provides data for this PivotChart.
Gets or sets a value that determines whether and where the legend appears in relation to the plot area.
Gets or sets the maximum number of points to be shown in each series.
Gets or sets the maximum number of data series to be shown in the chart.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that determines whether the chart should group axis annotations for grouped data.
Gets or sets a value that determines whether the chart should include a legend.
Gets or sets a value that determines whether the chart should include a title.
Gets or sets a value that determines whether the chart should include only totals.
Gets or sets a value that determines whether and how the series objects are stacked.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Extends the CollectionView class to preserve the position of subtotal rows when sorting.
constructor(engine: PivotEngine): PivotCollectionView
Initializes a new instance of the PivotCollectionView class.
PivotEngine that owns this collection.
Gets a value that indicates whether a new item can be added to the collection.
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.
Gets a value that indicates whether the pageIndex value can change.
Gets a value that indicates whether this view supports filtering via the filter property.
Gets a value that indicates whether this view supports grouping via the groupDescriptions property.
Gets a value that indicates whether items can be removed from the collection.
Gets a value that indicates whether this view supports sorting via the sortDescriptions property.
Gets the item that is being added during the current add transaction.
Gets the item that is being edited during the current edit transaction.
Gets the ordinal position of the current item in the view.
Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
The callback function should return true if the item passed in as a parameter should be included in the view.
NOTE: If the filter function needs a scope (i.e. a meaningful 'this' value) remember to set the filter using the 'bind' function to specify the 'this' object. For example:
collectionView.filter = this._filter.bind(this);
Gets or sets a callback that determines whether a specific property of an item contains validation errors.
If provided, the callback should take two parameters containing the item and the property to validate, and should return a string describing the error (or null if there are no errors).
For example:
var view = new wijmo.collections.CollectionView(data, {
getError: function (item, property) {
switch (property) {
case 'country':
return countries.indexOf(item.country) < 0
? 'Invalid Country'
: null;
case 'downloads':
case 'sales':
case 'expenses':
return item[property] < 0
? 'Cannot be negative!'
: null;
case 'active':
return item.active && item.country.match(/US|UK/)
? 'No active items allowed in the US or UK!'
: null;
}
return null;
}
});Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Gets an array of CollectionViewGroup objects that represents the top-level groups.
Gets a value that indicates whether an add transaction is in progress.
Gets a value that indicates whether an edit transaction is in progress.
Gets a value that indicates whether this view contains no items.
Gets a value that indicates whether the page index is changing.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets the total number of items in the view taking paging into account.
Gets an ObservableArray containing the records that were added to the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were edited in the collection since trackChanges was enabled.
Gets an ObservableArray containing the records that were removed from the collection since trackChanges was enabled.
Gets or sets a function that creates new items for the collection.
If the creator function is not supplied, the CollectionView will try to create an uninitialized item of the appropriate type.
If the creator function is supplied, it should be a function that takes no parameters and returns an initialized object of the proper type for the collection.
Gets or sets the number of items to display on a page.
Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
For example, see Dave Koele's Alphanum algorithm. It breaks up strings into chunks composed of strings or numbers, then sorts number chunks in value order and string chunks in ASCII order. Dave calls the result a "natural sorting order".
The example below shows a typical use for the sortComparer property:
// create a CollectionView with a custom sort comparer
var dataCustomSort = new wijmo.collections.CollectionView(data, {
sortComparer: function (a, b) {
return wijmo.isString(a) && wijmo.isString(b)
? alphanum(a, b) // custom comparer used for strings
: null; // use default comparer used for everything else
}
});Gets or sets a function used to convert values when sorting.
If provided, the function should take as parameters a SortDescription, a data item, and a value to convert, and should return the converted value.
This property provides a way to customize sorting. For example, the FlexGrid control uses it to sort mapped columns by display value instead of by raw value.
For example, the code below causes a CollectionView to sort the 'country' property, which contains country code integers, using the corresponding country names:
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(',');
collectionView.sortConverter = function (sd, item, value) {
if (sd.property == 'countryMapped') {
value = countries[value]; // convert country id into name
}
return value;
}Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Gets or sets the underlying (unfiltered and unsorted) collection.
Gets the total number of items in the view before paging is applied.
Gets or sets a value that determines whether the control should track changes to the data.
If trackChanges is set to true, the CollectionView keeps track of changes to the data and exposes them through the itemsAdded, itemsRemoved, and itemsEdited collections.
Tracking changes is useful in situations where you need to update the server after the user has confirmed that the modifications are valid.
After committing or cancelling changes, use the clearChanges method to clear the itemsAdded, itemsRemoved, and itemsEdited collections.
The CollectionView only tracks changes made when the proper CollectionView methods are used (editItem/commitEdit, addNew/commitNew, and remove). Changes made directly to the data are not tracked.
Gets or sets whether to use a stable sort algorithm.
Stable sorting algorithms maintain the relative order of records with equal keys. For example, consider a collection of objects with an "Amount" field. If you sort the collection by "Amount", a stable sort will keep the original order of records with the same Amount value.
This property is false by default, which causes the CollectionView to use JavaScript's built-in sort method, which is very fast but not stable. Setting the useStableSort property to true increases sort times by 30% to 50%, which can be significant for large collections.
addNew(): any
Creates a new item and adds it to the collection.
This method takes no parameters. It creates a new item, adds it to the collection, and defers refresh operations until the new item is committed using the commitNew method or canceled using the cancelNew method.
The code below shows how the addNew method is typically used:
// create the new item, add it to the collection var newItem = view.addNew(); // initialize the new item newItem.id = getFreshId(); newItem.name = 'New Customer'; // commit the new item so the view can be refreshed view.commitNew();
You can also add new items by pushing them into the sourceCollection and then calling the refresh method. The main advantage of addNew is in user-interactive scenarios (like adding new items in a data grid), because it gives users the ability to cancel the add operation. It also prevents the new item from being sorted or filtered out of view until the add operation is committed.
beginUpdate(): void
Suspend refreshes until the next call to endUpdate.
cancelEdit(): void
Ends the current edit transaction and, if possible, restores the original value to the item.
cancelNew(): void
Ends the current add transaction and discards the pending new item.
clearChanges(): void
Clears all changes by removing all items in the itemsAdded, itemsRemoved, and itemsEdited collections.
Call this method after committing changes to the server or after refreshing the data from the server.
commitEdit(): void
Ends the current edit transaction and saves the pending changes.
commitNew(): void
Ends the current add transaction and saves the pending new item.
contains(item: any): boolean
Returns a value indicating whether a given item belongs to this view.
Item to seek.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
editItem(item: any): void
Begins an edit transaction of the specified item.
Item to be edited.
endUpdate(): void
Resume refreshes suspended by a call to beginUpdate.
getAggregate(aggType: Aggregate, binding: string, currentPage?: boolean): void
Calculates an aggregate value for the items in this collection.
Type of aggregate to calculate.
Property to aggregate on.
Whether to include only items on the current page.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
moveCurrentTo(item: any): boolean
Sets the specified item to be the current item in the view.
Item that will become current.
moveCurrentToFirst(): boolean
Sets the first item in the view as the current item.
moveCurrentToLast(): boolean
Sets the last item in the view as the current item.
moveCurrentToNext(): boolean
Sets the item after the current item in the view as the current item.
moveCurrentToPosition(index: number): boolean
Sets the item at the specified index in the view as the current item.
Index of the item that will become current.
moveCurrentToPrevious(): boolean
Sets the item before the current item in the view as the current item.
moveToFirstPage(): boolean
Sets the first page as the current page.
moveToLastPage(): boolean
Sets the last page as the current page.
moveToNextPage(): boolean
Moves to the page after the current page.
moveToPage(index: number): boolean
Moves to the page at the specified index.
Index of the page to move to.
moveToPreviousPage(): boolean
Moves to the page before the current page.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
onCurrentChanged(e?: EventArgs): void
Raises the currentChanged event.
onCurrentChanging(e: CancelEventArgs): boolean
Raises the currentChanging event.
CancelEventArgs that contains the event data.
onPageChanged(e?: EventArgs): void
Raises the pageChanged event.
onPageChanging(e: PageChangingEventArgs): boolean
Raises the pageChanging event.
PageChangingEventArgs that contains the event data.
onSourceCollectionChanged(e?: EventArgs): void
Raises the sourceCollectionChanged event.
onSourceCollectionChanging(e: CancelEventArgs): boolean
Raises the sourceCollectionChanging event.
CancelEventArgs that contains the event data.
refresh(): void
Re-creates the view using the current sort, filter, and group parameters.
remove(item: any): void
Removes the specified item from the collection.
Item to be removed from the collection.
removeAt(index: number): void
Removes the item at the specified index from the collection.
Index of the item to be removed from the collection. The index is relative to the view, not to the source collection.
Occurs when the collection changes.
Occurs after the current item changes.
Occurs before the current item changes.
Occurs before the page index changes.
Occurs after the value of the sourceCollection property changes.
Occurs before the value of the sourceCollection property changes.
Provides a user interface for interactively transforming regular data tables into Olap pivot tables.
Tabulates data in the itemsSource collection according to lists of fields and creates the pivotView collection containing the aggregated data.
Pivot tables group data into one or more dimensions. The dimensions are represented by rows and columns on a grid, and the data is stored in the grid cells.
constructor(options?: any): PivotEngine
Initializes a new instance of the PivotEngine class.
JavaScript object containing initialization data for the field.
Gets or sets a value that determines whether users should be allowed to edit the properties of the PivotField objects owned by this PivotEngine.
Gets or sets a value that determines whether view updates should be generated asynchronously.
This property is set to true by default, so summaries over large data sets are performed asynchronously to prevent stopping the UI thread.
Gets or sets a value that determines whether the engine should generate fields automatically based on the itemsSource.
Gets the list of PivotField objects that define the fields shown as columns in the output table.
Gets the list of PivotField objects exposed by the data source.
This list is created automatically whenever the itemsSource property is set.
Pivot views are defined by copying fields from this list to the lists that define the view: valueFields, rowFields, columnFields, and filterFields.
For example, the code below assigns a data source to the PivotEngine and then defines a view by adding fields to the rowFields, columnFields, and valueFields lists.
// create pivot engine
var pe = new wijmo.olap.PivotEngine();
// set data source (populates fields list)
pe.itemsSource = this.getRawData();
// prevent updates while building Olap view
pe.beginUpdate();
// show countries in rows
pe.rowFields.push('Country');
// show categories and products in columns
pe.columnFields.push('Category');
pe.columnFields.push('Product');
// show total sales in cells
pe.valueFields.push('Sales');
// done defining the view
pe.endUpdate();Gets the list of PivotField objects that define the fields used as filters.
Fields on this list do not appear in the output table, but are still used for filtering the input data.
Gets a value that indicates whether the engine is currently being updated.
Gets a value that determines whether a pivot view is currently defined.
A pivot view is defined if the valueFields list is not empty and either the rowFields or columnFields lists are not empty.
Gets or sets the array or ICollectionView that contains the data to be analyzed, or a string containing the URL for a ComponentOne DataEngine service.
ComponentOne DataEngine services allow you to analyze large datasets on a server without downloading the raw data to the client. You can use our high-performance FlexPivot services or interface with Microsoft's SQL Server Analysis Services OLAP Cubes.
The PivotEngine sends view definitions to the server, where summaries are calculated and returned to the client.
For more information about the ComponentOne DataEngine services please refer to the online documentation.
Gets the list of PivotField objects that define the fields shown as rows in the output table.
Gets or sets the maximum number of records the getDetail method should retrieve from the server.
The default value for this property is 1000, which provides a reasonable amount of detail in many scenarios. If you want to allow more detail records to be retrieved, increase the value of this property.
Gets or sets the amount of time, in milliseconds, that the engine should wait before polling the server for progress status while retrieving results.
The default value for this property is 500, which causes the engine to poll the server for a status update every half second.
Gets or sets the maximum amount of time, in milliseconds, that the engine should wait for the results to come back from the server.
The default value for this property is 60000, equivalent to sixty seconds. If you expect server operations to take longer than that to complete, set the property to a higher value.
Gets or sets a value that determines whether the output pivotView should include columns containing subtotals or grand totals.
Gets or sets a value that determines whether the output pivotView should include rows containing subtotals or grand totals.
Gets or sets a value that determines whether the Olap output table should use zeros to indicate the missing values.
Gets or sets a value that determines whether row and column totals should be displayed before or after regular data rows and columns.
If this value is set to true, total rows appear above data rows and total columns appear on the left of regular data columns.
Gets the list of PivotField objects that define the fields summarized in the output table.
Gets or sets the current pivot view definition as a JSON string.
This property is typically used to persist the current view as an application setting.
For example, the code below implements two functions that save and load view definitions using local storage:
// save/load views
function saveView() {
localStorage.viewDefinition = pivotEngine.viewDefinition;
}
function loadView() {
pivotEngine.viewDefinition = localStorage.viewDefinition;
}beginUpdate(): void
Suspends the refresh processes until next call to the endUpdate.
cancelPendingUpdates(): void
Cancels any pending asynchronous view updates.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
editField(field: PivotField): void
Shows a settings dialog where users can edit a field's settings.
PivotField to be edited.
endUpdate(): void
Resumes refresh processes suspended by calls to beginUpdate.
getDetail(item: any, binding: string): any[]
Gets an array containing the records summarized by a property in the pivotView list.
If the engine is connected to a PivotEngine server, the value returned is an ObservableArray that is populated asynchronously.
Data item in the pivotView list.
Name of the property being summarized.
getDetailView(item: any, binding: string): ICollectionView
Gets an ICollectionView containing the records summarized by a property in the pivotView list.
Data item in the pivotView list.
Name of the property being summarized.
getKeys(item: any, binding: string): any
Gets an object with information about a property in the pivotView list.
The object returned has two properties, 'rowKey' and 'colKey'. Each of these contains two arrays, 'fields' and 'values'. Together, this information uniquely identifies a value summarized by the PivotEngine.
For example, calling getKeys against a pivot view with two row fields 'Product' and 'Country', and a single column field 'Active' would return an object such as this one:
{
rowKey: {
fields: [ 'Product', 'Country'],
values: [ 'Aoba', 'Japan' ]
},
colKey: {
fields: [ 'Active' ],
values: [ true ]
}
}
The object identifies the subset of data used to obtain one summary value. In this case, this value represents all data items for product 'Aoba' sold in Japan with Active state set to true.
Data item in the pivotView list.
Name of the property being summarized.
invalidate(): void
Invalidates the view causing an asynchronous refresh.
onError(e: RequestErrorEventArgs): boolean
Raises the error event.
RequestErrorEventArgs that contains information about the error.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingView(e: ProgressEventArgs): void
Raises the updatingView event.
ProgressEventArgs that provides the event data.
onViewDefinitionChanged(e?: EventArgs): void
Raises the viewDefinitionChanged event.
refresh(force?: boolean): void
Summarizes the data and updates the output pivotView.
Refresh even while updating (see beginUpdate).
removeField(field: PivotField): void
Removes a field from the current view.
PivotField to be removed.
Represents a property of the items in the wijmo.olap data source.
constructor(engine: PivotEngine, binding: string, header?: string, options?: any): PivotField
Initializes a new instance of the PivotField class.
PivotEngine that owns this field.
Property that this field is bound to.
Header shown to identify this field (defaults to the binding).
JavaScript object containing initialization data for the field.
Gets or sets the name of the property the field is bound to.
Gets or sets a value that determines whether keys should be sorted in descending order for this field.
Gets or sets the format to use when displaying field values.
Gets or sets a string used to represent this field in the user interface.
Gets or sets a value that determines whether this field is currently being used in the view.
Setting this property to true causes the field to be added to the view's rowFields or valueFields, depending on the field's data type.
Gets or sets a value indicating whether items in this field contain HTML content rather than plain text.
Gets the key for this PivotField.
For regular fields, the key is the field's header; for CubePivotField instances, the key is the field's binding.
Gets this field's parent field.
When you drag the same field into the Values list multiple times, copies of the field are created so you can use the same binding with different parameters. The copies keep a reference to their parent fields.
Gets or sets a function used to compare values when sorting.
If provided, the sort comparer function should take as parameters two values of any type, and should return -1, 0, or +1 to indicate whether the first value is smaller than, equal to, or greater than the second. If the sort comparer returns null, the standard built-in comparer is used.
This sortComparer property allows you to use custom comparison algorithms that in some cases result in sorting sequences that are more consistent with user's expectations than plain string comparisons.
The example below shows a typical use for the sortComparer property:
// define list of products
app.products = 'Wijmo,Aoba,Olap,Xuni'.split(',');
// sort products by position in the 'app.products' array
ng.viewDefinitionChanged.addHandler(function () {
var fld = ng.fields.getField('Product');
if (fld) {
fld.sortComparer = function (val1, val2) {
return app.products.indexOf(val1) - app.products.indexOf(val2);
}
}
});Gets or sets the PivotField used as a weight for calculating aggregates on this field.
If this property is set to null, all values are assumed to have weight one.
This property allows you to calculate weighted averages and totals. For example, if the data contains a 'Quantity' field and a 'Price' field, you could use the 'Price' field as a value field and the 'Quantity' field as a weight. The output would contain a weighted average of the data.
Gets or sets the preferred width to be used for showing this field in the user interface.
Gets or sets a value that indicates whether the content of this field should be allowed to wrap within cells.
onPropertyChanged(e: PropertyChangedEventArgs): void
Raises the propertyChanged event.
PropertyChangedEventArgs that contains the property name, old, and new values.
Occurs when the value of a property in this Range changes.
Represents a collection of PivotField objects.
constructor(engine: PivotEngine): PivotFieldCollection
Initializes a new instance of the PivotFieldCollection class.
PivotEngine that owns this PivotFieldCollection.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the maximum number of fields allowed in this collection.
This property is set to null by default, which means any number of items is allowed.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getField(key: string): PivotField
Gets a field by key.
key to look for.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
push(...item: any[]): number
Overridden to allow pushing fields by header.
One or more PivotField objects to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): this
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Editor for PivotField objects.
constructor(element: any, options?): PivotFieldEditor
Initializes a new instance of the PivotFieldEditor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate PivotFieldEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
updateEditor(): void
Updates editor to reflect the current field values.
updateField(): void
Updates field to reflect the current editor values.
Represents a filter used to select values for a PivotField.
constructor(field: PivotField): PivotFilter
Initializes a new instance of the PivotFilter class.
PivotField that owns this filter.
Gets or sets the types of filtering provided by this filter.
Setting this property to null causes the filter to use the value defined by the owner filter's defaultFilterType property.
Gets a value that indicates whether the filter is active.
apply(value): boolean
Gets a value that indicates whether a value passes the filter.
The value to test.
clear(): void
Clears the filter.
Editor for PivotFilter objects.
constructor(element: any, field: PivotField, options?: any): PivotFilterEditor
Initializes a new instance of the ColumnFilterEditor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The PivotField to edit.
JavaScript object containing initialization data for the editor.
Gets or sets the template used to instantiate PivotFilterEditor controls.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
clearEditor(): void
Clears the editor fields without applying changes to the filter.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onFinishEditing(e?: CancelEventArgs): void
Raises the finishEditing event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
updateEditor(): void
Updates the editor with current filter settings.
updateFilter(): void
Updates the filter to reflect the current editor values.
Extends the FlexGrid control to display pivot tables.
To use this control, set its itemsSource property to an instance of a PivotPanel control or to a PivotEngine.
constructor(element: any, options?): PivotGrid
Initializes a new instance of the PivotGrid class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets a value that determines whether the content of header cells should be vertically centered.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets or sets a value that determines whether the grid should allow users to collapse and expand subtotal groups of rows and columns.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets the template used to instantiate FlexGrid controls.
Gets or sets a value that determines whether the grid should provide a custom context menu.
The custom context menu includes commands for changing field settings, removing fields, or showing detail records for the grid cells.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets or sets a Point that represents the value of the grid's scrollbars.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that determines whether the grid should display column field headers in its top-left panel.
Gets or sets a value that determines whether the grid should show a popup containing the detail records when the user double-clicks a cell.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that determines whether the grid should display row field headers in its top-left panel.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers for row fields.
Unlike regular column headers, row fields are always sorted, either in ascending or descending order. If you set this property to true, sort icons will always be displayed over any row field headers.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseColumnsToLevel(level: number): void
Collapses all columns to a given level.
Maximum column level to show. Zero means show only grand totals; one means show only top-level groups; very high levels expand all columns.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
collapseRowsToLevel(level: number): void
Collapses all rows to a given level.
Maximum row level to show. Zero means show only grand totals; one means show only top-level groups; very high levels expand all rows.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDetail(row: number, col: number): any[]
Gets an array containing the records summarized by a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
getDetailView(row: number, col: number): ICollectionView
Gets an ICollectionView containing the records summarized by a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
getKeys(row: number, col: number): any
Gets an object with information about the fields and values being used to summarize a given cell.
For more details, see the @PivotEngine.getKeys method.
Index of the row that contains the cell.
Index of the column that contains the cell.
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
showDetail(row: number, col: number): void
Shows a dialog containing details for a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Provides a user interface for interactively transforming regular data tables into Olap pivot tables.
Olap pivot tables group data into one or more dimensions. The dimensions are represented by rows and columns on a grid, and the summarized data is stored in the grid cells.
Use the itemsSource property to set the source data, and the pivotView property to get the output table containing the summarized data.
constructor(element: any, options?): PivotPanel
Initializes a new instance of the PivotPanel class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that determines whether the engine should populate the fields collection automatically based on the itemsSource.
Gets the list of fields that define the columns in the output table.
Gets the list of fields that define filters applied while generating the output table.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value that determines whether a pivot view is currently defined.
A pivot view is defined if the valueFields list is not empty and either the rowFields or columnFields lists are not empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets the list of fields that define the rows in the output table.
Gets the list of fields that define the values shown in the output table.
Gets or sets the current pivot view definition as a JSON string.
This property is typically used to persist the current view as an application setting.
For example, the code below implements two functions that save and load view definitions using local storage:
// save/load views
function saveView() {
localStorage.viewDefinition = pivotPanel.viewDefinition;
}
function loadView() {
pivotPanel.viewDefinition = localStorage.viewDefinition;
}addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingView(e: ProgressEventArgs): void
Raises the updatingView event.
ProgressEventArgs that provides the event data.
onViewDefinitionChanged(e?: EventArgs): void
Raises the viewDefinitionChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Provides arguments for progress events.
constructor(progress: number): ProgressEventArgs
Initializes a new instance of the ProgressEventArgs class.
Number between 0 and 100 that represents the progress.
Defines the dimension type of a CubePivotField.
| Name | Value | Description |
|---|---|---|
| Dimension | 0 | Fields that contain categories used to summarize data. |
| Measure | 1 | Fields that contain quantitative, numerical information. |
| Kpi | 2 | Calculations associated with a measure group used to evaluate business success. |
| NameSet | 3 | Multidimensional Expression (MDX) that returns a set of dimension members. |
| Attribute | 4 | Provide supplementary information about dimension members. |
| Folder | 5 | Used to categorize measures and improve the user browsing experience. |
| Hierarchy | 6 | Metadata that define relationships between two or more columns in a table. |
| Date | 7 | Dimension with time-based levels of granularity for analysis and reporting. |
| Currency | 8 | Dimension whose attributes represent a list of currencies for financial reporting purposes. |
Specifies constants that define when the chart legend should be displayed.
| Name | Value | Description |
|---|---|---|
| Always | 0 | Always show the legend. |
| Never | 1 | Never show the legend. |
| Auto | 2 | Show the legend if the chart has more than one series. |
Specifies constants that define the chart type.
| Name | Value | Description |
|---|---|---|
| Column | 0 | Shows vertical bars and allows you to compare values of items across categories. |
| Bar | 1 | Shows horizontal bars. |
| Scatter | 2 | Shows patterns within the data using X and Y coordinates. |
| Line | 3 | Shows trends over a period of time or across categories. |
| Area | 4 | Shows line chart with the area below the line filled with color. |
| Pie | 5 | Shows pie chart. |
Specifies constants that define calculations to be applied to cells in the output view.
| Name | Value | Description |
|---|---|---|
| NoCalculation | 0 | Show plain aggregated values. |
| DiffRow | 1 | Show differences between each item and the item in the previous row. |
| DiffRowPct | 2 | Show differences between each item and the item in the previous row as a percentage. |
| DiffCol | 3 | Show differences between each item and the item in the previous column. |
| DiffColPct | 4 | Show differences between each item and the item in the previous column as a percentage. |
| PctGrand | 5 | Show values as a percentage of the grand totals for the field. |
| PctRow | 6 | Show values as a percentage of the row totals for the field. |
| PctCol | 7 | Show values as a percentage of the column totals for the field. |
| RunTot | 8 | Show values as running totals. |
| RunTotPct | 9 | Show values as percentage running totals. |
Specifies constants that define whether to include totals in the output table.
| Name | Value | Description |
|---|---|---|
| None | 0 | Do not show any totals. |
| GrandTotals | 1 | Show grand totals. |
| Subtotals | 2 | Show subtotals and grand totals. |
Defines a series of classes, interfaces and functions related to the viewer controls.
Defines the PDFViewer control for displaying the PDF document.
The serviceUrl property indicates the url of C1 Web API which provides PDF services. The PDF services use C1PdfDocumentSource to process PDF document.
Here is the sample to show a PDF document:
var pdfViewer = new wijmo.viewer.PdfViewer('#pdfViewer');
pdfViewer.serviceUrl= 'http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report';
pdfViewer.filePath= 'PdfsRoot/C1XapOptimizer.pdf';constructor(element: any, options?: any): PdfViewer
Initializes a new instance of the PdfViewer class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate the viewer controls.
Gets or sets the full path to the document on the server.
The path starts with the key of a provider which is registered at server for locating specified document.
Gets or sets a value indicating whether the viewer is under full screen mode.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value indicating the mouse behavior.
The default is SelectTool which means clicking and dragging the mouse will select the text.
Gets the index of the page which is currently displayed in the view panel.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the address of C1 Web API service.
For example, "http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report".
Gets or sets the threshold to switch between mobile and PC template.
Default value is 767px. If width of control is smaller than thresholdWidth, mobile template will be applied. If width of control is equal or greater than thresholdWidth, PC template will be applied. If thresholdWidth is set to 0, then only PC template is applied and if it's set to a large number e.g. 9999, then only mobile template is applied.
Gets or sets a value indicating how to show the document pages.
Gets or sets a value indicating the current zoom factor to show the document pages.
Gets or sets a value indicating the current zoom mode to show the document pages.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
moveToPage(index: number): IPromise
Moves to the page at the specified index.
Index (0-base) of the page to move to.
onFullScreenChanged(e?: EventArgs): void
Raises the fullScreenChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onMouseModeChanged(e?: EventArgs): void
Raises the mouseModeChanged event.
onPageIndexChanged(e?: EventArgs): void
Raises the pageIndexChanged event.
onQueryLoadingData(e: QueryLoadingDataEventArgs): void
Raises the queryLoadingData event.
The QueryLoadingDataEventArgs object that contains the loading data.
onSelectMouseModeChanged(e?: EventArgs): void
Deprecated: use onMouseModeChanged instead.
onViewModeChanged(e?: EventArgs): void
Raises the viewModeChanged event.
onZoomFactorChanged(e?: EventArgs): void
Raises the zoomFactorChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
reload(): void
Reloads the document.
This is useful for force reloading and rerendering the document.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
showPageSetupDialog(): void
Shows the page setup dialog.
zoomToView(): void
Scales the current page to show the whole page in view panel.
zoomToViewWidth(): void
Scales the current page to fit the width of the view panel.
Occurs after the full screen mode is changed.
Occurs after the mouse mode is changed.
Occurs after the page index is changed.
Occurs when querying the request data sent to the service before loading the document.
Deprecated: use mouseModeChanged instead.
Occurs after the zoom factor is changed.
Provides arguments for queryLoadingData event.
constructor(data?: any): QueryLoadingDataEventArgs
Initializes a new instance of the QueryLoadingDataEventArgs class.
The request data sent to the service on loading the document.
Defines the ReportViewer control for displaying the FlexReport or SSRS report.
The serviceUrl property indicates the url of C1 Web API which provides report services. The report services use C1FlexReport to process a FlexReport, and use C1SSRSDocumentSource and C1PdfDocumentSource to process an SSRS report.
Here is a sample of how to show a FlexReport:
var reportViewer = new wijmo.viewer.ReportViewer('#reportViewer');
reportViewer.serviceUrl = 'http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report';
reportViewer.filePath = 'ReportsRoot/Formatting/AlternateBackground.flxr';
reportViewer.reportName = 'AlternateBackground';
Here is a sample of how to show an SSRS report:
var reportViewer = new wijmo.viewer.ReportViewer('#reportViewer');
reportViewer.serviceUrl = 'http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report';
reportViewer.filePath = 'c1ssrs/AdventureWorks/Company Sales';constructor(element: any, options?: any): ReportViewer
Initializes a new instance of the ReportViewer class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate the viewer controls.
Gets or sets the full path to the document on the server.
The path starts with the key of a provider which is registered at server for locating specified document.
Gets or sets a value indicating whether the viewer is under full screen mode.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value indicating the mouse behavior.
The default is SelectTool which means clicking and dragging the mouse will select the text.
Gets the index of the page which is currently displayed in the view panel.
Gets or sets a value indicating whether the content should be represented as a set of fixed sized pages.
The default value is null which means using paginated mode for a FlexReport and non-paginaged mode for an SSRS report.
Gets or sets the report name.
For FlexReport, sets it with the report name defined in the FlexReport definition file. For SSRS report, leave it as empty string. The SSRS report path is specified by the filePath property.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the address of C1 Web API service.
For example, "http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report".
Gets or sets the threshold to switch between mobile and PC template.
Default value is 767px. If width of control is smaller than thresholdWidth, mobile template will be applied. If width of control is equal or greater than thresholdWidth, PC template will be applied. If thresholdWidth is set to 0, then only PC template is applied and if it's set to a large number e.g. 9999, then only mobile template is applied.
Gets or sets a value indicating how to show the document pages.
Gets or sets a value indicating the current zoom factor to show the document pages.
Gets or sets a value indicating the current zoom mode to show the document pages.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getReportNames(serviceUrl: string, reportFilePath: string): IPromise
Gets the report names defined in the specified FlexReport definition file.
The address of C1 Web API service.
The full path to the FlexReport definition file.
getReports(serviceUrl: string, path: string, data?: any): IPromise
Gets the catalog items in the specified folder path.
You can get all items under the folder path by passing the data parameter as: 1) A true value. 2) An object which has the "recursive" property with true value.
The address of C1 Web API service.
The folder path. The path to the FlexReport definition file will be treated as a folder path.
The request data sent to the report service, or a boolean value indicates whether getting all items under the path.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
moveToPage(index: number): IPromise
Moves to the page at the specified index.
Index (0-base) of the page to move to.
onFullScreenChanged(e?: EventArgs): void
Raises the fullScreenChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onMouseModeChanged(e?: EventArgs): void
Raises the mouseModeChanged event.
onPageIndexChanged(e?: EventArgs): void
Raises the pageIndexChanged event.
onQueryLoadingData(e: QueryLoadingDataEventArgs): void
Raises the queryLoadingData event.
The QueryLoadingDataEventArgs object that contains the loading data.
onSelectMouseModeChanged(e?: EventArgs): void
Deprecated: use onMouseModeChanged instead.
onViewModeChanged(e?: EventArgs): void
Raises the viewModeChanged event.
onZoomFactorChanged(e?: EventArgs): void
Raises the zoomFactorChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
reload(): void
Reloads the document.
This is useful for force reloading and rerendering the document.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
showPageSetupDialog(): void
Shows the page setup dialog.
zoomToView(): void
Scales the current page to show the whole page in view panel.
zoomToViewWidth(): void
Scales the current page to fit the width of the view panel.
Occurs after the full screen mode is changed.
Occurs after the mouse mode is changed.
Occurs after the page index is changed.
Occurs when querying the request data sent to the service before loading the document.
Deprecated: use mouseModeChanged instead.
Occurs after the zoom factor is changed.
Base class for all the viewer controls.
constructor(element: any, options?: any): ViewerBase
Initializes a new instance of the ViewerBase class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate the viewer controls.
Gets or sets the full path to the document on the server.
The path starts with the key of a provider which is registered at server for locating specified document.
Gets or sets a value indicating whether the viewer is under full screen mode.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value indicating the mouse behavior.
The default is SelectTool which means clicking and dragging the mouse will select the text.
Gets the index of the page which is currently displayed in the view panel.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Deprecated: use mouseMode instead.
Gets or sets the address of C1 Web API service.
For example, "http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report".
Gets or sets the threshold to switch between mobile and PC template.
Default value is 767px. If width of control is smaller than thresholdWidth, mobile template will be applied. If width of control is equal or greater than thresholdWidth, PC template will be applied. If thresholdWidth is set to 0, then only PC template is applied and if it's set to a large number e.g. 9999, then only mobile template is applied.
Gets or sets a value indicating the current zoom factor to show the document pages.
Gets or sets a value indicating the current zoom mode to show the document pages.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
moveToPage(index: number): IPromise
Moves to the page at the specified index.
Index (0-base) of the page to move to.
onFullScreenChanged(e?: EventArgs): void
Raises the fullScreenChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onMouseModeChanged(e?: EventArgs): void
Raises the mouseModeChanged event.
onPageIndexChanged(e?: EventArgs): void
Raises the pageIndexChanged event.
onQueryLoadingData(e: QueryLoadingDataEventArgs): void
Raises the queryLoadingData event.
The QueryLoadingDataEventArgs object that contains the loading data.
onSelectMouseModeChanged(e?: EventArgs): void
Deprecated: use onMouseModeChanged instead.
onViewModeChanged(e?: EventArgs): void
Raises the viewModeChanged event.
onZoomFactorChanged(e?: EventArgs): void
Raises the zoomFactorChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
reload(): void
Reloads the document.
This is useful for force reloading and rerendering the document.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
showPageSetupDialog(): void
Shows the page setup dialog.
zoomToView(): void
Scales the current page to show the whole page in view panel.
zoomToViewWidth(): void
Scales the current page to fit the width of the view panel.
Occurs when querying the request data sent to the service before loading the document.
Describes an item in the report server of a specific path.
The short name of the item.
The full path (starts with the report provider key) of the item.
Defines the interface of promise which is used for asynchronous calling.
catch(onRejected?: (reason?: any)): IPromise
Call the function after a promise is rejected.
The function which will be executed when a promise is rejected. This has a single parameter, the rejection reason. The return value will be passed to the next callback function.
then(onFulfilled?: (value?: any), onRejected?: (reason?: any)): IPromise
Call the function after a promise is fulfilled or rejected.
The function which will be executed when a promise is fulfilled. This has a single parameter, the fulfillment value. If a value is returned, it will be passed to the next callback function. If no value is returned, the original value will be passed.
The function which will be executed when a promise is rejected. This has a single parameter, the rejection reason. If a value is returned, it will be passed to the next callback function. If no value is returned, the original value will be passed.
| Name | Value | Description |
|---|---|---|
| Folder | 0 | A folder. |
| File | 1 | A FlexReport definition file. |
| Report | 2 | An SSRS report or a FlexReport defined in the FlexReport definition file. |
Specifies the mouse modes, which defines the mouse behavior of viewer.
| Name | Value | Description |
|---|---|---|
| SelectTool | 0 | Select text. |
| MoveTool | 1 | Move page. |
| RubberbandTool | 2 | Rubberband to zoom. |
| MagnifierTool | 3 | Magnifier tool. |
Specifies the view modes, which define how to show document pages in the view panel.
| Name | Value | Description |
|---|---|---|
| Single | 0 | Only show one document page. |
| Continuous | 1 | Show document pages continuously. |
Describes the supported zoom modes of FlexViewer.
| Name | Value | Description |
|---|---|---|
| Custom | 0 | Custom zoom mode. The actual zoom factor is determined by the value of the zoomFactor property. |
| PageWidth | 1 | Pages are zoomed in or out as necessary to fit the page width in the view panel. |
| WholePage | 2 | Pages are zoomed in or out as necessary to fit the whole page in the view panel. |
Contains AngularJS directives for the Wijmo controls.
The directives allow you to add Wijmo controls to AngularJS applications using simple markup in HTML pages.
You can use directives as regular HTML tags in the page markup. The tag name corresponds to the control name, prefixed with "wj-," and the attributes correspond to the names of control properties and events.
All control, property, and event names within directives follow the usual AngularJS convention of replacing camel-casing with hyphenated lower-case names.
AngularJS directive parameters come in three flavors, depending on the type of binding they use. The table below describes each one:
@=&For more details on the different binding types, please see Dan Wahlin's blog on directives. The documentation does not describe directive events because they are identical to the control events, and the binding mode is always the same (function binding).
To illustrate, here is the markup used to create a ComboBox control:
<wj-combo-box text="ctx.theCountry" items-source="ctx.countries" is-editable="true" selected-index-changed="ctx.selChanged(s, e)"> </wj-combo-box>
Notice that the text property of the ComboBox is bound to a controller
variable called "ctx.theCountry." The binding goes two ways; changes in the control
update the scope, and changes in the scope update the control. To
initialize the text property with a string constant, enclose
the attribute value in single quotes (for example, text="'constant'").
Notice also that the selected-index-changed event is bound to a controller method called "selChanged," and that the binding includes the two event parameters (without the parameters, the method is not called). Whenever the control raises the event, the directive invokes the controller method.
All Wijmo Angular directives include an "initialized" event that is raised after the control has been added to the page and initialized. You can use this event to perform additional initialization in addition to setting properties in markup. For example:
<wj-flex-grid initialized="initGrid(s,e)"> </wj-flex-grid>
// controller
$scope.initGrid: function(s, e) {
// assign a custom MergeManager to the grid
s.mergeManager = new CustomMergeManager(s);
}AngularJS directive for the AutoComplete control.
Use the wj-auto-complete directive to add AutoComplete controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an AutoComplete control:</p> <wj-auto-complete text="theCountry" items-source="countries" is-editable="false" placeholder="country"> </wj-auto-complete>
The example below creates an AutoComplete control and binds it to a 'countries' array exposed by the controller. The AutoComplete searches for the country as the user types, and narrows down the list of countries that match the current input.
The wj-auto-complete directive extends WjComboBox with the following attributes:
@ The name of the CSS class used to highlight
parts of the content that match the search terms.@ The amount of delay in milliseconds between
when a keystroke occurs and when the search is performed.= A function that provides the items
dynamically as the user types.@ The maximum number of items to display
in the dropdown.@ The minimum input length to require before
triggering autocomplete suggestions.AngularJS directive for the BulletGraph control.
Use the wj-bullet-graph directive to add bullet graphs to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-bullet-graph
value="ctx.gauge.value"
min="0" max="10"
target="{{item.target}}"
bad="{{item.target * .75}}"
good="{{item.target * 1.25}}">
</wj-bullet-graph>
The wj-bullet-graph directive supports the following attributes:
= A reference to the BulletGraph control
created by this directive.@ The GaugeDirection value
indicating which direction the gauge fills as the value grows.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The target value for the measure.@ A reference value considered good for the
measure.@ A reference value considered bad for the
measure.= The actual value of the measure.The wj-bullet-graph directive may contain one or more WjRange directives.
AngularJS directive for the Calendar control.
Use the wj-calendar directive to add Calendar controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a Calendar control:</p> <wj-calendar value="theDate"> </wj-calendar>
This example creates a Calendar control and binds it to a 'date' variable exposed by the controller. The range of dates that may be selected is limited by the min and max properties.
The wj-calendar directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the Calendar control
created by this directive.= The month being displayed in the calendar.@ The first day of the week.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. = The function used to customize the dates
shown in the calendar.@ The latest valid date (string in the
format "yyyy-MM-dd").@ The earliest valid date (string in the
format "yyyy-MM-dd").@ A value indicating whether the control displays
a month or the entire year.@ A value indicating whether the control displays
the header area.= The date being edited.& The gotFocus event handler.& The lostFocus event handler.& The valueChanged event handler.If provided, the min and max attributes are strings in the format "yyyy-MM-dd." Technically, you can use any full date as defined in the W3C [RFC 3339], which is also the format used with regular HTML5 input elements.
AngularJS directive for an ICollectionView pager element.
Use the wj-collection-view-pager directive to add an element that allows users to navigate through the pages in a paged ICollectionView. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
Here is a CollectionViewPager:</p> <wj-collection-view-pager cv="myCollectionView"> </wj-collection-view-pager>
This example creates a CollectionView with 100,000 items and 20 items per page. It defines a navigator to select the current page, another to select the current item, and shows the data in a FlexGrid.
The wj-collection-view-pager directive has a single attribute:
= A reference to the paged ICollectionView object to navigate.AngularJS directive for the ColorPicker control.
Use the wj-color-picker directive to add ColorPicker controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a ColorPicker control:</p> <wj-color-picker value="theColor" show-alpha-channel="false"> </wj-color-picker>
The wj-color-picker directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the ColorPicker
control created by this directive.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value indicating whether the control
displays the alpha channel (transparency) editor.@ A value indicating whether the control
displays a string representation of the color being edited.= An array with ten color values to use
as the palette.= The color being edited.& The gotFocus event handler.& The lostFocus event handler.& The valueChanged event handler.AngularJS directive for the ComboBox control.
Use the wj-combo-box directive to add ComboBox controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a ComboBox control:</p> <wj-combo-box text="theCountry" items-source="countries" is-editable="false" placeholder="country"> </wj-combo-box>
The example below creates a ComboBox control and binds it to a 'countries' array exposed by the controller. The ComboBox searches for the country as the user types. The isEditable property is set to false, so the user is forced to select one of the items in the list.
The wj-combo-box directive supports the following attributes:
@ Binds the control's selectedValue property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the ComboBox control created by this directive.@ The name of the property to use as the visual representation of the items.@ A value indicating whether the drop-down list displays the items as plain text or as HTML.@ A value indicating whether the drop down list is currently visible.@ A value indicating whether the user can enter values not present on the list.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values.= A function used to customize the values shown in the drop-down list.= An array or ICollectionView that contains items to show in the list.@ The maximum height of the drop-down list.@ The maximum width of the drop-down list.@ A string shown as a hint when the control is empty.@ A value indicating whether to prevent null values.@ A value indicating whether the control displays a drop-down button.= The index of the currently selected item in the drop-down list.= The currently selected item in the drop-down list.= The value of the selected item, obtained using the selected-value-path.@ The name of the property used to get the selected-value from the selected-item.= The text to show in the control.& The isDroppedDownChanging event handler.& The isDroppedDownChanged event handler.& The selectedIndexChanged event handler.& The gotFocus event handler.& The lostFocus event handler.& The textChanged event handler.AngularJS directive for context menus.
Use the wj-context-menu directive to add context menus to elements on the page. The wj-context-menu directive is based on the wj-menu directive; it displays a popup menu when the user performs a context menu request on an element (usually a right-click).
The wj-context-menu directive is specified as a parameter added to the element that the context menu applies to. The parameter value is a selector for the element that contains the menu. For example:
<!-- paragraph with a context menu --> <p wj-context-menu="#idMenu" > This paragraph has a context menu.</p> <!-- define the context menu (hidden and with an id) --> <wj-menu id="idMenu" ng-show="false"> <wj-menu-item cmd="cmdOpen" cmd-param ="1">Open...</wj-menu-item> <wj-menu-item cmd="cmdSave" cmd-param="2">Save </wj-menu-item> <wj-menu-item cmd="cmdSave" cmd-param="3">Save As...</wj-menu-item> <wj-menu-item cmd="cmdNew" cmd-param ="4">New...</wj-menu-item> <wj-menu-separator></wj-menu-separator> <wj-menu-item cmd="cmdExit" cmd-param="5">Exit</wj-menu-item> </wj-menu >
AngularJS directive for the FinancialChart control.
Use the wj-financial-chart directive to add financial charts to your AngularJS applications. Note that directive and parameter names must be formatted using lower-case letters with dashes instead of camel case.
The wj-financial-chart directive supports the following attributes:
@ The name of the property that contains Y
values for the chart. You can override this at the series level.@ The name of the property that contains X
values for the chart. You can override this at the series level.@ The default chart type to use in rendering series
objects. You can override this at the series level. See FinancialChartType.= A reference to the FinancialChart control
that this directive creates.@ The text to display in the chart footer (plain
text).= The style to apply to the chart footer.@ The text to display in the chart header (plain
text).= The style to apply to the chart header.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The value indicating whether to interpolate or
leave gaps when there are null values in the data.= The formatter function that customizes the
appearance of data points.= An array or ICollectionView object that contains
the data used to create the chart.@ The value indicating whether clicking legend items
toggles series visibility.= Chart options that only apply to certain chart types.
See options under FinancialChart for details.= An array that contains the default colors used for
displaying each series.= The number of pixels of space to leave between the
edges of the control and the plot area, or CSS-style margins.= The series object that is selected.@ The SelectionMode value indicating whether or what is
selected when the user clicks a series.@ The size of the symbols used to render data
points in Scatter, LineSymbols, and SplineSymbols charts, in pixels. You can override
this at the series level.@ The value to display in the
ChartTooltip content property.& The gotFocus event handler.& The lostFocus event handler.& The rendering event handler.& The rendered event handler.& The seriesVisibilityChanged event handler.& The selectionChanged event handler.The wj-financial-chart directive may contain the following child directives: WjFlexChartAxis, WjFlexChartSeries, WjFlexChartLegend and WjFlexChartDataLabel.
AngularJS directive for the FinancialChart FinancialSeries object.
The wj-financial-chart-series directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ X-axis for the series.@ Y-axis for the series.@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
FinancialChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data points in this
series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any setting at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.In most cases, the wj-financial-chart-series specifies the name and binding properties only. The remaining values are inherited from the parent wj-financial-chart directive.
AngularJS directive for the FlexChart control.
Use the wj-flex-chart directive to add charts to your AngularJS applications. Note that directive and parameter names must be formatted using lower-case letters with dashes instead of camel case. For example:
<p>Here is a FlexChart control:</p>
<wj-flex-chart
style="height:300px"
items-source="data"
binding-x="country">
<wj-flex-chart-axis
wj-property="axisY"
major-unit="5000">
</wj-flex-chart-axis>
<wj-flex-chart-series
binding="sales"
name="Sales">
</wj-flex-chart-series>
<wj-flex-chart-series
binding="expenses"
name="Expenses">
</wj-flex-chart-series>
<wj-flex-chart-series
binding="downloads"
name="Downloads"
chart-type="LineSymbols">
</wj-flex-chart-series>
</wj-flex-chart>
The example below creates a FlexChart control and binds it to a 'data' array exposed by the controller. The chart has three series objects, each corresponding to a property in the objects contained in the source array. The last series in the example uses the 'chart-type' attribute to override the default chart type used for the other series objects.
The wj-flex-chart directive supports the following attributes:
@ The name of the property that contains Y
values for the chart. You can override this at the series level.@ The name of the property that contains X
values for the chart. You can override this at the series level.@ The default chart type to use in rendering series
objects. You can override this at the series level. See ChartType.= A reference to the FlexChart control
that this directive creates.@ The text to display in the chart footer (plain
text).= The style to apply to the chart footer.@ The text to display in the chart header (plain
text).= The style to apply to the chart header.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The value indicating whether to interpolate or
leave gaps when there are null values in the data.= The formatter function that customizes the
appearance of data points.= An array or ICollectionView object that contains
the data used to create the chart.@ The value indicating whether clicking legend items
toggles series visibility.= Chart options that only apply to certain chart types.
See options under FlexChart for details.= An array that contains the default colors used for
displaying each series.= The number of pixels of space to leave between the
edges of the control and the plot area, or CSS-style margins.@ The value indicating whether to flip the axes so that
X is vertical and Y is horizontal.= The series object that is selected.@ The SelectionMode value indicating whether or what is
selected when the user clicks a series.@ The Stacking value indicating whether or how series
objects are stacked or plotted independently.@ The size of the symbols used to render data points in Scatter,
LineSymbols, and SplineSymbols charts, in pixels. You can override
this at the series level.@ The value to display in the
ChartTooltip content property.& The gotFocus event handler.& The lostFocus event handler.& The rendering event handler.& The rendered event handler.& The seriesVisibilityChanged event handler.& The selectionChanged event handler.The wj-flex-chart directive may contain the following child directives: WjFlexChartAxis, WjFlexChartSeries, WjFlexChartLegend and WjFlexChartDataLabel.
AngularJS directive for the FlexChart ChartAnimation object.
The wj-flex-chart-animation directive must be contained in a WjFlexChart or WjFlexPie or WjFinancialChart directive. It supports the following attributes:
@ The value indicating whether the plot points animate one at a time, series by series, or all at once.@ The value indicating the easing function applied to the animation.@ The value indicating the length of entire animation in milliseconds.@ The value indicating whether the axis animation is enabled.AngularJS directive for the annotations.
The wj-flex-chart-annotation directive must be contained in a WjFlexChartAnnotationLayer directive.
The wj-flex-chart-annotation directive is used to represent all types of possible annotation shapes like Circle, Rectangle, Polygon and so on. The type of annotation shape is specified in the directive's type attribute.
The directive supports the following attributes:
@ The class name of the annotation shape represented by the directive.
The possible values are Circle, Ellipse, Image, Line, Polygon,
Rectangle, Square, Text.@ An AnnotationAttachment value defining the attachment of the annotation.
@ The text of the Circle, Ellipse, Image, Line,
Polygon, Rectangle or Square annotation.@ The end point of the Line annotation.@ The height of the Ellipse, Image or Rectangle annotation.@ The href of the Image annotation.@ The visibility of the annotation.@ The length of the Square annotation.@ The name of the annotation.@ The offset of the annotation.@ The point of the annotation, the coordinate space of the point depends on the attachment property value.
The property works for Circle, Ellipse, Image, Rectangle, Square
and Text annotation.@ The index of the data point in the specified series where the annotation is attached to.@ An AnnotationPosition value defining the position of the annotation
relative to the point.@ The radius of the Circle annotation.@ The index of the data series where the annotation is attached to.@ The start point of the Line annotation.@ The style of the annotation.@ The text of the Text annotation.@ The tooltip of the annotation.@ The width of the Ellipse, Image or Rectangle annotation.AngularJS directive for the FlexChart AnnotationLayer object.
The wj-flex-chart-annotation-layer directive must be contained in a WjFlexChart directive or WjFinancialChart directive.
AngularJS directive for the FinancialChart ATR object.
The wj-flex-chart-atr directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the average true range calculation.AngularJS directive for the FlexChart Axis object.
The wj-flex-chart-axis directive must be contained in a WjFlexChart directive or WjFinancialChart directive. It supports the following attributes:
@ Defines the FlexChart property name,
axis-x or axis-y, to initialize with the directive.@ The value indicating whether the axis line is visible.@ Gets or sets the comma-separated property names for
the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents
the corresponding axis label. The default value is 'value,text'.@ The format string used for the axis labels
(see Globalize).= The formatter function that customizes the
appearance of axis labels.= The items source for the axis labels.@ The value indicating whether the axis labels are visible.@ The rotation angle of axis labels in degrees.@ The alignment of axis labels.@ The padding of axis labels.@ The value indicating whether the axis includes grid lines.@ Defines the appearance of tick marks on the axis
(see TickMark).@ The number of units between axis labels.@ The minimum value shown on the axis.@ The maximum value shown on the axis.@ The value indicating whether the axis includes minor grid lines.@ Defines the appearance of minor tick marks on the axis
(see TickMark).@ The number of units between minor axis ticks.@ The axis origin.@ The OverlappingLabels value indicating how to handle the overlapping axis labels.@ The Position value indicating the position of the axis.@ The value indicating whether the axis is reversed (top to
bottom or right to left).@ The title text shown next to the axis.AngularJS directive for the FinancialChart BollingerBands object.
The wj-flex-chart-bollinger-bands directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the Bollinger Bands calculation.@ The standard deviation multiplier for the Bollinger Bands calculation.AngularJS directive for the FlexChart and FinancialChart BoxWhisker object.
The wj-flex-chart-box-whisker directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The SeriesVisibility value indicating whether and where to
display the series.@ The value that specifies the quartile calculation for the Box&Whisker chart.@ The value that determines the group width as a percentage for the Box&Whisker chart.@ The value that determines the gap width as a percentage for the Box&Whisker chart.@ The value that determines whether to show the mean line for the Box&Whisker chart.@ The value that specifies the style for the mean line.@ The value that determines whether to show the mean marker for the Box&Whisker chart.@ The value that specifies the style for the mean marker.@ The value that determines whether to show the inner points for the Box&Whisker chart.@ The value that determines whether to show the outliers for the Box&Whisker chart.AngularJS directive for the FinancialChart CCI object.
The wj-flex-chart-cci directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the commodity channel index calculation.AngularJS directive for the FlexChart ChartGestures object.
The wj-flex-chart-gestures directive must be contained in a WjFlexChart directive or WjFinancialChart directive. It supports the following attributes:
@ The value indicating mouse action is zooming or panning.@ The value indicating which axis is interactive.@ The value indicating the gestures action is enabled or not.@ The value indicating axisX initial range between Min and Max.@ The value indicating axisY initial range between Min and Max.@ The value indicating initial position on the axisX.@ The value indicating initial position on the axisY.AngularJS directive for the FlexChart DataLabel object.
The wj-flex-chart-data-label directive must be contained in a WjFlexChart directive. It supports the following attributes:
= A string or function that gets or sets the content of the data labels.@ Gets or sets a value indicating whether the data labels have borders.@ The LabelPosition value indicating the position of the data labels.AngularJS directive for the FlexChart DataPoint object.
The wj-flex-chart-data-point directive must be contained in a WjFlexChartAnnotation directive. The property of the parent directive's object where wj-flex-data-point should assign a value is specified in the wj-property attribute.
The directive supports the following attributes:
@ The name of the parent directive object's property where the
DataPoint will be assigned.@ x coordinate, can be a numeric or date value.@ y coordinate, can be a numeric or date value.AngularJS directive for the FinancialChart Envelopes object.
The wj-flex-chart-envelopes directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the moving average envelopes calculation.@ The size of the moving average envelopes.@ The MovingAverageType of the moving average to be used for the envelopes.AngularJS directive for the FlexChart ErrorBar object.
The wj-flex-chart-error-bar directive must be contained in a WjFlexChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The SeriesVisibility value indicating whether and where to
display the series.@ The value that specifies the ErrorBar style.@ The value that specifies the error value of the series.@ The value that specifies the error amount of the series.@ The value that specifies the end style of the series.@ The value that specifies the direction of the series.AngularJS directive for the FinancialChart Fibonacci object.
The wj-flex-chart-fibonacci directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The high value of Fibonacci tool.@ The label position for levels in Fibonacci tool.@ The levels value of Fibonacci tool.@ The low value of Fibonacci tool.@ The x minimum value of Fibonacci tool.@ The x maximum value of Fibonacci tool.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.= The SeriesVisibility value indicating whether and where to
display the series.@ The value indicating whether to create uptrending Fibonacci tool.AngularJS directive for the FinancialChart FibonacciArcs object.
The wj-flex-chart-fibonacci-arcs directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The LabelPosition for levels in FibonacciArcs tool.@ The levels value of FibonacciArcs tool.@ The starting X value of FibonacciArcs tool.@ The ending X value of FibonacciArcs tool.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.= The SeriesVisibility value indicating whether and where to
display the series.AngularJS directive for the FinancialChart FibonacciFans object.
The wj-flex-chart-fibonacci-fans directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The LabelPosition for levels in FibonacciFans tool.@ The levels value of FibonacciFans tool.@ The starting DataPoint of FibonacciFans tool.@ The ending DataPoint of FibonacciFans tool.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.= The SeriesVisibility value indicating whether and where to
display the series.AngularJS directive for the FinancialChart FibonacciTimeZones object.
The wj-flex-chart-fibonacci-time-zones directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The LabelPosition for levels in FibonacciTimeZones tool.@ The levels value of FibonacciTimeZones tool.@ The starting X value of FibonacciTimeZones tool.@ The ending X value of FibonacciTimeZones tool.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.= The SeriesVisibility value indicating whether and where to
display the series.AngularJS directive for the FlexChart Legend object.
The wj-flex-chart-legend directive must be contained in a WjFlexChart directive, WjFlexPie directive or WjFinancialChart directive. It supports the following attributes:
@ The Position value indicating the position of the
legend.The example below shows how you can use the wj-flex-chart-legend directive to change the position of the chart legend:
<wj-flex-chart
items-source="data"
binding-x="country">
<wj-flex-chart-axis
wj-property="axisY"
major-unit="5000">
</wj-flex-chart-axis>
<wj-flex-chart-series
binding="sales"
name="Sales">
</wj-flex-chart-series>
<wj-flex-chart-legend
position="Bottom">
</wj-flex-chart-legend>
</wj-flex-chart>AngularJS directive for the FlexChart LineMarker object.
The wj-flex-line-marker directive must be contained in a WjFlexChart directive or WjFinancialChart directive. It supports the following attributes:
@ The value indicating whether the LineMarker is visible.@ The index of the series in the chart in which the LineMarker appears.@ The horizontal position of the LineMarker relative to the plot area.@ The function that allows you to customize the text content of the LineMarker.@ The vertical position of the LineMarker relative to the plot area.@ The LineMarkerAlignment value indicating the alignment of the LineMarker content.@ The LineMarkerLines value indicating the appearance of the LineMarker's lines.@ The LineMarkerInteraction value indicating the interaction mode of the LineMarker.@ The maximum distance from the horizontal or vertical line that you can drag the marker.@ The value indicating whether you can drag the content of the marker when the interaction mode is "Drag".@ The value indicating whether the lines are linked when you drag the horizontal or vertical line when the interaction mode is "Drag".AngularJS directive for the FinancialChart Macd object.
The wj-flex-chart-macd directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information. The styles for the MACD and Signal lines.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The fast moving average period for the MACD calculation.@ The slow moving average period for the MACD calculation.@ The smoothing period for the MACD calculation.AngularJS directive for the FinancialChart MacdHistogram object.
The wj-flex-chart-macd-histogram directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The fast moving average period for the MACD calculation.@ The slow moving average period for the MACD calculation.@ The smoothing period for the MACD calculation.AngularJS directive for the FlexChart and FinancialChart MovingAverage object.
The wj-flex-chart-moving-average directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
ChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The MovingAverageType value for the moving average series.@ The period for the moving average calculation.AngularJS directive for the FlexChart and FinancialChart WjFlexChartParametricFunctionSeries object.
The wj-flex-chart-parametric-function-series directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
ChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The sample count for the calculation.@ The minimum value of the parameter for calculating a function.@ The maximum value of the parameter for calculating a function.@ The function used to calculate the x value.@ The function used to calculate the y value.AngularJS directive for the FlexChart RangeSelector object.
The wj-flex-chart-range-selector directive must be contained in a WjFlexChart directive or WjFinancialChart directive. It supports the following attributes:
@ The value indicating whether the RangeSelector is visible.@ The minimum value of the range.@ The maximum value of the range.@ The orientation of the RangeSelector.@ The value indicating whether the minimal and maximal handler will move seamlessly.@ the valid minimum range of the RangeSelector.@ the valid maximum range of the RangeSelector.AngularJS directive for the FinancialChart RSI object.
The wj-flex-chart-rsi directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the relative strength index calculation.AngularJS directive for the FlexChart Series object.
The wj-flex-chart-series directive must be contained in a WjFlexChart directive. It supports the following attributes:
@ X-axis for the series.@ Y-axis for the series.@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
ChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data points in this series
for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any settings at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any settings at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.In most cases, the wj-flex-chart-series specifies only the name and binding properties. The remaining values are inherited from the parent wj-flex-chart directive.
AngularJS directive for the FinancialChart Stochastic object.
The wj-flex-chart-stochastic directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information. The styles for the %K and %D lines.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the %K calculation.@ The period for the %D calculation.@ The smoothing period for the %K calculation.AngularJS directive for the FlexChart and FinancialChart TrendLine object.
The wj-flex-chart-trend-line directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
ChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any setting at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The sample count for the calculation.@ The TrendLineFitType value for the trend line.@ The number of terms in a polynomial or fourier equation.AngularJS directive for the FlexChart and FinancialChart Waterfall object.
The wj-flex-chart-waterfall directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The SeriesVisibility value indicating whether and where to
display the series.@ The value that determines whether the given data is relative.@ The value of the start bar.@ The label of the start bar.@ The value that determines whether the show the total bar.@ The label of the total bar.@ The value that determines whether to show the intermediate total bar.@ The value that contains the index for positions of the intermediate total bar.@ The value that contains the label of the intermediate total bar.@ The value that determines whether to show connector lines.@ The value of the waterfall styles.AngularJS directive for the FinancialChart WilliamsR object.
The wj-flex-chart-williams-r directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The period for the Williams %R calculation.AngularJS directive for the FlexChart and FinancialChart YFunctionSeries object.
The wj-flex-chart-y-function-series directive must be contained in a WjFlexChart or WjFinancialChart directive. It supports the following attributes:
@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
ChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any set at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.@ The sample count for the calculation.@ The minimum value of the parameter for calculating a function.@ The maximum value of the parameter for calculating a function.@ The function used to calculate Y value.AngularJS directive for the FlexGrid control.
Use the wj-flex-grid directive to add grids to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a FlexGrid control:</p>
<wj-flex-grid items-source="data">
<wj-flex-grid-column
header="Country"
binding="country">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Sales"
binding="sales">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Expenses"
binding="expenses">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Downloads"
binding="downloads">
</wj-flex-grid-column>
</wj-flex-grid>
The example below creates a FlexGrid control and binds it to a 'data' array exposed by the controller. The grid has three columns, each corresponding to a property of the objects contained in the source array.
The wj-flex-grid directive supports the following attributes:
@ A value indicating whether to show a new row
template so users can add items to the source collection.@ A value indicating whether the grid deletes the
selected rows when the Delete key is pressed.@ An AllowDragging value indicating
whether and how the user can drag rows and columns with the mouse.@ An AllowMerging value indicating
which parts of the grid provide cell merging.@ An AllowResizing value indicating
whether users are allowed to resize rows and columns with the mouse.@ A boolean value indicating whether users can sort
columns by clicking the column headers.@ A boolean value indicating whether the grid generates
columns automatically based on the items-source.@ The name of the property used to generate
child rows in hierarchical grids (or an array of property names if items
at different hierarchical levels use different names for their child items).= A reference to the FlexGrid control
created by this directive.= A boolean value indicating whether row and column
resizing should be deferred until the user releases the mouse button.@ The number of frozen (non-scrollable) columns in the grid.@ The number of frozen (non-scrollable) rows in the grid.@ The format string used to create the group
header content.= A HeadersVisibility value
indicating whether the row and column headers are visible. @ Gets or sets a value that determines whether the grid should
support Input Method Editors (IME) while not in edit mode.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. = A function that customizes
cells on this grid.= An array or ICollectionView object that
contains the items shown on the grid.@ A boolean value indicating whether the user is
prevented from editing grid cells by typing into them.= A MergeManager object that specifies
the merged extent of the specified cell.@ A SelectionMode value
indicating whether and how the user can select cells.@ A boolean value indicating whether to insert group
rows to delimit data groups.@ A boolean value indicating whether to display sort
indicators in the column headers.@ A number specifying the index of row in the column
header panel that shows and changes the current sort.@ The indentation, in pixels, used to offset row
groups of different levels.& Handler for the beginningEdit event.& Handler for the cellEditEnded event.& Handler for the cellEditEnding event.& Handler for the prepareCellForEdit event.& Handler for the resizingColumn event.& Handler for the resizedColumn event.& Handler for the draggedColumn event.& Handler for the draggingColumn event.& Handler for the sortedColumn event.& Handler for the sortingColumn event.& Handler for the deletingRow event.& Handler for the draggingRow event.& Handler for the draggedRow event.& Handler for the resizingRow event.& Handler for the resizedRow event.& Handler for the rowAdded event.& Handler for the rowEditEnded event.& Handler for the rowEditEnding event.& Handler for the loadedRows event.& Handler for the loadingRows event.& Handler for the groupCollapsedChanged event.& Handler for the groupCollapsedChanging event.& Handler for the itemsSourceChanged event.& Handler for the selectionChanging event.& Handler for the selectionChanged event.& Handler for the gotFocus event.& Handler for the lostFocus event.& Handler for the scrollPositionChanged event.The wj-flex-grid directive may contain WjFlexGridColumn, WjFlexGridCellTemplate and WjFlexGridDetail child directives.
AngularJS directive for the FlexGrid cell templates.
The wj-flex-grid-cell-template directive defines a template for a certain cell type in FlexGrid, and must contain a cell-type attribute that specifies the CellTemplateType. Depending on the template's cell type, the wj-flex-grid-cell-template directive must be a child of either WjFlexGrid or WjFlexGridColumn directives.
Column-specific cell templates must be contained in wj-flex-grid-column directives, and cells that are not column-specific (like row header or top left cells) must be contained in the wj-flex-grid directive.
In addition to an HTML fragment, wj-flex-grid-cell-template directives may contain an ng-style or ng-class attribute that provides conditional formatting for cells.
Both the ng-style/ng-class attributes and the HTML fragment can use the $col, $row and $item template variables that refer to the Column, Row and Row.dataItem objects pertaining to the cell.
For cell types like Group and CellEdit, an additional $value variable containing an unformatted cell value is provided. For example, here is a FlexGrid control with templates for row headers and for the Country column's regular and column header cells:
<wj-flex-grid items-source="data">
<wj-flex-grid-cell-template cell-type="RowHeader">
{{$row.index}}
</wj-flex-grid-cell-template>
<wj-flex-grid-cell-template cell-type="RowHeaderEdit">
...
</wj-flex-grid-cell-template>
<wj-flex-grid-column header="Country" binding="country">
<wj-flex-grid-cell-template cell-type="ColumnHeader">
<img ng-src="resources/globe.png" />
{{$col.header}}
</wj-flex-grid-cell-template>
<wj-flex-grid-cell-template cell-type="Cell">
<img ng-src="resources/{{$item.country}}.png" />
{{$item.country}}
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
<wj-flex-grid-column header="Sales" binding="sales"></wj-flex-grid-column>
</wj-flex-grid>
For more detailed information on specific cell type templates refer to the documentation for the CellTemplateType enumeration.
Note that the wj-flex-grid-column directive may also contain arbitrary content that is treated as a template for a regular data cell (cell-type="Cell"). But if a wj-flex-grid-cell-template directive exists and is set to cell-type="Cell" under the wj-flex-grid-column directive, it takes priority and overrides the arbitrary content.
The wj-flex-grid-cell-template directive supports the following attributes:
@
The CellTemplateType value defining the type of cell the template applies to.
@
Defines the style.overflow property value for cells.
@
For cell edit templates, indicates whether cell editing forcibly starts in full edit mode,
regardless of how the editing was initiated. In full edit mode pressing cursor keys don't finish editing.
Defaults to true.
The cell-type attribute takes any of the following enumerated values:
Cell
Defines a regular (data) cell template. Must be a child of the WjFlexGridColumn directive. For example, this cell template shows flags in the Country column's cells:
<wj-flex-grid-column header="Country" binding="country">
<wj-flex-grid-cell-template cell-type="Cell">
<img ng-src="resources/{{$item.country}}.png" />
{{$item.country}}
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
For a hierarchical FlexGrid (that is, one with the childItemsPath property specified), if no Group template is provided, non-header cells in group rows in this Column also use this template.
CellEdit
Defines a template for a cell in edit mode. Must be a child of the WjFlexGridColumn directive. This cell type has an additional $value property available for binding. It contains the original cell value before editing, and the updated value after editing. For example, here is a template that uses the Wijmo InputNumber control as an editor for the "Sales" column:
<wj-flex-grid-column header="Sales" binding="sales">
<wj-flex-grid-cell-template cell-type="CellEdit">
<wj-input-number value="$value" step="1"></wj-input-number>
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
ColumnHeader
Defines a template for a column header cell. Must be a child of the WjFlexGridColumn directive. For example, this template adds an image to the header of the "Country" column:
<wj-flex-grid-column header="Country" binding="country">
<wj-flex-grid-cell-template cell-type="ColumnHeader">
<img ng-src="resources/globe.png" />
{{$col.header}}
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
RowHeader
Defines a template for a row header cell. Must be a child of the WjFlexGrid directive. For example, this template shows row indices in the row headers:
<wj-flex-grid items-source="data">
<wj-flex-grid-cell-template cell-type="RowHeader">
{{$row.index}}
</wj-flex-grid-cell-template>
</wj-flex-grid>
Note that this template is applied to a row header cell, even if it is in a row that is in edit mode. In order to provide an edit-mode version of a row header cell with alternate content, define the RowHeaderEdit template.
RowHeaderEdit
Defines a template for a row header cell in edit mode. Must be a child of the WjFlexGrid directive. For example, this template shows dots in the header of rows being edited:
<wj-flex-grid items-source="data">
<wj-flex-grid-cell-template cell-type="RowHeaderEdit">
...
</wj-flex-grid-cell-template>
</wj-flex-grid>
To add the standard edit-mode indicator to cells where the RowHeader template applies, use the following RowHeaderEdit template:
<wj-flex-grid items-source="data">
<wj-flex-grid-cell-template cell-type="RowHeaderEdit">
{{✎}}
</wj-flex-grid-cell-template>
</wj-flex-grid>
TopLeft
Defines a template for the top left cell. Must be a child of the WjFlexGrid directive. For example, this template shows a down/right glyph in the top-left cell of the grid:
<wj-flex-grid items-source="data">
<wj-flex-grid-cell-template cell-type="TopLeft">
<span class="wj-glyph-down-right"></span>
</wj-flex-grid-cell-template>
</wj-flex-grid>
GroupHeader
Defines a template for a group header cell in a GroupRow, Must be a child of the WjFlexGridColumn directive.
The $row variable contains an instance of the GroupRow class. If the grouping comes from the a CollectionView, the $item variable references the CollectionViewGroup object.
For example, this template uses a checkbox element as an expand/collapse toggle:
<wj-flex-grid-column header="Country" binding="country">
<wj-flex-grid-cell-template cell-type="GroupHeader">
<input type="checkbox" ng-model="$row.isCollapsed"/>
{{$item.name}} ({{$item.items.length}} items)
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
Group
Defines a template for a regular cell (not a group header) in a GroupRow. Must be a child of the WjFlexGridColumn directive. This cell type has an additional $value varible available for binding. In cases where columns have the aggregate property specified, it contains the unformatted aggregate value.
For example, this template shows an aggregate's value and kind for group row cells in the "Sales" column:
<wj-flex-grid-column header="Sales" binding="sales" aggregate="Avg">
<wj-flex-grid-cell-template cell-type="Group">
Average: {{$value | number:2}}
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
ColumnFooter
Defines a template for a regular cell in a columnFooters panel. Must be a child of the WjFlexGridColumn directive. This cell type has an additional $value property available for binding that contains a cell value.
For example, this template shows aggregate's value and kind for a footer cell in the "Sales" column:
<wj-flex-grid-column header="Sales" binding="sales" aggregate="Avg">
<wj-flex-grid-cell-template cell-type="ColumnFooter">
Average: {{$value | number:2}}
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
BottomLeft
Defines a template for the bottom left cells (at the intersection of the row header and column footer cells). Must be a child of the WjFlexGrid directive. For example, this template shows a sigma glyph in the bottom-left cell of the grid:
<wj-flex-grid items-source="data"> <wj-flex-grid-cell-template cell-type="BottomLeft"> Σ </wj-flex-grid-cell-template> </wj-flex-grid>
AngularJS directive for the Column object.
The wj-flex-grid-column directive must be contained in a WjFlexGrid directive. It supports the following attributes:
@ The Aggregate object to display in
the group header rows for this column.@ The string value that sets the horizontal
alignment of items in the column to left, right, or center.@ The value indicating whether the user can move
the column to a new position with the mouse.@ The value indicating whether the user can sort
the column by clicking its header.@ The value indicating whether the user can
resize the column with the mouse.@ The value indicating whether the user can merge
cells in the column.@ The name of the property to which the column is
bound.@ The name of a CSS class to use when
rendering the column.= The DataMap object to use to convert raw
values into display values for the column.@ The enumerated DataType value that indicates
the type of value stored in the column.@ The format string to use to convert raw values
into display values for the column (see Globalize).@ The string to display in the column header.@ The type attribute to specify the input element
used to edit values in the column. The default is "tel" for numeric
columns, and "text" for all other non-Boolean columns.@ The value indicating whether cells in the column
contain HTML content rather than plain text.@ The value indicating whether the user is prevented
from editing values in the column.@ The value indicating whether the column is selected.@ The mask string used to edit values in the
column.@ The maximum width for the column.@ The minimum width for the column.@ The column name. You can use it to retrieve the
column.@ The value indicating whether the column must contain
non-null values.@ The value indicating whether to show drop-down buttons
for editing based on the column's DataMap.@ The value indicating whether the column is visible.@ The width of the column in pixels or as a
star value.@ The value indicating whether cells in the column wrap
their content.Any html content within the wj-flex-grid-column directive is treated as a template for the cells in that column. The template is applied only to regular cells. If you wish to apply templates to specific cell types such as column or group headers, then please see the WjFlexGridCellTemplate directive.
The following example creates two columns with a template and a conditional style:
The wj-flex-grid-column directive may contain WjFlexGridCellTemplate child directives.
AngularJS directive for FlexGrid DetailRow templates.
The wj-flex-grid-detail directive must be contained in a wj-flex-grid directive.
The wj-flex-grid-detail directive represents a FlexGridDetailProvider object that maintains detail rows visibility, with detail rows content defined as an arbitrary HTML fragment within the directive tag. The fragment may contain AngularJS bindings and directives. In addition to any properties available in a controller, the local $row and $item template variables can be used in AngularJS bindings that refer to the detail row's parent Row and Row.dataItem objects. For example:
<p>Here is a detail row with a nested FlexGrid:</p>
<wj-flex-grid
items-source="categories">
<wj-flex-grid-column header="Name" binding="CategoryName"></wj-flex-grid-column>
<wj-flex-grid-column header="Description" binding="Description" width="*"></wj-flex-grid-column>
<wj-flex-grid-detail max-height="250" detail-visibility-mode="detailMode">
<wj-flex-grid
items-source="getProducts($item.CategoryID)"
headers-visibility="Column">
</wj-flex-grid>
</wj-flex-grid-detail>
</wj-flex-grid>
A reference to a FlexGridDetailProvider object represented by the wj-flex-grid-detail directive can be retrieved in a usual way by binding to the directive's control property. This makes all the API provided by FlexGridDetailProvider available for usage in the template, giving you total control over the user experience. The following example adds a custom show/hide toggle to the Name column cells, and a Hide Detail button to the detail row. These elements call the FlexGridDetailProvider, hideDetail and showDetail methods in their ng-click bindings to implement the custom show/hide logic:
<p>Here is a FlexGrid with custom show/hide detail elements:</p>
<wj-flex-grid
items-source="categories"
headers-visibility="Column"
selection-mode="Row">
<wj-flex-grid-column header="Name" binding="CategoryName" is-read-only="true" width="200">
<img ng-show="dp.isDetailVisible($row)" ng-click="dp.hideDetail($row)" src="resources/hide.png" />
<img ng-hide="dp.isDetailVisible($row)" ng-click="dp.showDetail($row, true)" src="resources/show.png" />
{{$item.CategoryName}}
</wj-flex-grid-column>
<wj-flex-grid-column header="Description" binding="Description" width="2*"></wj-flex-grid-column>
<wj-flex-grid-detail control="dp" detail-visibility-mode="Code">
<div style="padding:12px;background-color:#cee6f7">
ID: <b>{{$item.CategoryID}}</b><br />
Name: <b>{{$item.CategoryName}}</b><br />
Description: <b>{{$item.Description}}</b><br />
<button class="btn btn-default" ng-click="dp.hideDetail($row)">Hide Detail</button>
</div>
</wj-flex-grid-detail>
</wj-flex-grid>
The wj-flex-grid-detail directive supports the following attributes:
= A reference to the FlexGridDetailProvider object
created by this directive.@A DetailVisibilityMode value that determines when
to display the row details.@The maximum height of the detail rows, in pixels.=The callback function that determines whether a row
has details.AngularJS directive for the FlexGridFilter object.
The wj-flex-grid-filter directive must be contained in a WjFlexGrid directive. For example:
<p>Here is a FlexGrid control with column filters:</p>
<wj-flex-grid items-source="data">
<wj-flex-grid-filter filter-columns="['country', 'expenses']"></wj-flex-grid-filter>
<wj-flex-grid-column
header="Country"
binding="country">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Sales"
binding="sales">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Expenses"
binding="expenses">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Downloads"
binding="downloads">
</wj-flex-grid-column>
</wj-flex-grid>
The wj-flex-grid-filter directive supports the following attributes:
= An array containing the names or bindings of the columns
to filter.@ The value indicating whether filter editing buttons
appear in the grid's column headers.& Handler for the filterChanging event.& Handler for the filterChanged event.& Handler for the filterApplied event.AngularJS directive for the FlexPie control.
= An array or ICollectionView
object that contains data for the chart.@ The name of the property that
contains item values.@ The name of the property that
contains item names.@ The text to display in the chart footer (plain
text).= The style to apply to the chart footer.@ The text to display in the chart header (plain
text).= The style to apply to the chart header.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The size of the hole inside the
pie, measured as a fraction of the pie radius.@ A value indicating whether to use animation
to move selected items to the selectedItemPosition.= The formatter function that customizes the
appearance of data points.@ The extent to which pie slices are pulled
out from the center, as a fraction of the pie radius.= An array that contains the default colors used for
displaying pie slices.= The number of pixels of space to leave between the
edges of the control and the plot area, or CSS-style margins.@ A value indicating whether to draw pie
slices in a counter-clockwise direction.@ The starting angle for pie slices,
measured clockwise from the 9 o'clock position.@ The extent to which the selected pie slice is
pulled out from the center, as a fraction of the pie radius.@ The Position value indicating where to display
the selected slice.@ The SelectionMode value indicating whether or what is
selected when the user clicks a series.@ The value to display in the
ChartTooltip content property.& The gotFocus event handler.& The lostFocus event handler.& The rendering event handler.& The rendered event handler.The wj-flex-pie directive may contain the following child directives: WjFlexChartLegend and WjFlexPieDataLabel.
AngularJS directive for the FlexPie PieDataLabel object.
The wj-flex-pie-data-label directive must be contained in a WjFlexPie directive. It supports the following attributes:
= A string or function that gets or sets the content of the data labels.@ Gets or sets a value indicating whether the data labels have borders.@ The PieLabelPosition value indicating the position of the data labels.AngularJS directive for the FlexRadar control.
Use the wj-flex-radar directive to add radar charts to your AngularJS applications. Note that directive and parameter names must be formatted using lower-case letters with dashes instead of camel case.
The wj-flex-radar directive supports the following attributes:
@ The name of the property that contains Y
values for the chart. You can override this at the series level.@ The name of the property that contains X
values for the chart. You can override this at the series level.@ The default chart type to use in rendering series
objects. You can override this at the series level. See RadarChartType.= A reference to the FlexRadar control
that this directive creates.@ The text to display in the chart footer (plain
text).= The style to apply to the chart footer.@ The text to display in the chart header (plain
text).= The style to apply to the chart header.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The value indicating whether to interpolate or
leave gaps when there are null values in the data.= The formatter function that customizes the
appearance of data points.= An array or ICollectionView object that contains
the data used to create the chart.@ The value indicating whether clicking legend items
toggles series visibility.= Chart options that only apply to certain
chart types.= An array that contains the default colors used for
displaying each series.= The number of pixels of space to leave between the
edges of the control and the plot area, or CSS-style margins.@ The Stacking value indicating whether or how series
objects are stacked or plotted independently.@ The reversed value indicating whether angles are reversed
(counter-clockwise).@ The startAngle value indicating the starting angle for the radar in degrees.@ The totalAngle value indicating the total angle for the radar in degrees.@ The size of the symbols used to render data points in Scatter,
LineSymbols, and SplineSymbols charts, in pixels. You can override
this at the series level.@ The value to display in the
ChartTooltip content property.& The rendering event handler.& The rendered event handler.& The seriesVisibilityChanged event handler.The wj-flex-radar directive may contain the following child directives: WjFlexChartAxis, WjFlexRadarSeries, WjFlexChartLegend and WjFlexChartDataLabel.
AngularJS directive for the FlexRadar FlexRadarAxis Axis object.
The wj-flex-radar-axis directive must be contained in a WjFlexRadar directive. It supports the following attributes:
@ Defines the FlexChart property name,
axis-x or axis-y, to initialize with the directive.@ The value indicating whether the axis line is visible.@ Gets or sets the comma-separated property names for
the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents
the corresponding axis label. The default value is 'value,text'.@ The format string used for the axis labels
(see Globalize).= The formatter function that customizes the
appearance of axis labels.= The items source for the axis labels.@ The value indicating whether the axis labels are visible.@ The rotation angle of axis labels in degrees.@ The alignment of axis labels.@ The padding of axis labels.@ The value indicating whether the axis includes grid lines.@ Defines the appearance of tick marks on the axis
(see TickMark).@ The number of units between axis labels.@ The minimum value shown on the axis.@ The maximum value shown on the axis.@ The value indicating whether the axis includes minor grid lines.@ Defines the appearance of minor tick marks on the axis
(see TickMark).@ The number of units between minor axis ticks.@ The axis origin.@ The OverlappingLabels value indicating how to handle the overlapping axis labels.@ The Position value indicating the position of the axis.@ The title text shown next to the axis.AngularJS directive for the FinancialChart FinancialSeries object.
The wj-financial-chart-series directive must be contained in a WjFinancialChart directive. It supports the following attributes:
@ X-axis for the series.@ Y-axis for the series.@ The name of the property that contains Y values for the
series. This value overrides any binding set for the chart.@ The name of the property that contains X values for the
series. This value overrides any binding set for the chart.@ The chart type to use in rendering objects for this series
objects. This value overrides the default chart type set on the chart. See
FinancialChartType.@ The CSS class to use for the series.= An array or ICollectionView object that contains
data for this series.@ The name of the series to show in the legend.= The series style. Use ng-attr-style to specify the series
style object as an object. See the section on ngAttr attribute bindings in
AngularJS Creating Custom Directives and the
FlexChart 101 Styling Series sample for more information.= The series alternative style.@ The shape of marker to use for the series. This value
overrides the default marker set on the chart. See Marker.@ The size of the symbols used to render data points in this
series for Scatter, LineSymbols, and SplineSymbols charts, in pixels.
This value overrides any setting at the chart level.= The style of the symbols used to render data
points in this series for Scatter, LineSymbols, and SplineSymbols charts.
This value overrides any setting at the chart level.= The SeriesVisibility value indicating whether and where to
display the series.In most cases, the wj-financial-chart-series specifies the name and binding properties only. The remaining values are inherited from the parent wj-financial-chart directive.
AngularJS directive for the FlexSheet control.
Use the wj-flex-sheet directive to add FlexSheet controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a FlexSheet control with one bound and two unbound sheets:</p> <wj-flex-sheet> <wj-sheet name="Country" items-source="ctx.data"></wj-sheet> <wj-sheet name="Report" row-count="25" column-count="13"></wj-sheet> <wj-sheet name="Formulas" row-count="310" column-count="10"></wj-sheet> </wj-flex-sheet>
The wj-flex-sheet directive extends WjFlexGrid with the following attributes:
= A reference to the FlexSheet control created by this directive.@ A value indicating whether the sheet tabs holder is visible. = Gets or sets the index of the current sheet in the FlexSheet. & Handler for the draggingRowColumn event.& Handler for the droppingRowColumn event.& Handler for the selectedSheetChanged event.The wj-flex-sheet directive may contain WjSheet child directives.
AngularJS directive for the GroupPanel control.
The wj-group-panel directive connects to the FlexGrid control via the grid property. For example:
<p>Here is a FlexGrid control with GroupPanel:</p>
<wj-group-panel grid="flex" placeholder="Drag columns here to create groups."></wj-group-panel>
<wj-flex-grid control="flex" items-source="data">
<wj-flex-grid-column
header="Country"
binding="country">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Sales"
binding="sales">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Expenses"
binding="expenses">
</wj-flex-grid-column>
<wj-flex-grid-column
header="Downloads"
binding="downloads">
</wj-flex-grid-column>
</wj-flex-grid>
The wj-group-panel directive supports the following attributes:
@The FlexGrid that is connected to this GroupPanel.@A value indicating whether the panel hides grouped columns
in the owner grid.@The maximum number of groups allowed.@A string to display in the control when it
contains no groups.& Handler for the gotFocus event.& Handler for the lostFocus event.AngularJS directive for the InputColor control.
Use the wj-input-color directive to add InputColor controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputColor control:</p> <wj-input-color value="theColor" show-alpha-channel="false"> </wj-input-color>
The wj-input-color directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputColor control created by this directive.@ A value indicating whether the drop-down is currently visible.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ A value indicating whether the drop-down displays the alpha channel (transparency) editor.@ The string to show as a hint when the control is empty.@ A value indicating whether to prevent null values.@ A value indicating whether the control displays a drop-down button.= The text to show in the control.= The color being edited.& The gotFocus event handler.& The lostFocus event handler.& The isDroppedDownChanging event handler.& The isDroppedDownChanged event handler.& The textChanged event handler.& The valueChanged event handler.AngularJS directive for the InputDate control.
Use the wj-input-date directive to add InputDate controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputDate control:</p> <wj-input-date value="theDate" format="M/d/yyyy"> </wj-input-date>
The example below shows a Date value (that includes date and time information) using an InputDate and an InputTime control. Notice how both controls are bound to the same controller variable, and each edits the appropriate information (either date or time). The example also shows a Calendar control that can be used to select the date with a single click.
The wj-input-date directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputDate control created by this directive.@ The format used to display the date being edited (see Globalize).@ The mask used to validate the input as the user types (see InputMask).@ A value indicating whether the drop-down is currently visible.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ The latest valid date (a string in the format "yyyy-MM-dd").@ The earliest valid date (a string in the format "yyyy-MM-dd").@ The string to show as a hint when the control is empty.@ A value indicating whether to prevent null values.@ A value indicating whether the control displays a drop-down button.= The text to show in the control.= The date being edited.& The gotFocus event handler.& The lostFocus event handler.& The isDroppedDownChanging event handler.& The isDroppedDownChanged event handler.& The textChanged event handler.& The valueChanged event handler.If provided, the min and max attributes are strings in the format "yyyy-MM-dd". Technically, you can use any full date as defined in the W3C [RFC 3339], which is also the format used with regular HTML5 input elements.
AngularJS directive for the InputDateTime control.
Use the wj-input-date-time directive to add InputDateTime controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputDateTime control:</p> <wj-input-date-time value="theDate" format="M/d/yyyy"> </wj-input-date-time>
The wj-input-date-time directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputDate control created by this directive.@ The format used to display the date being edited (see Globalize).@ The mask used to validate the input as the user types (see InputMask).@ A value indicating whether the drop-down is currently visible.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ The latest valid date (a string in the format "yyyy-MM-dd").@ The earliest valid date (a string in the format "yyyy-MM-dd").@ The string to show as a hint when the control is empty.@ A value indicating whether to prevent null values.@ A value indicating whether the control displays a drop-down button.= The text to show in the control.@ The earliest valid time (a string in the format "hh:mm").@ The latest valid time (a string in the format "hh:mm").@ The number of minutes between entries in the drop-down list.@ The format sting used to show values in the time drop-down list.= The date being edited.& The gotFocus event handler.& The lostFocus event handler.& The isDroppedDownChanging event handler.& The isDroppedDownChanged event handler.& The textChanged event handler.& The valueChanged event handler.AngularJS directive for the InputMask control.
Use the wj-input-mask directive to add InputMask controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputMask control:</p> <wj-input-mask mask="99/99/99" mask-placeholder="*"> </wj-input-mask>
The wj-input-mask directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputNumber control created by this directive.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ The string mask used to format the value as the user types.@ A character used to show input locations within the mask.@ The string to show as a hint when the control is empty.= The string being edited.= The string being edited, excluding literal and prompt characters.& The gotFocus event handler.& The lostFocus event handler.& The valueChanged event handler.AngularJS directive for the InputNumber control.
Use the wj-input-number directive to add InputNumber controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputNumber control:</p> <wj-input-number value="theNumber" min="0" max="10" format="n0" placeholder="number between zero and ten"> </wj-input-number>
The example below creates several InputNumber controls and shows the effect of using different formats, ranges, and step values.
The wj-input-number directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputNumber control created by this directive.@ The format used to display the number (see Globalize).@ The "type" attribute of the HTML input element hosted by the control.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ The largest valid number.@ The smallest valid number.@ The string to show as a hint when the control is empty.@ A value indicating whether to prevent null values.@ A value indicating whether to display spinner buttons to change the value by step units.@ The amount to add or subtract to the value when the user clicks the spinner buttons.= The text to show in the control.= The number being edited.& The gotFocus event handler.& The lostFocus event handler.& The textChanged event handler.& The valueChanged event handler.AngularJS directive for the InputTime control.
Use the wj-input-time directive to add InputTime controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is an InputTime control:</p> <wj-input-time value="theDate" format="h:mm tt" min="09:00" max="17:00" step="15"> </wj-input-time>
This example edits a Date value (that includes date and time information) using an InputDate and an InputTime control. Notice how both controls are bound to the same controller variable, and each edits the appropriate information (either date or time). The example also shows a Calendar control that can be used to select the date with a single click.
The wj-input-time directive extends WjComboBox with the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the ng-model directive.= A reference to the InputDate control created by this directive.@ The format used to display the selected time.@ A mask used to validate the input as the user types (see InputMask).@ The earliest valid time (a string in the format "hh:mm").@ The latest valid time (a string in the format "hh:mm").@ The number of minutes between entries in the drop-down list.= The time being edited (as a Date object).& The@see: valueChanged event handler.If provided, the min and max attributes are strings in the format "hh:mm". Technically, you can use any full date as defined in the W3C [RFC 3339], which is also the format used with regular HTML5 input elements.
AngularJS directive for ListBox and Menu item templates.
The wj-item-template directive must be contained in a WjListBox or WjMenu directives.
The wj-item-template directive defines a template for items of ListBox and data-bound Menu controls. The template may contain an arbitrary HTML fragment with AngularJS bindings and directives. In addition to any properties available in a controller, the local $item, $itemIndex and $control template variables can be used in AngularJS bindings that refer to the data item, its index, and the owner control.
Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a ListBox control with an item template:</p>
<wj-list-box items-source="musicians">
<wj-item-template>
{{$itemIndex}}. <b>{{$item.name}}</b>
<br />
<img ng-src="{{$item.photo}}"/>
</wj-item-template>
</wj-list-box>AngularJS directive for the LinearGauge control.
Use the wj-linear-gauge directive to add linear gauges to your AngularJS applications. Note that directive and parameter names must be formatted in lower-case with dashes instead of camel-case. For example:
<wj-linear-gauge
value="ctx.gauge.value"
show-text="Value"
is-read-only="false">
<wj-range
wj-property="pointer"
thickness="0.2">
<wj-range
min="0"
max="33"
color="green">
</wj-range>
<wj-range
min="33"
max="66"
color="yellow">
</wj-range>
<wj-range
min="66"
max="100"
color="red">
</wj-range>
</wj-range>
</wj-linear-gauge>
The wj-linear-gauge directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the LinearGauge
control created by this directive.@ The GaugeDirection value in
which the gauge fills as the value grows.@ The format string used for displaying
the gauge values as text.@ A value indicating whether the gauge
displays a shadow effect.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value indicating whether the gauge
animates value changes.@ A value indicating whether users are
prevented from editing the value.@ The minimum value that the gauge
can display.@ The maximum value that the gauge
can display.@ The ShowText value indicating
which values display as text within the gauge.@ The amount to add or subtract to the value
property when the user presses the arrow keys.@ The thickness of the gauge, on a scale
of zero to one.= The value displayed on the gauge.& The gotFocus event handler.& The lostFocus event handler.The wj-linear-gauge directive may contain one or more WjRange directives.
AngularJS directive for the ListBox control.
Use the wj-list-box directive to add ListBox controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
b>Here is a ListBox control:</p> <wj-list-box selected-item="theCountry" items-source="countries" placeholder="country"> </wj-list-box>
The example below creates a ListBox control and binds it to a 'countries' array exposed by the controller. The value selected is bound to the 'theCountry' controller property using the selected-item attribute.
The wj-list-box directive supports the following attributes:
@ Binds the control's selectedValue property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the ListBox
control created by this directive.@ The property to use as the visual
representation of the items.@ A value indicating whether items
contain plain text or HTML.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. = A function used to customize the
values to show in the list.= An array or ICollectionView
that contains the list items.@ The maximum height of the list.= The index of the currently selected
item.= The item that is currently selected.= The value of the selected-item
obtained using the selected-value-path.@ The property used to get the
selected-value from the selected-item.& The gotFocus event handler.& The lostFocus event handler.& The itemsChanged event handler.& The selectedIndexChanged event handler.The wj-list-box directive may contain WjItemTemplate child directive.
AngularJS directive for the Menu control.
Use the wj-menu directive to add drop-down menus to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a Menu control used as a value picker:</p> <wj-menu header="Tax" value="tax"> <wj-menu-item value="0">Exempt</wj-menu-item> <wj-menu-item value=".05">5%</wj-menu-item> <wj-menu-item value=".1">10%</wj-menu-item> <wj-menu-item value=".15">15%</wj-menu-item> </wj-menu>
This example creates three Menu controls. The first is used as a value picker, the second uses a list of commands with parameters, and the third is a group of three menus handled by an itemClicked function in the controller.
The wj-menu directive extends WjComboBox with the following attributes:
@ The command to be executed when the item is clicked.@ The name of the property that contains command parameters.@ The text shown on the control.@ Whether the menu should react to clicks on its header area.@ The value of the selected wj-menu-item value property. & The itemClicked event handler.& The gotFocus event handler.& The lostFocus event handler.The wj-menu directive may contain the following child directives: WjMenuItem, WjMenuSeparator and WjItemTemplate(in case of data-bound Menu control).
AngularJS directive for menu items.
The wj-menu-item directive must be contained in a WjMenu directive. It supports the following attributes:
= The function to execute in the controller
when the item is clicked.= The parameter passed to the cmd function
when the item is clicked.= The value to select when the item is clicked
(use either this or cmd).The content displayed by the item may contain an arbitrary HTML fragment with AngularJS bindings and directives. You can also use ng-repeat and ng-if directives to populate the items in the Menu control. In addition to any properties available in a controller, the local $item, $itemIndex and $control template variables can be used in AngularJS bindings that refer to the data item, its index, and the owner control.
AngularJS directive for menu separators.
The wj-menu-item-separator directive must be contained in a WjMenu directive. It adds a non-selectable separator to the menu, and has no attributes.
AngularJS directive for the MultiAutoComplete control.
Use the wj-multi-auto-complete directive to add MultiAutoComplete controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a InputTags bound to a collection of objects:</p>
<wj-multi-auto-complete
max-selected-items="8"
items-source="ctx.items"
selected-Member-path="selected">
</wj-multi-auto-complete>
The wj-multi-auto-complete directive extends WjAutoComplete with the following attributes:
@ The maximum number of items that can be selected.@ The name of the property used to control which
item will be selected.@ An array containing the items that are currently selected.
& The selectedItemsChanged event handler.AngularJS directive for the MultiRow control.
Use the wj-multi-row directive to add MultiRow controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case.
The wj-multi-row directive extends WjFlexGrid with the following attributes:
= A reference to the MultiRow control created by this directive.@ A value defines the layout of the rows used to display each data item.@ Gets or sets a value that determines whether column headers should be
collapsed and displayed as a single row displaying the group headers.@ Gets or sets a value that determines whether the content of cells
that span multiple rows should be vertically centered.@ Gets or sets a value that determines whether the grid should
display a button in the column header panel to allow users to collapse and expand the column headers.AngularJS directive for the MultiSelect control.
Use the wj-multi-select directive to add MultiSelect controls to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a MultiSelect bound to a collection of objects:</p>
<wj-multi-select
placeholder="Select Countries"
items-source="ctx.items"
header-format="{count} countries selected"
display-Member-path="country"
checked-Member-path="selected">
</wj-multi-select>
The wj-multi-select directive extends WjComboBox with the following attributes:
@ The name of the property used to control the checkboxes placed next to each item.@ The format string used to create the header content when the control has more than maxHeaderItems items checked.= A function that gets the HTML in the control header.@ The maximum number of items to display on the control header.& The checkedItemsChanged event handler.AngularJS directive for the PdfViewer control.
Use the wj-pdf-viewer directive to add pdf viewer to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-pdf-viewer paginated="false" service-url="ctx.serviceUrl" file-path="ctx.path" report-name="ctx.reportName"> </wj-pdf-viewer;
The wj-pdf-viewer directive supports the following attributes:
@A value indicating the address of C1 Web API service. @ A value indicating full path to the document on the server.= A reference to the PdfViewer
control created by this directive. @ A value indicating whether viewer is under full screen mode. @ A value indicating the current zoom factor to
show the document pages @ A value indicating the mouse behavior.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value indicating how to show the document pages. & The pageIndexChanged event handler.& The viewModeChanged event handler.& The mouseModeChanged event handler.& The fullScreenChanged event handler.& The zoomFactorChanged event handler.& The queryLoadingData event handler.AngularJS directive for the PivotChart control.
Use the wj-pivot-chart and wj-pivot-panel directives to add pivot charts to your AngularJS applications.
Directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-pivot-panel
control="thePanel"
items-source="rawData">
</wj-pivot-panel>
<wj-pivot-chart
items-source="thePanel"
chart-type="Bar"
max-series="10"
max-points="100">
</wj-pivot-chart>
The wj-pivot-chart directive supports the following attributes:
AngularJS directive for the PivotGrid control.
Use the wj-pivot-grid and wj-pivot-panel directives to add pivot tables to your AngularJS applications.
Directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-pivot-panel
control="thePanel"
items-source="rawData">
</wj-pivot-panel>
<wj-pivot-grid
items-source="thePanel"
show-detail-on-double-click="false"
custom-context-menu="true">
</wj-pivot-grid>
The wj-pivot-grid directive extends the wj-flex-grid directive and adds support for the following attributes:
AngularJS directive for the PivotPanel control.
Use the wj-pivot-panel directive as a data source for wj-pivot-grid and wj-pivot-chart directives to add pivot tables and charts to your AngularJS applications.
Directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-pivot-panel
control="thePanel"
items-source="rawData">
</wj-pivot-panel>
<wj-pivot-grid
items-source="thePanel"
show-detail-on-double-click="false"
custom-context-menu="true">
</wj-pivot-grid>
The wj-pivot-panel directive supports the following attributes:
AngularJS directive for the Popup control.
Use the wj-popup directive to add Popup controls to your AngularJS applications.
The popup content may be specified inside the wj-popup tag, and can contain an arbitrary HTML fragment with AngularJS bindings and directives.
Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<p>Here is a Popup control triggered by a button:</p>
<button id="btn2" type="button">
Click to show Popup
</button>
<wj-popup owner="#btn2" show-trigger="Click" hide-trigger="Blur">
<h3>
Salutation
</h3>
<div class="popover-content">
Hello {{firstName}} {{lastName}}
</div>
</wj-popup>
The wj-popup directive supports the following attributes:
= A reference to the Popup control created by this directive.@ A boolean value that determines whether popups should be shown using a fade-in animation.@ A boolean value that determines whether popups should be hidden using a fade-out animation.@ A PopupTrigger value defining the action that hides the Popup.& This event occurs after the binding has finished initializing the control with attribute values.= A value indicating whether the binding has finished initializing the control with attribute values. @ A CSS selector referencing an element that controls the popup visibility.@ A PopupTrigger value defining the action that shows the Popup.@ A boolean value that determines whether the Popup should be displayed as a modal dialog.& The gotFocus event handler.& The lostFocus event handler.& The showing event handler.& The shown event handler.& The hiding event handler.& The hidden event handler.AngularJS directive for the RadialGauge control.
Use the wj-radial-gauge directive to add radial gauges to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
Here is a <b>RadialGauge</b> control:</p> <wj-radial-gauge style="height:300px" value="count" min="0" max="10" is-read-only="false"> </wj-radial-gauge>
The wj-radial-gauge directive supports the following attributes:
@ Binds the control's value property using the ng-model Angular
directive. Binding the property using the ng-model directive provides standard benefits
like validation, adding the control's state to the form instance, and so on. To redefine
properties on a control that is bound by the ng-model directive, use the wj-model-property
attribute.@ Specifies a control property that is bound to a scope using the
ng-model directive.= A reference to the RadialGauge
control created by this directive.@ A value indicating whether the gauge
scales the display to fill the host element.@ The format string used for displaying
gauge values as text.@ A value indicating whether the gauge
displays a shadow effect.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value indicating whether the gauge
animates value changes.@ A value indicating whether users are
prevented from editing the value.@ The minimum value that the gauge
can display.@ The maximum value that the gauge
can display.@ A ShowText value indicating
which values display as text within the gauge.@ The amount to add or subtract to the
value property when the user presses the arrow keys.@ The starting angle for the gauge, in
degreees, measured clockwise from the 9 o'clock position.@ The sweeping angle for the gauge in degrees
(may be positive or negative).@ The thickness of the gauge, on a scale
of zero to one.= The value displayed on the gauge.& The gotFocus event handler.& The lostFocus event handler.The wj-radial-gauge directive may contain one or more WjRange directives.
AngularJS directive for the Range object.
The wj-range directive must be contained in a WjLinearGauge, WjRadialGauge or WjBulletGraph directive. It adds the Range object to the 'ranges' array property of the parent directive. You may also initialize other Range type properties of the parent directive by specifying the property name with the wj-property attribute.
For example:
<wj-radial-gauge
min="0"
max="200"
step="20"
value="theValue"
is-read-only="false">
<wj-range
min="0"
max="100"
color="red">
</wj-range>
<wj-range
min="100"
max="200"
color="green">
</wj-range>
<wj-range
wj-property="pointer"
color="blue">
</wj-range>
</wj-radial-gauge>
The wj-range directive supports the following attributes:
@ The minimum value in the range.@ The maximum value in the range.@ The color used to display the range.@ The thickness of the range, on a scale
of zero to one.@ The name of the range.@ The name of the property to initialize
with this directive.AngularJS directive for the ReportViewer control.
Use the wj-report-viewer directive to add report viewer to your AngularJS applications. Note that directive and parameter names must be formatted in lower-case with dashes instead of camel-case. For example:
<wj-report-viewer paginated="true" service-url="ctx.serviceUrl" file-path="ctx.path" report-name="ctx.reportName"> </wj-report-viewer;
The wj-report-viewer directive supports the following attributes:
@A value indicating the address of C1 Web API service. @ A value indicating full path to the document on the server.@ For FlexReport, sets it with the
report name defined in the FlexReport definition file.
For SSRS report, please leave it as empty string. = A reference to the ReportViewer
control created by this directive. @ A value indicating whether viewer is under full screen mode. @ A value indicating the current zoom factor to
show the document pages @ A value indicating the mouse behavior.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value indicating how to show the document pages. @ A value indicating whether the content should
be represented as set of fixed sized pages.& The pageIndexChanged event handler.& The viewModeChanged event handler.& The mouseModeChanged event handler.& The fullScreenChanged event handler.& The zoomFactorChanged event handler.& The queryLoadingData event handler.AngularJS directive for the Sheet object.
The wj-sheet directive must be contained in a WjFlexSheet directive. It supports the following attributes:
@ The name of the sheet.
@ The initial number of rows in the unbound sheet.
Changes done to this attribute have no effect after the Sheet was initialized by AngularJS.
@ The initial number of columns in the unbound sheet.
Changes done to this attribute have no effect after the Sheet was initialized by AngularJS.
= The data source for the data bound sheet.
Changes done to this attribute have no effect after the Sheet was initialized by AngularJS.
@ A value indicating whether the sheet is visible.
& Handler for the nameChanged event.AngularJS directive for the Sunburst control.
= An array or string object used to generate child items in hierarchical data.AngularJS directive for the Tooltip class.
Use the wj-tooltip directive to add tooltips to elements on the page. The wj-tooltip directive supports HTML content, smart positioning, and touch.
The wj-tooltip directive is specified as a parameter added to the element that the tooltip applies to. The parameter value is the tooltip text or the id of an element that contains the text. For example:
<p wj-tooltip="#fineprint" >
Regular paragraph content...</p>
...
<div id="fineprint" style="display:none">
<h3>Important Note</h3>
<p>
Data for the current quarter is estimated
by pro-rating etc.</p>
</div>AngularJS directive for the TreeMap control.
= An array or ICollectionView
object that contains data for the chart.@ The name of the property that
contains item values.@ The name of the property that
contains item names. It should be an array or a string.@ The text to display in the chart footer (plain
text).= The style to apply to the chart footer.@ The text to display in the chart header (plain
text).= The style to apply to the chart header.& This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ The type of the TreeMap.@ A value indicating the name of the property (or properties) used to generate
child items in hierarchical data.= The maximum number of node levels to show in the current view.= An array that contains the default colors used for
displaying TreeMap items.= The number of pixels of space to leave between the
edges of the control and the plot area, or CSS-style margins.@ The value to display in the
ChartTooltip content property.@ The value to display in the
DataLabel content property.& The rendering event handler.& The rendered event handler.The wj-tree-map directive may contain the following child directives: WjFlexChartLegend and WjFlexChartDataLabel.
AngularJS directive for the TreeView control.
Use the wj-tree-view directive to add TreeView to your AngularJS applications. Note that directive and parameter names must be formatted as lower-case with dashes instead of camel-case. For example:
<wj-tree-view items-source="items" display-member-path="ctx.displayMemberPath" child-items-path="ctx.childItemsPath" is-animated="ctx.isAnimated"> <wj-tree-view;
The wj-tree-view directive supports the following attributes:
=An array that contains the TreeView items. @ A value indicating the name of the property (or properties)
that contains the child items for each node.= A reference to the TreeView
control created by this directive. @ A value indicating the name of the property (or properties)
to use as the visual representation of the nodes. @ A value indicating the name of the property (or properties) to
use as a source of images for the nodes. @ A value indicating whether whether items
are bound to plain text or HTML. & This event occurs after the binding has finished
initializing the control with attribute values.= A value indicating whether the binding has finished
initializing the control with attribute values. @ A value determines whether the TreeView should
add checkboxes to nodes and manage their state.@ A value determines if sibling nodes should be collapsed
when a node is expanded.@ A value indicating whether to use animations when expanding
or collapsing nodes.@ A value determines whether users can edit the text in the
nodes.@ A value determines whether users can drag and drop nodes
within the TreeView.@ A value determines whether to expand collapsed nodes when
the user clicks the node header.@ A value indicating the data item that is currently
selected.@ A value indicating TreeNode that is currently
selected.@ An array containing the items that are currently
checked.= A function that loads child nodes on demand.& The itemsSourceChanged event handler.& The loadingItems event handler.& The loadedItems event handler.& The itemClicked event handler.& The selectedItemChanged event handler.& The checkedItemsChanged event handler.& The isCollapsedChanging event handler.& The isCollapsedChanged event handler.& The isCheckedChanging event handler.& The isCheckedChanged event handler.& The formatItem event handler.& The dragStart event handler.& The dragOver event handler.& The drop event handler.& The dragEnd event handler.& The nodeEditStarting event handler.& The nodeEditStarted event handler.& The nodeEditEnding event handler.& The nodeEditEnded event handler.AngularJS directive for custom validations based on expressions.
The wj-validation-error directive supports both AngularJS and native HTML5 validation mechanisms. It accepts an arbitrary AngularJS expression that should return an error message string in case of the invalid input and an empty string if the input is valid.
For AngularJS validation it should be used together with the ng-model directive. In this case the wj-validation-error directive reports an error using a call to the NgModelController.$setValidity method with the wjValidationError error key , in the same way as it happens with AngularJS native and custom validation directives.
For HTML5 validation, the wj-validation-error directive sets the error state to the element using the setCustomValidity method from the HTML5 validation API. For example:
<p>HTML5 validation:</p>
<form>
<input type="password"
placeholder="Password"
name="pwd" ng-model="thePwd"
required minlength="2" />
<input type="password"
placeholder="Check Password"
name="chk" ng-model="chkPwd"
wj-validation-error="chkPwd != thePwd ? 'Passwords don\'t match' : ''" />
</form>
<p>AngularJS validation:</p>
<form name="ngForm" novalidate>
<input type="password"
placeholder="Password"
name="pwd" ng-model="thePwd"
required minlength="2" />
<input type="password"
placeholder="Check Password"
name="chk" ng-model="chkPwd"
wj-validation-error="chkPwd != thePwd" />
<div
ng-show="ngForm.chk.$error.wjValidationError && !ngForm.chk.$pristine">
Sorry, the passwords don't match.
</div>
</form>Defines the type of cell to which the template applies. This value is specified in the cell-type attribute of the WjFlexGridCellTemplate directive.
| Name | Value | Description |
|---|---|---|
| Cell | 0 | Defines a regular (data) cell. |
| CellEdit | 1 | Defines a cell in edit mode. |
| ColumnHeader | 2 | Defines a column header cell. |
| RowHeader | 3 | Defines a row header cell. |
| RowHeaderEdit | 4 | Defines a row header cell in edit mode. |
| TopLeft | 5 | Defines a top left cell. |
| GroupHeader | 6 | Defines a group header cell in a group row. |
| Group | 7 | Defines a regular cell in a group row. |
| ColumnFooter | 8 | Defines a column footer cell. |
| BottomLeft | 9 | Defines a bottom left cell (at the intersection of the row header and column footer cells). |
Contains KnockoutJS bindings for the Wijmo controls.
The bindings allow you to add Wijmo controls to KnockoutJS applications using simple markup in HTML pages.
To add a Wijmo control to a certain place in a page's markup, add the <div> element and define a binding for the control in the data-bind attribute. The binding name corresponds to the control name with a wj prefix. For example, the wjInputNumber binding represents the Wijmo InputNumber control. The binding value is an object literal containing properties corresponding to the control's read-write property and event names, with their values defining the corresponding control property values and event handlers.
The following markup creates a Wijmo InputNumber control with the value property bound to the view model's theValue property, the step property set to 1 and the inputType property set to 'text':
<div data-bind="wjInputNumber: { value: theValue, step: 1, inputType: 'text' }"></div>
<wj-input-number value="theValue" step="1" input-type="'text'"></wj-input-number>
Note that attribute values should be defined using exactly the same JavaScript expressions syntax as you use in data-bind definitions. The Wijmo for Knockout preprocessor converts such elements to the conventional data-bind form, see the Custom elements preprocessor topic for more details.
Most of the properties provide one-way binding, which means that changes in the bound observable view model property cause changes in the control property that the observable is bound to, but not vice versa. But some properties support two-way binding, which means that changes made in the control property are propagated back to an observable bound to the control property as well. Two-way bindings are used for properties that can be changed by the control itself, by user interaction with the control, or by other occurences. For example, the InputNumber control provides two-way binding for the value and text properties, which are changed by the control while a user is typing a new value. The rest of the InputNumber properties operate in the one-way binding mode.
The following example creates an InputNumber control and adds an event handler for the valueChanged event showing a dialog with a new control value.
<!-- HTML -->
<div data-bind="wjInputNumber: { value: theValue, step: 1, valueChanged: valueChangedEH }"></div>
//View Model
this.valueChangedEH = function (data, sender, args) {
alert('The new value is: ' + sender.value);
}
The same control defined using the custom element syntax:
<wj-input-number value="theValue" step="1" value-changed="valueChangedEH"></wj-input-number>
In the example below, the value property of the InputNumber control has its default value of 0 after initialization, and this same value is assigned to the view model theValue property:
<!-- HTML -->
<div data-bind="wjInputNumber: { value: theValue }"></div>
//View Model
this.theValue = ko.observable();
The following example shows the markup used to create a FlexChart with axisX and axisY properties and two series objects defined:
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: chartProps.titleX }"></div>
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisY', title: chartProps.titleY }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Downloads', binding: 'downloads' }"></div>
</div>
The same control defined using the custom element syntax:
<wj-flex-chart items-source="data" binding-x="'country'">
<wj-flex-chart-axis wj-property="'axisX'" title="chartProps.titleX"></wj-flex-chart-axis>
<wj-flex-chart-axis wj-property="'axisY'" title="chartProps.titleY"></wj-flex-chart-axis>
<wj-flex-chart-series name="'Sales'" binding"'sales'"></wj-flex-chart-series>
<wj-flex-chart-series name="'Downloads'" binding"'downloads'"></wj-flex-chart-series>
</wj-flex-chart>
<!-- HTML -->
<div data-bind="'wjFlexGrid': { itemsSource: data, control: flex }"></div>
<button data-bind="click: moveToNext">Next</button>
//View Model
this.flex = ko.observable();
this.moveToNext = function () {
this.flex().collectionView.moveCurrentToNext();
}
The following example adjusts FlexGridColumn formatting after the control fully initializes with its bindings, which guarantees that these formats are not overwritten with formats defined in the bindings:
<!-- HTML -->
<div data-bind="'wjFlexGrid': { itemsSource: dataArray, initialized: flexInitialized }">
<div data-bind="wjFlexGridColumn: { binding: 'sales', format: 'n2' }"></div>
<div data-bind="wjFlexGridColumn: { binding: 'downloads', format: 'n2' }"></div>
</div>
//View Model
this.flexInitialized = function (data, sender, args) {
var columns = sender.columns;
for (var i = 0; i < columns.length; i++) {
if (columns[i].dataType = wijmo.DataType.Number) {
columns[i].format = 'n0’;
}
}
}
To honor another attached preprocessor, the Wijmo Knockout preprocessor stores the currently registered preprocessor during initialization and delegates the work to it in cases where another processing node is not recognized as a Wijmo control element, thus organizing a preprocessor stack. But if you register another preprocessor after the Wijmo for Knockout preprocessor (that is, after the <script> reference to the wijmo.knockout.js module is executed) then you need to ensure that the other preprocessor behaves in a similar way; otherwise, the Wijmo Knockout preprocessor is disabled.
If you prefer to disable the Wijmo Knockout preprocessor, set the wijmo.disableKnockoutTags property to false before the wijmo.knockout.js module reference and after the references to the core Wijmo modules, for example:
<script src="scripts/wijmo.js"></script>
<script src="scripts/wijmo.input.js"></script>
<script>
wijmo.disableKnockoutTags = true;
</script>
<script src="scripts/wijmo.knockout.js"></script>
Note that in this case you can use only the conventional data-bind syntax for adding Wijmo controls to the page markup; the Wijmo custom elements are not recognized.
KnockoutJS binding for the AutoComplete control.
Use the wjAutoComplete binding to add AutoComplete controls to your KnockoutJS applications. For example:
<p>Here is an AutoComplete control:</p>
<div data-bind="wjAutoComplete: {
itemsSource: countries,
text: theCountry,
isEditable: false,
placeholder: 'country' }">
</div>
The wjAutoComplete binding supports all read-write properties and events of the AutoComplete control. The following properties provide two-way binding mode:
KnockoutJS binding for the BulletGraph control.
Use the wjBulletGraph binding to add BulletGraph controls to your KnockoutJS applications. For example:
<p>Here is a BulletGraph control:</p>
<div data-bind="wjBulletGraph: {
value: props.value,
min: props.min,
max: props.max,
format: props.format,
good: props.ranges.middle.max,
bad: props.ranges.middle.min,
target: props.ranges.target,
showRanges: props.showRanges }"
class="linear-gauge">
<div data-bind="wjRange: {
wjProperty: 'pointer',
thickness: props.ranges.pointerThickness }">
</div>
</div>
The wjBulletGraph binding may contain the wjRange child binding.
The wjBulletGraph binding supports all read-write properties and events of the BulletGraph control. The value property provides two-way binding mode.
KnockoutJS binding for the Calendar control.
Use the wjCalendar binding to add Calendar controls to your KnockoutJS applications. For example:
<p>Here is a Calendar control:</p>
<div
data-bind="wjCalendar: { value: theDate }">
</div>
The wjCalendar binding supports all read-write properties and events of the Calendar control. The following properties provide two-way binding mode:
KnockoutJS binding for an ICollectionView pager element.
Use the wjCollectionViewPager directive to add an element that allows users to navigate through the pages in a paged ICollectionView. For example:
Here is a CollectionViewPager:</p>
<div
data-bind="wjCollectionViewPager: { cv: myCollectionView }">
</div>
The wjCollectionViewPager directive has a single attribute:
KnockoutJS binding for the ColorPicker control.
Use the wjColorPicker binding to add ColorPicker controls to your KnockoutJS applications. For example:
<p>Here is a ColorPicker control:</p>
<div
data-bind="wjColorPicker: { value: theColor }">
</div>
The wjColorPicker binding supports all read-write properties and events of the ColorPicker control. The following properties provide two-way binding mode:
KnockoutJS binding for the ComboBox control.
Use the wjComboBox binding to add ComboBox controls to your KnockoutJS applications. For example:
<p>Here is a ComboBox control:</p>
<div data-bind="wjComboBox: {
itemsSource: countries,
text: theCountry,
isEditable: false,
placeholder: 'country' }">
</div>
The wjComboBox binding supports all read-write properties and events of the ComboBox control. The following properties provide two-way binding mode:
KnockoutJS binding for context menus.
Use the wjContextMenu binding to add context menus to elements on the page. The wjContextMenu binding is based on the wjMenu; it displays a popup menu when the user performs a context menu request on an element (usually a right-click).
The wjContextMenu binding is specified as a parameter added to the element that the context menu applies to. The parameter value is a selector for the element that contains the menu. For example:
<!-- paragraph with a context menu -->
<p data-bind="wjContextMenu: { id: '#idMenu'}" >
This paragraph has a context menu.</p>
<!-- define the context menu (hidden and with an id) -->
<div id="contextmenu" data-bind="wjMenu: { header: 'File', itemClicked: menuItemClicked}">
<span data-bind="wjMenuItem: {}">New</span>
<span data-bind="wjMenuItem: {}">open an existing file or folder</span>
<span data-bind="wjMenuItem: {}">save the current file</span>
<span data-bind="wjMenuSeparator: {}"></span>
<span data-bind="wjMenuItem: {}">exit the application</span>
</div>KnockoutJS binding for the FinancialChart control.
Use the wjFinancialChart binding to add FinancialChart controls to your KnockoutJS applications. For example:
<p>Here is a FinancialChart control:</p>
<div data-bind="wjFinancialChart: { itemsSource: data, chartType: 'Candlestick' }">
<div data-bind="wjFlexChartLegend : {
position: 'Top' }">
</div>
<div data-bind="wjFinancialChartSeries: {
name: 'close',
binding: 'high,low,open,close' }">
</div>
</div>
</div>
The wjFinancialChart binding may contain the following child bindings: wjFlexChartAxis, wjFinancialChartSeries, wjFlexChartLegend.
The wjFinancialChart binding supports all read-write properties and events of the FinancialChart control, and the additional tooltipContent property that assigns a value to the FinancialChart.tooltip.content property. The selection property provides two-way binding mode.
KnockoutJS binding for the FinancialChart FinancialSeries object.
The WjFinancialChartSeries binding must be contained in a wjFinancialChart binding.
The WjFinancialChartSeries binding supports all read-write properties and events of the FinancialSeries class. The visibility property provides two-way binding mode.
KnockoutJS binding for the FlexChart control.
Use the wjFlexChart binding to add FlexChart controls to your KnockoutJS applications. For example:
<p>Here is a FlexChart control:</p>
<div data-bind="wjFlexChart: { itemsSource: data }">
<div data-bind="wjFlexChartLegend : {
position: 'Top' }">
</div>
<div data-bind="wjFlexChartAxis: {
wjProperty: 'axisX',
title: chartProps.titleX }">
</div>
<div data-bind="wjFlexChartAxis: {
wjProperty: 'axisY',
majorUnit: 5000 }">
</div>
<div data-bind="wjFlexChartSeries: {
name: 'Sales',
binding: 'sales' }">
</div>
<div data-bind="wjFlexChartSeries: {
name: 'Expenses',
binding: 'expenses' }">
</div>
<div data-bind="wjFlexChartSeries: {
name: 'Downloads',
binding: 'downloads',
chartType: 'LineSymbols' }">
</div>
</div>
The wjFlexChart binding may contain the following child bindings: wjFlexChartAxis, wjFlexChartSeries, wjFlexChartLegend.
The wjFlexChart binding supports all read-write properties and events of the FlexChart control, and the additional tooltipContent property that assigns a value to the FlexChart.tooltip.content property. The selection property provides two-way binding mode.
KnockoutJS binding for the ChartAnimation object.
Use the wjFlexChartAnimation binding to add ChartAnimation object to your KnockoutJS applications. For example:
<p>Here is a ChartAnimation:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country',chartType:'Column' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartAnimation: { animationMode: 'Series',easing:'Swing',duration:2000 } "></div>
</div>
The wjFlexChartAnimation binding supports all read-write properties and events of the ChartAnimation class.
KnockoutJS binding for annotations.
The wjFlexChartAnnotation must be contained in a wjFlexChartAnnotationLayer binding.For example:
<p>Here is a AnnotationLayer:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartAnnotationLayer: {}">
<div data-bind="wjFlexChartAnnotation: { type: 'Rectangle', content: 'E',height:20, width:20,attachment:'DataIndex',pointIndex: 10}"></div>
<div data-bind="wjFlexChartAnnotation: { type: 'Ellipse', content: 'E',height:20, width:20,attachment:'DataIndex',pointIndex: 30}"></div>
</div>
</div>
The wjFlexChartAnnotation is used to represent all types of possible annotation shapes like Circle, Rectangle, Polygon and so on. The type of annotation shape is specified in the type attribute.
KnockoutJS binding for the AnnotationLayer object.
Use the wjFlexChartAnnotationLayer binding to add AnnotationLayer object to your KnockoutJS applications. For example:
<p>Here is a AnnotationLayer:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartAnnotationLayer: {}">
<div data-bind="wjFlexChartAnnotation: { type: 'Rectangle', content: 'E',height:20, width:20,attachment:'DataIndex',pointIndex: 10}"></div>
<div data-bind="wjFlexChartAnnotation: { type: 'Ellipse', content: 'E',height:20, width:20,attachment:'DataIndex',pointIndex: 30}"></div>
</div>
</div>
The wjFlexChartAnnotationLayer binding supports all read-write properties and events of the AnnotationLayer class.
KnockoutJS binding for the ATR object.
Use the wjFlexChartAtr binding to add ATR object to your KnockoutJS applications. For example:
<p>Here is a ATR:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartAtr: { binding: 'high,low,open,close',period:'14' }"></div>
</div>
The wjFlexChartAtr binding supports all read-write properties and events of the ATR class.
KnockoutJS binding for the FlexChart Axis object.
The wjFlexChartAxis binding must be contained in a wjFlexChart binding. Use the wjProperty attribute to specify the property (axisX or axisY) to initialize with this binding.
The wjFlexChartAxis binding supports all read-write properties and events of the Axis class.
KnockoutJS binding for the BollingerBands object.
Use the wjFlexChartBollingerBands binding to add BollingerBands object to your KnockoutJS applications. For example:
<p>Here is a BollingerBands:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartStochastic: { binding: 'high,low,open,close',kPeriod:14,dPeriod:3,smoothingPeriod: 1 }" ></div>
</div>
The wjFlexChartBollingerBands binding supports all read-write properties and events of the BollingerBands class.
KnockoutJS binding for the CCI object.
Use the wjFlexChartCci binding to add CCI object to your KnockoutJS applications. For example:
<p>Here is a CCI:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartCci: { binding: 'high,low,open,close',period:20 }"></div>
</div>
The wjFlexChartCci binding supports all read-write properties and events of the CCI class.
KnockoutJS binding for the DataPoint object. The wjFlexChartDataPoint must be contained in a wjFlexChartAnnotation. The property of the parent object where wjFlexChartDataPoint should assign a value is specified in the wjProperty attribute.
Use the wjFlexChartDataPoint binding to add DataPoint object to your KnockoutJS applications. For example:
<p>Here is a DataPoint:</p>
<div data-bind="wjFlexChartDataPoint: { wjProperty: 'point', x: 0.9, y:0.4}" ></div>
The wjFlexChartDataPoint binding supports all read-write properties and events of the DataPoint class.
KnockoutJS binding for the Envelopes object.
Use the wjFlexChartEnvelopes binding to add Envelopes object to your KnockoutJS applications. For example:
<p>Here is a Envelopes:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartEnvelopes: { binding:'close', type:'Simple', size: 0.03, period:20}" ></div>
</div>
The wjFlexChartEnvelopes binding supports all read-write properties and events of the Envelopes class.
KnockoutJS binding for the Fibonacci object.
Use the wjFlexChartFibonacci binding to add Fibonacci object to your KnockoutJS applications. For example:
<p>Here is a Fibonacci:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartFibonacci: { binding:'close', symbolSize:1, labelPosition: 'Left', uptrend: true}"></div>
</div>
The wjFlexChartFibonacci binding supports all read-write properties and events of the Fibonacci class.
KnockoutJS binding for the FibonacciArcs object.
Use the wjFlexChartFibonacciArcs binding to add FibonacciArcs object to your KnockoutJS applications. For example:
<p>Here is a FibonacciArcs:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartFibonacciArcs: { binding:'close', start:start, end: end, labelPosition: 'Top'}"></div>
</div>
The wjFlexChartFibonacciArcs binding supports all read-write properties and events of the FibonacciArcs class.
KnockoutJS binding for the FibonacciFans object.
Use the wjFlexChartFibonacciFans binding to add FibonacciFans object to your KnockoutJS applications. For example:
<p>Here is a FibonacciFans:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartFibonacciFans: { binding:'close', start:start, end: end, labelPosition: 'Top'}"></div>
</div>
The wjFlexChartFibonacciFans binding supports all read-write properties and events of the FibonacciFans class.
KnockoutJS binding for the FibonacciTimeZones object.
Use the wjFlexChartFibonacciTimeZones binding to add FibonacciTimeZones object to your KnockoutJS applications. For example:
<p>Here is a FibonacciTimeZones:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFinancialChartSeries: { bindingX: 'date', binding: 'high,low,open,close' }"></div>
<div data-bind="wjFlexChartFibonacciTimeZones: { binding:'close', startX:zStart, endX: zEnd, labelPosition: 'Right'}"></div>
</div>
The wjFlexChartFibonacciTimeZones binding supports all read-write properties and events of the FibonacciTimeZones class.
KnockoutJS binding for the ChartGestures object.
Use the wjFlexChartGestures binding to add ChartGestures controls to your KnockoutJS applications. For example:
<p>Here is a ChartGestures:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartGestures: { scaleX:0.5, posX:0.1 } "></div>
</div>
The wjFlexChartGestures binding supports all read-write properties and events of the ChartGestures class.
KnockoutJS binding for the Charts' Legend object.
The wjFlexChartLegend binding must be contained in one the following bindings: wjFlexChart, wjFlexPie.
The wjFlexChartLegend binding supports all read-write properties and events of the Legend class.
KnockoutJS binding for the LineMarker control.
Use the wjFlexChartLineMarker binding to add LineMarker controls to your KnockoutJS applications. For example:
<p>Here is a LineMarker:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Expenses', binding: 'expenses' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Downloads', binding: 'downloads' }"></div>
<div data-bind="wjFlexChartLineMarker: { interaction: 'Move', lines: 'Both' }"></div>
</div>
The wjFlexChartLineMarker binding supports all read-write properties and events of the LineMarker class.
KnockoutJS binding for the Macd object.
Use the wjFlexChartMacd binding to add Macd object to your KnockoutJS applications. For example:
<p>Here is a Macd:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartMacd: { binding: 'close',fastPeriod:12, slowPeriod: 26,smoothingPeriod: 9 }" ></div>
</div>
The wjFlexChartMacd binding supports all read-write properties and events of the Macd class.
KnockoutJS binding for the MacdHistogram object.
Use the wjFlexChartMacdHistogram binding to add MacdHistogram object to your KnockoutJS applications. For example:
<p>Here is a MacdHistogram:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="WjFlexChartMacdHistogram: { binding: 'close',fastPeriod:12, slowPeriod: 26,smoothingPeriod: 9 }" ></div>
</div>
The wjFlexChartMacdHistogram binding supports all read-write properties and events of the MacdHistogram class.
KnockoutJS binding for the MovingAverage object.
Use the wjFlexChartMovingAverage binding to add MovingAverage object to your KnockoutJS applications. For example:
<p>Here is a MovingAverage:</p>
<div data-bind="wjFlexChart: { itemsSource: trendItemsSource, bindingX: 'x' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { chartType: 'Scatter', name: 'Base Data', binding: 'y' }"></div>
<div data-bind="wjFlexChartMovingAverage: { binding: 'y', bindingX: 'x', period:2 } "></div>
</div>
The wjFlexChartMovingAverage binding supports all read-write properties and events of the MovingAverage class.
KnockoutJS binding for the ParametricFunctionSeries object.
Use the wjFlexChartParametricFunctionSeries binding to add ParametricFunctionSeries object to your KnockoutJS applications. For example:
<p>Here is a ParametricFunctionSeries:</p>
<div data-bind="wjFlexChart: { itemsSource: trendItemsSource, bindingX: 'x' }">
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartParametricFunctionSeries: { sampleCount:1000, max: max,xFunc:xFunc,yFunc:yFunc }"></div>
</div>
The wjFlexChartParametricFunctionSeries binding supports all read-write properties and events of the ParametricFunctionSeries class.
KnockoutJS binding for the PlotArea object.
Use the wjFlexChartPlotArea binding to add PlotArea object to your KnockoutJS applications. For example:
<p>Here is a PlotArea:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartPlotArea: { row:0, name:'plot1', style:{ fill: 'rgba(136,189,230,0.2)'} } "></div>
</div>
The wjFlexChartPlotArea binding supports all read-write properties and events of the PlotArea class.
KnockoutJS binding for the RangeSelector control.
Use the wjFlexChartRangeSelector binding to add RangeSelector controls to your KnockoutJS applications. For example:
<p>Here is a RangeSelector control:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Expenses', binding: 'expenses' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Downloads', binding: 'downloads' }"></div>
<div data-bind="wjFlexChartRangeSelector: { seamless: 'true',rangeChanged: rangeChanged }"></div>
</div>
The wjFlexChartRangeSelector binding supports all read-write properties and events of the RangeSelector class.
KnockoutJS binding for the RSI object.
Use the wjFlexChartRsi binding to add RSI object to your KnockoutJS applications. For example:
<p>Here is a RSI:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date', chartType:'Candlestick' }">
<div data-bind="wjFlexChartRsi: { binding: 'high,low,open,close',period:20 }"></div>
</div>
The wjFlexChartRsi binding supports all read-write properties and events of the RSI class.
KnockoutJS binding for the FlexChart Series object.
The wjFlexChartSeries binding must be contained in a wjFlexChart binding.
The wjFlexChartSeries binding supports all read-write properties and events of the Series class. The visibility property provides two-way binding mode.
KnockoutJS binding for the Stochastic object.
Use the wjFlexChartStochastic binding to add Stochastic object to your KnockoutJS applications. For example:
<p>Here is a Stochastic:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartStochastic: { binding: 'high,low,open,close',kPeriod:14,dPeriod:3,smoothingPeriod: 1 }" ></div>
</div>
The wjFlexChartStochastic binding supports all read-write properties and events of the Stochastic class.
KnockoutJS binding for the TrendLine object.
Use the wjFlexChartTrendLine binding to add TrendLine object to your KnockoutJS applications. For example:
<p>Here is a TrendLine:</p>
<div data-bind="wjFlexChart: { itemsSource: data, bindingX: 'country',chartType:'Column' }">
<div data-bind="wjFlexChartAxis: { wjProperty: 'axisX', title: 'country' }"></div>
<div data-bind="wjFlexChartSeries: { name: 'Sales', binding: 'sales' }"></div>
<div data-bind="wjFlexChartAnimation: { animationMode: 'Series',easing:'Swing',duration:2000 } "></div>
</div>
The wjFlexChartTrendLine binding supports all read-write properties and events of the TrendLine class.
KnockoutJS binding for the Waterfall object.
Use the wjFlexChartWaterfall binding to add Waterfall object to your KnockoutJS applications. For example:
<p>Here is a Waterfall:</p>
<div data-bind="wjFlexChart: { itemsSource: trendItemsSource, binding:'value',bindingX: 'name' }">
<div data-bind="wjFlexChartWaterfall: { relativeData:true, connectorLines: true, start:1000,showIntermediateTotal: true,
intermediateTotalPositions: [3, 6, 9, 12], intermediateTotalLabels: ['Q1', 'Q2', 'Q3', 'Q4'],name:'Increase,Decrease,Total'}"></div>
</div>
The wjFlexChartWaterfall binding supports all read-write properties and events of the Waterfall class.
KnockoutJS binding for the WilliamsR object.
Use the wjFlexChartWilliamsR binding to add WilliamsR object to your KnockoutJS applications. For example:
<p>Here is a WilliamsR:</p>
<div data-bind="wjFinancialChart: { itemsSource: fData, bindingX: 'date'}">
<div data-bind="wjFlexChartWilliamsR: { binding: 'high,low,open,close',period:20 }"></div>
</div>
The wjFlexChartWilliamsR binding supports all read-write properties and events of the WilliamsR class.
KnockoutJS binding for the YFunctionSeries object.
Use the wjFlexChartYFunctionSeries binding to add YFunctionSeries object to your KnockoutJS applications. For example:
<p>Here is a YFunctionSeries:</p>
<div data-bind="wjFlexChart: { itemsSource: trendItemsSource, bindingX: 'x' }">
<div data-bind="wjFlexChartYFunctionSeries: { min: 10, max: -10, sampleCount:100,func:func }"></div>
</div>
The wjFlexChartYFunctionSeries binding supports all read-write properties and events of the YFunctionSeries class.
KnockoutJS binding for the FlexGrid control.
Use the wjFlexGrid binding to add FlexGrid controls to your KnockoutJS applications. For example:
<p>Here is a FlexGrid control:</p>
<div data-bind="wjFlexGrid: { itemsSource: data }">
<div data-bind="wjFlexGridColumn: {
header: 'Country',
binding: 'country',
width: '*' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Date',
binding: 'date' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Revenue',
binding: 'amount',
format: 'n0' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Active',
binding: 'active' }">
</div>
</div>
The wjFlexGrid binding may contain wjFlexGridColumn child bindings.
The wjFlexGrid binding supports all read-write properties and events of the FlexGrid control, except for the scrollPosition, selection and columnLayout properties.
KnockoutJS binding for the FlexGrid Column object.
The wjFlexGridColumn binding must be contained in a wjFlexGrid binding. For example:
<p>Here is a FlexGrid control:</p>
<div data-bind="wjFlexGrid: { itemsSource: data }">
<div data-bind="wjFlexGridColumn: {
header: 'Country',
binding: 'country',
width: '*' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Date',
binding: 'date' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Revenue',
binding: 'amount',
format: 'n0' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Active',
binding: 'active' }">
</div>
</div>
The wjFlexGridColumn binding supports all read-write properties and events of the Column class. The isSelected property provides two-way binding mode.
In addition to regular attributes that match properties in the Column class, an element with the wjFlexGridColumn binding may contain a wjStyle binding that provides conditional formatting and an HTML fragment that is used as a cell template. Grid rows automatically stretch vertically to fit custom cell contents.
Both the wjStyle binding and the HTML fragment can use the $item observable variable in KnockoutJS bindings to refer to the item that is bound to the current row. Also available are the $row and $col observable variables containing cell row and column indexes. For example:
<div data-bind="wjFlexGridColumn: {
header: 'Symbol',
binding: 'symbol',
readOnly: true,
width: '*' }">
<a data-bind="attr: {
href: 'https://finance.yahoo.com/q?s=' + $item().symbol() },
text: $item().symbol">
</a>
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Change',
binding: 'changePercent',
format: 'p2',
width: '*'
},
wjStyle: {
color: getAmountColor($item().change) }">
</div>
These bindings create two columns. The first has a template that produces a hyperlink based on the bound item's "symbol" property. The second has a conditional style that renders values with a color determined by a function implemented in the controller.
KnockoutJS binding for the FlexGrid FlexGridFilter object.
The wjFlexGridFilter binding must be contained in a wjFlexGrid binding. For example:
<p>Here is a FlexGrid control with column filters:</p>
<div data-bind="wjFlexGrid: { itemsSource: data }">
<div data-bind="wjFlexGridFilter: { filterColumns: ['country', 'amount'] }"></div>
<div data-bind="wjFlexGridColumn: {
header: 'Country',
binding: 'country',
width: '*' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Date',
binding: 'date' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Revenue',
binding: 'amount',
format: 'n0' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Active',
binding: 'active' }">
</div>
</div>
The wjFlexGridFilter binding supports all read-write properties and events of the FlexGridFilter class.
KnockoutJS binding for the FlexPie control.
Use the wjFlexPie binding to add FlexPie controls to your KnockoutJS applications. For example:
<p>Here is a FlexPie control:</p>
<div data-bind="wjFlexPie: {
itemsSource: data,
binding: 'value',
bindingName: 'name',
header: 'Fruit By Value' }">
<div data-bind="wjFlexChartLegend : { position: 'Top' }"></div>
</div>
The wjFlexPie binding may contain the wjFlexChartLegend child binding.
The wjFlexPie binding supports all read-write properties and events of the FlexPie control.
KnockoutJS binding for the FlexSheet control.
Use the wjFlexSheet binding to add FlexSheet controls to your KnockoutJS applications.
The wjFlexSheet binding may contain wjSheet child bindings.
The wjFlexSheet binding supports all read-write properties and events of the FlexSheet control.
KnockoutJS binding for the FlexGrid GroupPanel control.
The wjGroupPanel binding should be connected to the FlexGrid control using the grid property. For example:
<p>Here is a FlexGrid control with GroupPanel:</p>
<div data-bind="wjGroupPanel: { grid: flex(), placeholder: 'Drag columns here to create groups.' }"></div>
<div data-bind="wjFlexGrid: { control: flex, itemsSource: data }">
<div data-bind="wjFlexGridColumn: {
header: 'Country',
binding: 'country',
width: '*' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Date',
binding: 'date' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Revenue',
binding: 'amount',
format: 'n0' }">
</div>
<div data-bind="wjFlexGridColumn: {
header: 'Active',
binding: 'active' }">
</div>
</div>
The wjGroupPanel binding supports all read-write properties and events of the GroupPanel class.
KnockoutJS binding for the InputColor control.
Use the wjInputColor binding to add InputColor controls to your KnockoutJS applications. For example:
<p>Here is a InputColor control:</p>
<div
data-bind="wjInputColor: { value: theColor }">
</div>
The wjInputColor binding supports all read-write properties and events of the InputColor control. The following properties provide two-way binding mode:
KnockoutJS binding for the InputDate control.
Use the wjInputDate binding to add InputDate controls to your KnockoutJS applications. For example:
<p>Here is an InputDate control:</p>
<div data-bind="wjInputDate: {
value: theDate,
format: 'M/d/yyyy' }">
</div>
The wjInputDate binding supports all read-write properties and events of the InputDate control. The following properties provide two-way binding mode:
KnockoutJS binding for the InputDateTime control.
Use the wjInputDateTime binding to add InputDateTime controls to your KnockoutJS applications.
The wjInputDateTime binding supports all read-write properties and events of the InputDateTime control.
KnockoutJS binding for the InputMask control.
Use the wjInputMask binding to add InputMask controls to your KnockoutJS applications. For example:
<p>Here is an InputMask control:</p>
<div data-bind="wjInputMask: {
mask: '99/99/99',
promptChar: '*' }">
</div>
The wjInputMask binding supports all read-write properties and events of the InputMask control. The value property provides two-way binding mode.
KnockoutJS binding for the InputNumber control.
Use the wjInputNumber binding to add InputNumber controls to your KnockoutJS applications. For example:
<p>Here is an InputNumber control:</p>
<div data-bind="wjInputNumber: {
value: theNumber,
min: 0,
max: 10,
format: 'n0',
placeholder: 'number between zero and ten' }">
</div>
The wjInputNumber binding supports all read-write properties and events of the InputNumber control. The following properties provide two-way binding mode:
KnockoutJS binding for the InputTime control.
Use the wjInputTime binding to add InputTime controls to your KnockoutJS applications. For example:
<p>Here is an InputTime control:</p>
<div data-bind="wjInputTime: {
min: new Date(2014, 8, 1, 9, 0),
max: new Date(2014, 8, 1, 17, 0),
step: 15,
format: 'h:mm tt',
value: theDate }">
</div>
The wjInputTime binding supports all read-write properties and events of the InputTime control. The following properties provide two-way binding mode:
KnockoutJS binding for the LinearGauge control.
Use the wjLinearGauge binding to add LinearGauge controls to your KnockoutJS applications. For example:
<p>Here is a LinearGauge control:</p>
<div data-bind="wjLinearGauge: {
value: props.value,
min: props.min,
max: props.max,
format: props.format,
showRanges: props.showRanges }"
<class="linear-gauge">
<div data-bind="wjRange: {
wjProperty: 'pointer',
thickness: props.ranges.pointerThickness }">
</div>
<div data-bind="wjRange: {
min: props.ranges.lower.min,
max: props.ranges.lower.max,
color: props.ranges.lower.color }">
</div>
<div data-bind="wjRange: {
min: props.ranges.middle.min,
max: props.ranges.middle.max,
color: props.ranges.middle.color }">
</div>
<div data-bind="wjRange: {
min: props.ranges.upper.min,
max: props.ranges.upper.max,
color: props.ranges.upper.color }">
</div>
</div>
The wjLinearGauge binding may contain the wjRange child binding.
The wjLinearGauge binding supports all read-write properties and events of the LinearGauge control. The value property provides two-way binding mode.
KnockoutJS binding for the ListBox control.
Use the wjListBox binding to add ListBox controls to your KnockoutJS applications. For example:
<p>Here is a ListBox control:</p>
<div data-bind="wjListBox: {
itemsSource: countries,
selectedItem: theCountry }">
</div>
The wjListBox binding supports all read-write properties and events of the ListBox control. The following properties provide two-way binding mode:
KnockoutJS binding for the Menu control.
Use the wjMenu binding to add Menu controls to your KnockoutJS applications. For example:
<p>Here is a Menu control used as a value picker:</p>
<div data-bind="wjMenu: { value: tax, header: 'Tax' }">
<span data-bind="wjMenuItem: { value: 0 }">Exempt</span>
<span data-bind="wjMenuSeparator: {}"></span>
<span data-bind="wjMenuItem: { value: .05 }">5%</span>
<span data-bind="wjMenuItem: { value: .1 }">10%</span>
<span data-bind="wjMenuItem: { value: .15 }">15%</span>
</div>
The wjMenu binding may contain the following child bindings: wjMenuItem, wjMenuSeparator.
The wjMenu binding supports all read-write properties and events of the Menu control. The following properties provide two-way binding mode:
KnockoutJS binding for menu items.
Use the wjMenuItem binding to add menu items to a Menu control. The wjMenuItem binding must be contained in a wjMenu binding. For example:
<p>Here is a Menu control with four menu items:</p>
<div data-bind="wjMenu: { value: tax, header: 'Tax' }">
<span data-bind="wjMenuItem: { value: 0 }">Exempt</span>
<span data-bind="wjMenuItem: { value: .05 }">5%</span>
<span data-bind="wjMenuItem: { value: .1 }">10%</span>
<span data-bind="wjMenuItem: { value: .15 }">15%</span>
</div>
The wjMenuItem binding supports the following attributes:
KnockoutJS binding for menu separators.
The the wjMenuSeparator adds a non-selectable separator to a Menu control, and has no attributes. It must be contained in a wjMenu binding. For example:
<p>Here is a Menu control with four menu items and one separator:</p>
<div data-bind="wjMenu: { value: tax, header: 'Tax' }">
<span data-bind="wjMenuItem: { value: 0 }">Exempt</span>
<span data-bind="wjMenuSeparator: {}"></span>
<span data-bind="wjMenuItem: { value: .05 }">5%</span>
<span data-bind="wjMenuItem: { value: .1 }">10%</span>
<span data-bind="wjMenuItem: { value: .15 }">15%</span>
</div>KnockoutJS binding for the MultiAutoComplete control.
Use the wjMultiAutoComplete binding to add MultiAutoComplete controls to your KnockoutJS applications. For example:
<p>Here is a MultiAutoComplete control:</p>
<div data-bind="MultiAutoComplete: {
itemsSource: countries,
maxSelectedItems: 4,}">
</div>
The wjMultiAutoComplete binding supports all read-write properties and events of the MultiAutoComplete control.
KnockoutJS binding for the MultiRow object. Use the wjMultiRow binding to add MultiRow controls to your KnockoutJS applications. For example: <div data-bind="wjMultiRow: { itemsSource: orders, layoutDefinition: ldThreeLines }"> </div> The wjMultiRow binding supports all read-write properties and events of the MultiRow class.
KnockoutJS binding for the MultiSelect control.
Use the wjMultiSelect binding to add MultiSelect controls to your KnockoutJS applications. For example:
<p>Here is a MultiSelect control:</p>
<div data-bind="MultiSelect: {
itemsSource: countries,
isEditable: false,
headerFormat: '{count} countries selected' }">
</div>
The wjMultiSelect binding supports all read-write properties and events of the MultiSelect control. The following properties provide two-way binding mode:
KnockoutJS binding for the PivotChart object. Use the wjPivotChart binding to add PivotChart controls to your KnockoutJS applications. For example: <div data-bind="wjPivotChart: { itemsSource: thePanel }"> </div> The wjPivotChart binding supports all read-write properties and events of the PivotChart class.
KnockoutJS binding for the PivotGrid object. Use the wjPivotGrid binding to add PivotGrid controls to your KnockoutJS applications. For example: <div data-bind="wjPivotGrid: { itemsSource: thePanel }"> </div> The wjPivotGrid binding supports all read-write properties and events of the PivotGrid class.
KnockoutJS binding for the PivotPanel object. Use the wjPivotPanel binding to add PivotPanel controls to your KnockoutJS applications. For example: <div data-bind="wjPivotPanel: { itemsSource: rawData, control: thePanel, initialized: init }"> </div> The wjPivotPanel binding supports all read-write properties and events of the PivotPanel class.
KnockoutJS binding for the Popup control.
Use the wjPopup binding to add Popup controls to your KnockoutJS applications. For example:
<p>Here is a Popup control triggered by a button:</p>
<button id="btn2" type="button">
Click to show Popup
</button>
<div class="popover" data-bind="wjPopup: {
control: popup,
owner: '#btn2',
showTrigger: 'Click',
hideTrigger: 'Click'}"
>
<h3>
Salutation
</h3>
<div class="popover-content">
Hello {{firstName}} {{lastName}}
</div>
</div>KnockoutJS binding for the RadialGauge control.
Use the wjRadialGauge binding to add RadialGauge controls to your KnockoutJS applications. For example:
<p>Here is a RadialGauge control:</p>
<div data-bind="wjRadialGauge: {
value: props.value,
min: props.min,
max: props.max,
format: props.format,
showRanges: props.showRanges }"
class="radial-gauge">
<div data-bind="wjRange: {
wjProperty: 'pointer',
thickness: props.ranges.pointerThickness }">
</div>
<div data-bind="wjRange: {
min: props.ranges.lower.min,
max: props.ranges.lower.max,
color: props.ranges.lower.color }">
</div>
<div data-bind="wjRange: {
min: props.ranges.middle.min,
max: props.ranges.middle.max,
color: props.ranges.middle.color }">
</div>
<div data-bind="wjRange: {
min: props.ranges.upper.min,
max: props.ranges.upper.max,
color: props.ranges.upper.color }">
</div>
</div>
The wjRadialGauge binding may contain the wjRange child binding.
The wjRadialGauge binding supports all read-write properties and events of the RadialGauge control. The value property provides two-way binding mode.
KnockoutJS binding for the Gauge's Range object.
The wjRange binding must be contained in one of the following bindings:
By default, this binding adds a Range object to the ranges collection of the Chart control. The wjProperty attribute allows you to specify another Chart property, for example the pointer property, to initialize with the binding.The wjRange binding supports all read-write properties and events of the Range class.
KnockoutJS binding for the FlexSheet Sheet object.
The wjSheet binding must be contained in a wjFlexSheet binding.
The wjSheet binding supports all read-write properties and events of the Sheet class.
KnockoutJS binding for conditional formatting of FlexGrid Column cells.
Use the wjStyle binding together with the wjFlexGridColumn binding to provide conditional formatting to column cells. For example:
<div data-bind="wjFlexGridColumn: {
header: 'Change',
binding: 'changePercent',
format: 'p2',
width: '*'
},
wjStyle: { color: getAmountColor($item().change) }"></div>
The wjStyle uses the same syntax as the native KnockoutJS style binding. In addition to the view model properties, the following observable variables are available in binding expressions:
KnockoutJS binding for the Tooltip class.
Use the wjTooltip binding to add tooltips to elements on the page. The wjTooltip supports HTML content, smart positioning, and touch.
The wjTooltip binding is specified on an element that the tooltip applies to. The value is the tooltip text or the id of an element that contains the text. For example:
<p data-bind="wjTooltip: '#fineprint'" >
Regular paragraph content...</p>
...
<div id="fineprint" style="display:none" >
<h3>Important Note</h3>
<p>
Data for the current quarter is estimated by pro-rating etc...</p>
</div>KnockoutJS binding for the TreeView object. Use the wjTreeView binding to add TreeView controls to your KnockoutJS applications. For example: <div data-bind="wjTreeView: { itemsSource: data displayMemberPath:'header' childItemsPath:'items' }"> </div> The wjTreeView binding supports all read-write properties and events of the TreeView class.
Basic Wijmo for Angular 2 module containing internal common services and platform options.
wijmo.angular2.directiveBase is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjBase from 'wijmo/wijmo.angular2.directiveBase'; wjBase.WjOptions.asyncBindings = false;
Exposes global options for the Wijmo for Angular 2 interop.
Indicates whether Wijmo components update binding sources of the two-way bound properties asynchronously or synchronously.
If this property is set to true (default) then changes to the Wijmo components' properties with two-way bindings (like WjInputNumber.value) will cause the component to update a binding source property asynchronously, after the current change detection cycle is completed. Otherwise, if this property is set to false, the binding source will be updated immediately. A corresponding property change event (like WjInputNumber.valueChanged) is also triggered asynchronously or synchronously depending on this property value, after the binding source was updated.
This global setting can be changed for specific instances of Wijmo components, by assigning the component's asyncBindings property with a specific boolean value.
Transition to asynchronous binding source updates has happened in Wijmo version 350. Before that version, binding sources were updated immediately after the component's property change. In some cases this could lead to the ExpressionChangedAfterItHasBeenCheckedError exception in the applications running Angular in the debug mode. For example, if your component's property value is set to 0.12345, and you two-way bind it to the value property of the WjInputNumber component with the format property set to 'n2', the WjInputNumber immediately converts this value to 0.12. This change, in turn, causes Angular to update your component property (the source of this binding), so that its value changes from 0.12345 to 0.12. If this source update is performed synchronously then the binding source property changes its value during the same change detection cycle, which is prohibited by Angular. If Angular runs in debug mode then it executes a special check after every change detection cycle, which detects this change and raises the ExpressionChangedAfterItHasBeenCheckedError exception. Asynchronous binding source updates resolve this problem, because the binding source property is updated after the current change detection cycle has finished.
If the ExpressionChangedAfterItHasBeenCheckedError is not an issue for you, and parts of you application logic are sensible to a moment when binding source update happens, you can change this functionality by setting the global asyncBindings property to false. This should be done before the first Wijmo component was instantiated by your application logic, and the best place to do it is the file where you declare the application's root NgModel. This can be done with the code like this:
import * as wjBase from 'wijmo/wijmo.angular2.directiveBase'; wjBase.WjOptions.asyncBindings = false;
Alternatively, you can change the update mode for the specific component using its own asyncBindings property. For example:
<wj-input-number [asyncBindings]="false" [(value)]="amount"></wj-input-number>
Contains Angular 2 components for the wijmo module.
wijmo.angular2.core is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjCore from 'wijmo/wijmo.angular2.core';
@Component({
directives: [wjCore.WjTooltip],
template: '<span [wjTooltip]="'Greeting'">Hello</span>',
selector: 'my-cmp',
})
export class MyCmp {
}Angular 2 directive for the Tooltip class.
Use the wjTooltip directive to add tooltips to elements on the page. The wjTooltip directive supports HTML content, smart positioning, and touch.
The wjTooltip directive is specified as a parameter added to the element that the tooltip applies to. The parameter value is the tooltip text or the id of an element that contains the text. For example:
<p [wjTooltip]="'#fineprint'" >
Regular paragraph content...</p>
...
<div id="fineprint" style="display:none">
<h3>Important Note</h3>
<p>
Data for the current quarter is estimated
by pro-rating etc.</p>
</div>This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Contains Angular 2 components for the wijmo.input module.
wijmo.angular2.input is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjInput from 'wijmo/wijmo.angular2.input';
@Component({
directives: [wjInput.WjInputNumber],
template: '<wj-input-number [(value)]="amount"></wj-input-number>',
selector: 'my-cmp',
})
export class MyCmp {
amount = 0;
}Angular 2 component for the AutoComplete control.
Use the wj-auto-complete component to add AutoComplete controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjAutoComplete component is derived from the AutoComplete control and inherits all its properties, events and methods.
constructor(element: any, options?: any): AutoComplete
Initializes a new instance of the AutoComplete class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the CSS class used to highlight any parts of the content that match the search terms.
Gets or sets the delay, in milliseconds, between when a keystroke occurs and when the search is performed.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets a function that provides list items dynamically as the user types.
The function takes three parameters:
For example:
autoComplete.itemsSourceFunction = function (query, max, callback) {
// get results from the server
var params = { query: query, max: max };
$.getJSON('companycatalog.ashx', params, function (response) {
// return results to the control
callback(response);
});
};Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display in the drop-down list.
Gets or sets the minimum input length to trigger auto-complete suggestions.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a string containing a comma-separated list of properties to use when searching for items.
By default, the AutoComplete control searches for matches against the property specified by the displayMemberPath property. The searchMemberPath property allows you to search using additional properties.
For example, the code below would cause the control to display the company name and search by company name, symbol, and country:
var ac = new wijmo.input.AutoComplete('#autoComplete', {
itemsSource: companies,
displayMemberPath: 'name',
searchMemberPath: 'symbol,country'
});Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'selectedValue'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Angular 2 component for the Calendar control.
Use the wj-calendar component to add Calendar controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjCalendar component is derived from the Calendar control and inherits all its properties, events and methods.
constructor(element: any, options?): Calendar
Initializes a new instance of the Calendar class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate Calendar controls.
Angular (EventEmitter) version of the Wijmo displayMonthChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional displayMonthChanged Wijmo event name.
Gets or sets a value that represents the first day of the week, the one displayed in the first column of the calendar.
Setting this property to null causes the calendar to use the default for the current culture. In the English culture, the first day of the week is Sunday (0); in most European cultures, the first day of the week is Monday (1).
Gets or sets the format used to display the headers above the days in month view.
The default value for this property is 'ddd'.
Gets or sets the format used to display the days in month view.
The default value for this property is 'd ' (the space after the 'd' prevents the format from being interpreted as 'd', the standard format used to represent the short date pattern).
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Gets or sets the format used to display the months in year view.
The default value for this property is 'MMM'.
Gets or sets the format used to display the year above the months in year view.
The default value for this property is 'yyyy'.
Gets or sets the format used to display the month and year above the calendar in month view.
The default value for this property is 'y'.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
calendar.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below shows weekends in a disabled state and prevents users from selecting those dates:
calendar.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the latest date that the user can select in the calendar.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can select in the calendar.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets a value indicating whether the calendar displays a month or a year.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
Gets or sets a value indicating whether the control displays the header area with the current month and navigation buttons.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onDisplayMonthChanged(e?: EventArgs): void
Raises the displayMonthChanged event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Occurs after the displayMonth property changes.
Occurs when an element representing a day in the calendar has been created.
This event can be used to format calendar items for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, the code below uses the formatItem event to disable weekends so they appear dimmed in the calendar:
// disable Sundays and Saturdays
calendar.formatItem.addHandler(function (s, e) {
var day = e.data.getDay();
if (day == 0 || day == 6) {
wijmo.addClass(e.item, 'wj-state-disabled');
}
});Angular 2 component for an ICollectionView pager element.
Use the wj-collection-view-pager component to add an element that allows users to navigate through the pages in a paged ICollectionView. For details about Angular 2 markup syntax, see Angular 2 Markup. For example:
<wj-collection-view-pager [cv]="myCollectionView"> </wj-collection-view-pager>
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the ColorPicker control.
Use the wj-color-picker component to add ColorPicker controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjColorPicker component is derived from the ColorPicker control and inherits all its properties, events and methods.
constructor(element: any, options?): ColorPicker
Initializes a new instance of the ColorPicker class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate ColorPicker controls.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets an array that contains the colors in the palette.
The palette contains ten colors, represented by an array with ten strings. The first two colors are usually white and black.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the ColorPicker allows users to edit the color's alpha channel (transparency).
Gets or sets a value indicating whether the ColorPicker shows a string representation of the current color.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Occurs when the value of the value property changes, either as a result of user actions or by assignment in code.
Angular 2 component for the ComboBox control.
Use the wj-combo-box component to add ComboBox controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjComboBox component is derived from the ComboBox control and inherits all its properties, events and methods.
The wj-combo-box component may contain a WjItemTemplate child directive.
constructor(element: any, options?): ComboBox
Initializes a new instance of the ComboBox class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'selectedValue'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Angular 2 directive for context menus.
Use the wjContextMenu directive to add context menus to elements on the page. The wjContextMenu directive is based on the wj-menu component; it displays a popup menu when the user performs a context menu request on an element (usually a right-click).
The wjContextMenu directive is specified as a parameter added to the element that the context menu applies to. The parameter value is a reference to the wj-menu component. For example:
<!-- paragraph with a context menu --> <p [wjContextMenu]="menu" > This paragraph has a context menu.</p> <!-- define the context menu (hidden and with an id) --> <wj-menu #menu style="display:none"> <wj-menu-item [cmd]="cmdOpen" [cmdParam] ="1">Open...</wj-menu-item> <wj-menu-item [cmd]="cmdSave" [cmdParam]="2">Save </wj-menu-item> <wj-menu-item [cmd]="cmdSave" [cmdParam]="3">Save As...</wj-menu-item> <wj-menu-item [cmd]="cmdNew" [cmdParam] ="4">New...</wj-menu-item> <wj-menu-separator></wj-menu-separator> <wj-menu-item [cmd]="cmdExit" [cmdParam]="5">Exit</wj-menu-item> </wj-menu >
Angular 2 component for the InputColor control.
Use the wj-input-color component to add InputColor controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputColor component is derived from the InputColor control and inherits all its properties, events and methods.
constructor(element: any, options?): InputColor
Initializes a new instance of the InputColor class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets a reference to the ColorPicker control shown in the drop-down.
Gets or sets the template used to instantiate DropDown controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets an array that contains the colors in the palette.
The palette contains ten colors, represented by an array with ten strings. The first two colors are usually white and black.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the ColorPicker allows users to edit the color's alpha channel (transparency).
Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
Occurs when the value of the value property changes, either as a result of user actions or by assignment in code.
Angular 2 component for the InputDate control.
Use the wj-input-date component to add InputDate controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputDate component is derived from the InputDate control and inherits all its properties, events and methods.
constructor(element: any, options?): InputDate
Initializes a new instance of the InputDate class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets a reference to the Calendar control shown in the drop-down box.
Gets or sets the template used to instantiate DropDown controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected date.
The format string is expressed as a .NET-style Date format string.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the drop-down calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
inputDate.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below prevents users from selecting dates that fall on weekends:
inputDate.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets a mask to use while editing.
The mask format is the same one that the InputMask control uses.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the latest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
This property affects the behavior of the drop-down calendar, but not the format used to display dates. If you set selectionMode to 'Month', you should normally set the format property to 'MMM yyyy' or some format that does not include the day. For example:
var inputDate = new wijmo.input.InputDate('#el, {
selectionMode: 'Month',
format: 'MMM yyyy'
});Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
Angular 2 component for the InputDateTime control.
Use the wj-input-date-time component to add InputDateTime controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputDateTime component is derived from the InputDateTime control and inherits all its properties, events and methods.
constructor(element: any, options?): InputDateTime
Initializes a new instance of the InputDateTime class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets a reference to the Calendar control shown in the drop-down box.
Gets or sets the template used to instantiate InputDateTime controls.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected date.
The format string is expressed as a .NET-style Date format string.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets a reference to the inner InputTime control so you can access its full object model.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function to customize dates in the drop-down calendar.
The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar.
If specified, the function takes two parameters:
For example, the code below shows weekends with a yellow background:
inputDate.itemFormatter = function(date, element) {
var day = date.getDay();
element.style.backgroundColor = day == 0 || day == 6 ? 'yellow' : '';
}Gets or sets a validator function to determine whether dates are valid for selection.
If specified, the validator function should take one parameter representing the date to be tested, and should return false if the date is invalid and should not be selectable.
For example, the code below prevents users from selecting dates that fall on weekends:
inputDate.itemValidator = function(date) {
var weekday = date.getDay();
return weekday != 0 && weekday != 6;
}Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets a mask to use while editing.
The mask format is the same one that the InputMask control uses.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the latest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the earliest date that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether users can select days, months, or no values at all.
This property affects the behavior of the drop-down calendar, but not the format used to display dates. If you set selectionMode to 'Month', you should normally set the format property to 'MMM yyyy' or some format that does not include the day. For example:
var inputDate = new wijmo.input.InputDate('#el, {
selectionMode: 'Month',
format: 'MMM yyyy'
});Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Gets or sets the format used to display times in the drop-down list.
This property does not affect the value shown in the control's input element. That value is formatted using the format property.
The format string is expressed as a .NET-style time format string.
Gets or sets the earliest time that the user can enter.
Gets or sets the number of minutes between entries in the drop-down list of times.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the text property changes.
Angular 2 component for the InputMask control.
Use the wj-input-mask component to add InputMask controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputMask component is derived from the InputMask control and inherits all its properties, events and methods.
constructor(element: any, options?): InputMask
Initializes a new instance of the InputMask class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate InputMask controls.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value indicating whether the control value must be a non-empty string.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the mask used to validate the input as the user types.
The mask is defined as a string with one or more of the masking characters listed in the InputMask topic.
Gets a value that indicates whether the mask has been completely filled.
Gets or sets the string shown as a hint when the control is empty.
Gets or sets the symbol used to show input positions in the control.
Gets or sets the raw value of the control (excluding mask literals).
The raw value of the control excludes prompt and literal characters. For example, if the mask property is set to "AA-9999" and the user enters the value "AB-1234", the rawValue property will return "AB1234", excluding the hyphen that is part of the mask.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Angular 2 component for the InputNumber control.
Use the wj-input-number component to add InputNumber controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputNumber component is derived from the InputNumber control and inherits all its properties, events and methods.
constructor(element: any, options?): InputNumber
Initializes a new instance of the InputNumber class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate InputNumber controls.
Gets or sets the format used to display the number being edited (see Globalize).
The format string is expressed as a .NET-style standard numeric format string.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value indicating whether the control value must be a number or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the largest number that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the smallest number that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether the control displays spinner buttons to increment or decrement the value (the step property must be set to a value other than zero).
Gets or sets the amount to add or subtract to the value property when the user clicks the spinner buttons.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs when the value of the text property changes.
Occurs when the value of the value property changes, either as a result of user actions or by assignment in code.
Angular 2 component for the InputTime control.
Use the wj-input-time component to add InputTime controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjInputTime component is derived from the InputTime control and inherits all its properties, events and methods.
constructor(element: any, options?): InputTime
Initializes a new instance of the InputTime class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Gets or sets the format used to display the selected time (see Globalize).
The format string is expressed as a .NET-style time format string.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets the "type" attribute of the HTML input element hosted by the control.
By default, this property is set to "tel", a value that causes mobile devices to show a numeric keypad that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In those cases, try changing the value to "number" or "text."
Note that input elements with type "number" prevent selection in Chrome and therefore is not recommended. For more details, see this link: http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets a mask to use while the user is editing.
The mask format is the same used by the InputMask control.
If specified, the mask must be compatible with the value of the format property. For example, you can use the mask '99:99 >LL' for entering short times (format 't').
Gets or sets the latest time that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the earliest time that the user can enter.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets the number of minutes between entries in the drop-down list.
The default value for this property is 15 minutes. Setting it to null, zero, or any negative value disables the drop-down.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Occurs when the value of the text property changes.
Angular 2 component for the @see: control.
The [wjItemTemplate] directive must be contained in one of the following components: WjListBox , WjMenu , WjComboBox or WjMultiSelect.
The [wjItemTemplate] directive defines a template for items of a component that it's nested in. The template may contain an arbitrary HTML fragment with Angular 2 bindings and directives. The local item, itemIndex and control template variables can be used in Angular 2 bindings that refer to the data item, its index, and the owner control. For example:
<wj-list-box style="max-height:300px;width:250px;"
[itemsSource]="musicians">
<template wjItemTemplate let-item="item" let-itemIndex="itemIndex">
{{itemIndex + 1}}. <b>{{item.name}}</b>
<div *ngIf="item.photo">
<img [src]="item.photo" height="100" />
<br />
<a href="https://www.google.com/#newwindow=1&q=The+Beatles+"
target="_blank"
style="color:red">go there!</a>
</div>
</template>
</wj-list-box>This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the ListBox control.
Use the wj-list-box component to add ListBox controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjListBox component is derived from the ListBox control and inherits all its properties, events and methods.
The wj-list-box component may contain a WjItemTemplate child directive.
constructor(element: any, options?): ListBox
Initializes a new instance of the ListBox class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets an array containing the items that are currently checked.
Angular (EventEmitter) version of the Wijmo checkedItemsChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional checkedItemsChanged Wijmo event name.
Gets or sets the name of the property used to control the CheckBoxes placed next to each item.
Use this property to create multi-select LisBoxes. When an item is checked or unchecked, the control raises the itemChecked event. Use the selectedItem property to retrieve the item that was checked or unchecked, or use the checkedItems property to retrieve the list of items that are currently checked.
Gets the ICollectionView object used as the item source.
Gets or sets the name of the property to use as the visual representation of the items.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value indicating whether items contain plain text or HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo itemChecked event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemChecked Wijmo event name.
Gets or sets a function used to customize the values shown on the list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
listBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the value or the "role" attribute added to the list items. The default value for this property is "option".
Angular (EventEmitter) version of the Wijmo itemsChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsChanged Wijmo event name.
Gets or sets the array or ICollectionView object that contains the list items.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the value of the selectedItem obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'selectedValue'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index: number): string
Gets the text displayed for the item at a given index (as plain text).
The index of the item.
getDisplayValue(index: number): string
Gets the string displayed for the item at a given index.
The string may be plain text or HTML, depending on the setting of the isContentHtml property.
The index of the item.
getItemChecked(index: number): boolean
Gets the checked state of an item on the list.
This method is applicable only on multi-select ListBoxes (see the checkedMemberPath property).
Item index.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isItemEnabled(index: number): void
Gets a value that determines whether the item at a given index is enabled.
The index of the item.
onCheckedItemsChanged(e?: EventArgs): void
Raises the checkedItemsChanged event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onItemChecked(e?: EventArgs): void
Raises the itemChecked event.
onItemsChanged(e?: EventArgs): void
Raises the itemsChanged event.
onLoadedItems(e?: EventArgs): void
Raises the loadedItems event.
onLoadingItems(e?: EventArgs): void
Raises the loadingItems event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
setItemChecked(index: number, checked: boolean): void
Sets the checked state of an item on the list.
This method is applicable only on multi-select ListBoxes (see the checkedMemberPath property).
Item index.
Item's new checked state.
showSelection(): void
Highlights the selected item and scrolls it into view.
toggleItemChecked(index: number): void
Toggles the checked state of an item on the list. This method is applicable only to multi-select ListBoxes (see the checkedMemberPath property).
Item index.
Occurs when the value of the checkedItems property changes.
Occurs when an element representing a list item has been created.
This event can be used to format list items for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
Occurs when the current item is checked or unchecked by the user.
This event is raised when the checkedMemberPath is set to the name of a property to add CheckBoxes to each item in the control.
Use the selectedItem property to retrieve the item that was checked or unchecked.
Occurs after the list items have been generated.
Occurs when the value of the selectedIndex property changes.
Angular 2 component for the Menu control.
Use the wj-menu component to add Menu controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjMenu component is derived from the Menu control and inherits all its properties, events and methods.
The wj-menu component may contain the following child components: WjMenuItem , WjMenuSeparator and WjItemTemplate.
constructor(element: any, options?): Menu
Initializes a new instance of the Menu class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the command to execute when an item is clicked.
Commands are objects that implement two methods:
You can also set commands on individual items using the commandPath property.
Gets or sets the name of the property that contains a parameter to use with the command specified by the commandPath property.
Gets or sets the name of the property that contains the command to execute when the user clicks an item.
Commands are objects that implement two methods:
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value that determines whether this Menu should act as a split button instead of a regular menu.
The difference between regular menus and split buttons is what happens when the user clicks the menu header. In regular menus, clicking the header shows or hides the menu options. In split buttons, clicking the header raises the itemClicked event and/or invokes the command associated with the last option selected by the user as if the user had picked the item from the drop-down list.
If you want to differentiate between clicks on menu items and the button part of a split button, check the value of the isDroppedDown property of the event sender. If that is true, then a menu item was clicked; if it is false, then the button was clicked.
For example, the code below implements a split button that uses the drop-down list only to change the default item/command, and triggers actions only when the button is clicked:
<-- view -->
<wj-menu is-button="true" header="Run" value="browser"
item-clicked="itemClicked(s, e)">
<wj-menu-item value="'Internet Explorer'">Internet Explorer</wj-menu-item>
<wj-menu-item value="'Chrome'">Chrome</wj-menu-item>
<wj-menu-item value="'Firefox'">Firefox</wj-menu-item>
<wj-menu-item value="'Safari'">Safari</wj-menu-item>
<wj-menu-item value="'Opera'">Opera</wj-menu-item>
</wj-menu>
// controller
$scope.browser = 'Internet Explorer';
$scope.itemClicked = function (s, e) {
// if not dropped down, click was on the button
if (!s.isDroppedDown) {
alert('running ' + $scope.browser);
}
}Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo itemClicked event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemClicked Wijmo event name.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the element that owns this Menu.
This variable is set by the wj-context-menu directive in case a single menu is used as a context menu for several different elements.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'selectedValue'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hide(): void
Hides the menu.
This method is useful if you want to hide a context menu displayed with the show method.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onItemClicked(e?: EventArgs): void
Raises the itemClicked event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
show(position?: any): void
Shows the menu at a given location.
This method is useful if you want to use the menu as a context menu, attached to one or more elements on the page. For example:
// create menu
var div = document.createElement('div');
var menu = new wijmo.input.Menu(div, {
itemsSource: 'New,Open,Save,Exit'.split(','),
itemClicked: function (s, e) {
alert('thanks for picking ' + menu.selectedIndex);
}
});
// use it as a context menu for one or more elements
var element = document.getElementById('btn');
element.addEventListener('contextmenu', function (e) {
e.preventDefault();
menu.show(e);
});An optional MouseEvent or reference element that determines the position where the menu should be displayed. If not provided, the menu is displayed at the center of the screen.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the user picks an item from the menu.
The handler can determine which item was picked by reading the event sender's selectedIndex property.
Occurs when the value of the selectedIndex property changes.
Angular 2 component for the @see: control.
The wj-menu-item component must be contained in a WjMenu component.
Use the wj-menu-item component to add controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a name of a property that this component is assigned to. Default value is 'itemsSource'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the @see: control.
The wj-menu-separator component must be contained in a WjMenu component.
Use the wj-menu-separator component to add controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a name of a property that this component is assigned to. Default value is 'itemsSource'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the MultiAutoComplete control.
Use the wj-multi-auto-complete component to add MultiAutoComplete controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjMultiAutoComplete component is derived from the MultiAutoComplete control and inherits all its properties, events and methods.
constructor(element: any, options?): MultiAutoComplete
Initializes a new instance of the MultiAutoComplete class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the CSS class used to highlight any parts of the content that match the search terms.
Gets or sets the delay, in milliseconds, between when a keystroke occurs and when the search is performed.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Gets or sets a function that provides list items dynamically as the user types.
The function takes three parameters:
For example:
autoComplete.itemsSourceFunction = function (query, max, callback) {
// get results from the server
var params = { query: query, max: max };
$.getJSON('companycatalog.ashx', params, function (response) {
// return results to the control
callback(response);
});
};Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display in the drop-down list.
Gets or sets the maximum number of items that can be selected.
Setting this property to null (the default value) allows users to pick any number of items.
Gets or sets the minimum input length to trigger auto-complete suggestions.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a string containing a comma-separated list of properties to use when searching for items.
By default, the AutoComplete control searches for matches against the property specified by the displayMemberPath property. The searchMemberPath property allows you to search using additional properties.
For example, the code below would cause the control to display the company name and search by company name, symbol, and country:
var ac = new wijmo.input.AutoComplete('#autoComplete', {
itemsSource: companies,
displayMemberPath: 'name',
searchMemberPath: 'symbol,country'
});Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets an array containing the items that are currently selected.
Angular (EventEmitter) version of the Wijmo selectedItemsChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedItemsChanged Wijmo event name.
Gets or sets the name of the property used to control which item will be selected.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Override the value for indicating control should not display a drop-down button.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'selectedItems'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onSelectedItemsChanged(e?: EventArgs): void
Raises the selectedItemsChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Occurs when the value of the selectedItems property changes.
Angular 2 component for the MultiSelect control.
Use the wj-multi-select component to add MultiSelect controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjMultiSelect component is derived from the MultiSelect control and inherits all its properties, events and methods.
The wj-multi-select component may contain a WjItemTemplate child directive.
constructor(element: any, options?): MultiSelect
Initializes a new instance of the MultiSelect class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the control should automatically expand the selection to whole words/numbers when the control is clicked.
Gets or sets an array containing the items that are currently checked.
Angular (EventEmitter) version of the Wijmo checkedItemsChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional checkedItemsChanged Wijmo event name.
Gets or sets the name of the property used to control the checkboxes placed next to each item.
Gets the ICollectionView object used as the item source.
Gets or sets the template used to instantiate DropDown controls.
Gets or sets the name of the property to use as the visual representation of the items.
Gets the drop down element shown when the isDroppedDown property is set to true.
Gets or sets a CSS class name to add to the control's drop-down element.
This property is useful when styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control.
Event that fires when items in the drop-down list are created.
You can use this event to modify the HTML in the list items. For details, see the formatItem event.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the format string used to create the header content when the control has more than maxHeaderItems items checked.
The format string may contain the '{count}' replacement string which gets replaced with the number of items currently checked. The default value for this property in the English culture is '{count:n0} items selected'.
Gets or sets a function that gets the HTML in the control header.
By default, the control header content is determined based on the placeholder, maxHeaderItems, and on the current selection.
You may customize the header content by specifying a function that returns a custom string based on whatever criteria your application requires.
Gets or sets the name of a property to use for getting the value displayed in the control's input element.
The default value for this property is null, which causes the control to display the same content in the input element as in the selected item of the drop-down list.
Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. For example, the input element could show an item's name and the drop-down list could show additional detail.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets the HTML input element hosted by the control.
Use this property in situations where you want to customize the attributes of the input element.
Gets or sets a value that indicates whether the control should use a fade-in animation when displaying the drop-down.
Gets or sets a value indicating whether the drop-down list displays items as plain text or as HTML.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets or sets a value that indicates whether the drop down is currently visible.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo isDroppedDownChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional isDroppedDownChanging Wijmo event name.
Gets or sets a value that determines whether the content of the input element should be restricted to items in the itemsSource collection.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can modify the control value using the mouse and keyboard.
Gets or sets a value that determines whether the control value must be set to a non-null value or whether it can be set to null (by deleting the content of the control).
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a function used to customize the values shown in the drop-down list. The function takes two arguments, the item index and the default text or html, and returns the new text or html to display.
If the formatting function needs a scope (i.e. a meaningful 'this' value), then remember to set the filter using the 'bind' function to specify the 'this' object. For example:
comboBox.itemFormatter = customItemFormatter.bind(this);
function customItemFormatter(index, content) {
if (this.makeItemBold(index)) {
content = '<b>' + content + '</b>';
}
return content;
}Gets or sets the array or ICollectionView object that contains the items to select from.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum height of the drop-down list.
Gets or sets the maximum width of the drop-down list.
The width of the drop-down list is also limited by the width of the control itself (that value represents the drop-down's minimum width).
Gets or sets the maximum number of items to display on the control header.
If no items are selected, the header displays the text specified by the placeholder property.
If the number of selected items is smaller than or equal to the value of the maxHeaderItems property, the selected items are shown in the header.
If the number of selected items is greater than maxHeaderItems, the header displays the selected item count instead.
Gets or sets the string shown as a hint when the control is empty.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the string to be used as a label for the "Select All" checkbox that is displayed when the showSelectAllCheckbox property is set to true.
This property is set to null by default, which causes the control to show a localized version of the string "Select All".
Gets or sets the index of the currently selected item in the drop-down list.
Angular (EventEmitter) version of the Wijmo selectedIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedIndexChanged Wijmo event name.
Gets or sets the item that is currently selected in the drop-down list.
Gets or sets the value of the selectedItem, obtained using the selectedValuePath.
Gets or sets the name of the property used to get the selectedValue from the selectedItem.
Gets or sets a value that indicates whether the control should display a drop-down button.
Gets or sets whether the control should display a "Select All" checkbox above the items to select or de-select all items.
Angular (EventEmitter) version of the Wijmo textChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional textChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'checkedItems'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDisplayText(index?: number): string
Gets the string displayed in the input element for the item at a given index (always plain text).
The index of the item to retrieve the text for.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
indexOf(text: string, fullMatch: boolean): number
Gets the index of the first item that matches a given string.
The text to search for.
Whether to look for a full match or just the start of the string.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onCheckedItemsChanged(e?: EventArgs): void
Raises the checkedItemsChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onIsDroppedDownChanged(e?: EventArgs): void
Raises the isDroppedDownChanged event.
onIsDroppedDownChanging(e: CancelEventArgs): boolean
Raises the isDroppedDownChanging event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onSelectedIndexChanged(e?: EventArgs): void
Raises the selectedIndexChanged event.
onTextChanged(e?: EventArgs): void
Raises the textChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
selectAll(): void
Sets the focus to the control and selects all its content.
Occurs when the value of the checkedItems property changes.
Occurs after the drop down is shown or hidden.
Occurs before the drop down is shown or hidden.
Occurs when the value of the selectedIndex property changes.
Angular 2 component for the Popup control.
Use the wj-popup component to add Popup controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjPopup component is derived from the Popup control and inherits all its properties, events and methods.
constructor(element: any, options?: any): Popup
Initializes a new instance of the Popup class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets or sets a value that can be used for handling the content of the Popup after it is hidden.
This property is set to null when the Popup is displayed, and it can be set in response to button click events or in the call to the hide method.
Gets or sets a value to be used as a dialogResult when the user presses the Enter key while the Popup is visible.
If the user presses Enter and the dialogResultEnter property is not null, the popup checks whether all its child elements are in a valid state. If so, the popup is closed and the dialogResult property is set to the value of the dialogResultEnter property.
Gets or sets a value that determines whether the Popup should use a fade-out animation when it is shown.
Gets or sets a value that determines whether the Popup should use a fade-out animation when it is hidden.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the actions that hide the Popup.
By default, the hideTrigger property is set to Blur, which hides the popup when it loses focus.
If you set the hideTrigger property to Click, the popup will be hidden only when the owner element is clicked.
If you set the hideTrigger property to None, the popup will be hidden only when the hide method is called.
Angular (EventEmitter) version of the Wijmo hiding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional hiding Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value that determines whether the Popup is currently visible.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets a value that determines whether the Popup should be displayed as a modal dialog.
Modal dialogs show a dark backdrop that makes the Popup stand out from other content on the page.
If you want to make a dialog truly modal, also set the hideTrigger property to None, so users won't be able to click the backdrop to dismiss the dialog. In this case, the dialog will close only if the hide method is called or if the user presses the Escape key.
Gets or sets the element that owns this Popup.
If the owner is null, the Popup behaves like a dialog. It is centered on the screen and must be shown using the show method.
Gets or sets a value that determines whether the Popup element should be removed from the DOM when the Popup is hidden, as opposed to being hidden.
This property is set to true by default.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo showing event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional showing Wijmo event name.
Angular (EventEmitter) version of the Wijmo shown event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional shown Wijmo event name.
Gets or sets the actions that show the Popup.
By default, the showTrigger property is set to Click, which causes the popup to appear when the user clicks the owner element.
If you set the showTrigger property to None, the popup will be shown only when the show method is called.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hide(dialogResult?: any): void
Hides the Popup.
Optional value assigned to the dialogResult property before closing the Popup.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onHidden(e?: EventArgs): void
Raises the hidden event.
onHiding(e: CancelEventArgs): boolean
Raises the hiding event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onShowing(e: CancelEventArgs): boolean
Raises the showing event.
onShown(e?: EventArgs): void
Raises the shown event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
show(modal?: boolean, handleResult?: Function): void
Shows the Popup.
Whether to show the popup as a modal dialog. If provided, this sets the value of the modal property.
Callback invoked when the popup is hidden. If provided, this should be a function that receives the popup as a parameter.
The handleResult callback allows callers to handle the result of modal dialogs without attaching handlers to the hidden event. For example, the code below shows a dialog used to edit the current item in a CollectionView. The edits are committed or canceled depending on the dialogResult value. For example:
$scope.editCurrentItem = function () {
$scope.data.editItem($scope.data.currentItem);
$scope.itemEditor.show(true, function (e) {
if (e.dialogResult == 'wj-hide-ok') {
$scope.data.commitEdit();
} else {
$scope.data.cancelEdit();
}
});
}Contains Angular 2 components for the wijmo.grid module.
wijmo.angular2.grid is an external TypeScript module that can be imported to your code using its ambient module name. For example:
<p>Here is a data bound FlexGrid control with four columns:</p>
<wj-flex-grid [itemsSource]="data">
<wj-flex-grid-column
[header]="'Country'"
[binding]="'country'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Sales'"
[binding]="'sales'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Expenses'"
[binding]="'expenses'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Downloads'"
[binding]="'downloads'">
</wj-flex-grid-column>
</wj-flex-grid>Angular 2 component for the FlexGrid control.
Use the wj-flex-grid component to add FlexGrid controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup. For example:
<p>Here is a data bound FlexGrid control with four columns:</p>
<wj-flex-grid [itemsSource]="data">
<wj-flex-grid-column
[header]="'Country'"
[binding]="'country'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Sales'"
[binding]="'sales'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Expenses'"
[binding]="'expenses'">
</wj-flex-grid-column>
<wj-flex-grid-column
[header]="'Downloads'"
[binding]="'downloads'">
</wj-flex-grid-column>
</wj-flex-grid>
The WjFlexGrid component is derived from the FlexGrid control and inherits all its properties, events and methods. The following properties are not available for binding in templates: scrollPosition, selection and columnLayout properties.
The wj-flex-grid component may contain the following child components: WjFlexGridDetail , WjFlexGridFilter , WjFlexGridColumn and WjFlexGridCellTemplate.
constructor(element: any, options?): FlexGrid
Initializes a new instance of the FlexGrid class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Angular (EventEmitter) version of the Wijmo autoSizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedRow Wijmo event name.
Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Angular (EventEmitter) version of the Wijmo autoSizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo beginningEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional beginningEdit Wijmo event name.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Angular (EventEmitter) version of the Wijmo cellEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo cellEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnding Wijmo event name.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets the template used to instantiate FlexGrid controls.
Angular (EventEmitter) version of the Wijmo copied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copied Wijmo event name.
Angular (EventEmitter) version of the Wijmo copying event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copying Wijmo event name.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Angular (EventEmitter) version of the Wijmo deletedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo deletingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumnOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumnOver Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRowOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowOver Wijmo event name.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanging Wijmo event name.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Angular (EventEmitter) version of the Wijmo loadedRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadedRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo loadingRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadingRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Angular (EventEmitter) version of the Wijmo pastedCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastedCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasted Wijmo event name.
Angular (EventEmitter) version of the Wijmo pastingCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastingCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasting Wijmo event name.
Angular (EventEmitter) version of the Wijmo prepareCellForEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional prepareCellForEdit Wijmo event name.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Angular (EventEmitter) version of the Wijmo resizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingRow Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo rowAdded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowAdded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnding Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarted Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarting Wijmo event name.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets or sets a Point that represents the value of the grid's scrollbars.
Angular (EventEmitter) version of the Wijmo scrollPositionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional scrollPositionChanged Wijmo event name.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo selectionChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanging Wijmo event name.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Angular (EventEmitter) version of the Wijmo sortedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo sortingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortingColumn Wijmo event name.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Angular (EventEmitter) version of the Wijmo updatedLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Angular 2 directive for the FlexGrid cell templates.
The wjFlexGridCellTemplate directive defines a template for a certain cell type in FlexGrid. The template should be defined on a <template> element and must contain a cellType attribute that specifies the CellTemplateType. Depending on the template's cell type, the <template> element with the wjFlexGridCellTemplate directive must be a child of either WjFlexGrid or WjFlexGridColumn directives.
Column-specific cell templates must be contained in wj-flex-grid-column components, and cells that are not column-specific (like row header or top left cells) must be contained in the wj-flex-grid component.
The <template> element with the wjFlexGridCellTemplate directive may contain an arbitrary HTML fragment with Angular 2 interpolation expressions and other components and directives.
Bindings in HTML fragment can use the cell local template variable containing the cell context object, with col, row, and item properties that refer to the Column, Row, and Row.dataItem objects pertaining to the cell.
For cell types like Group and CellEdit, an additional value property containing an unformatted cell value is provided. For example, here is a FlexGrid control with templates for row header cells and, regular and column header cells of the Country column:
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
@Component({
directives: [wjGrid.WjFlexGrid, wjGrid.WjFlexGridColumn, wjGrid.WjFlexGridCellTemplate],
template: `
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'RowHeader'" let-cell="cell">
{{cell.row.index}}
</template>
<template wjFlexGridCellTemplate [cellType]="'RowHeaderEdit'">
...
</template>
<wj-flex-grid-column [header]="'Country'" [binding]="'country'">
<template wjFlexGridCellTemplate [cellType]="'ColumnHeader'" let-cell="cell">
<img src="resources/globe.png" />
{{cell.col.header}}
</template>
<template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
<img src="resources/{{cell.item.country}}.png" />
{{cell.item.country}}
</template>
</wj-flex-grid-column>
<wj-flex-grid-column [header]="'Sales'" [binding]="'sales'"></wj-flex-grid-column>
</wj-flex-grid>
`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}
For more detailed information on specific cell type templates, refer to the documentation for CellTemplateType enumeration.
The wjFlexGridCellTemplate directive supports the following attributes:
The cellType attribute takes any of the following enumerated values:
Cell
Defines a regular (data) cell template. Must be a child of the WjFlexGridColumn component. For example, this cell template shows flags in the cells of Country column:
<wj-flex-grid-column [header]="'Country'" [binding]="'country'">
<template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
<img src="resources/{{cell.item.country}}.png" />
{{cell.item.country}}
</template>
</wj-flex-grid-column>
If Group template is not provided for a hierarchical FlexGrid (that is, one with the childItemsPath property specified), non-header cells in group rows of this Column also use this template.
CellEdit
Defines a template for a cell in edit mode. Must be a child of the WjFlexGridColumn component. This cell type has an additional cell.value property available for binding. It contains the original cell value before editing, and the updated value after editing. For example, here is a template that uses the Wijmo InputNumber control as an editor for the "Sales" column:
<wj-flex-grid-column [header]="'Sales'" [binding]="'sales'">
<template wjFlexGridCellTemplate [cellType]="'CellEdit'">
<wj-input-number [(value)]="cell.value" [step]="1"></wj-input-number>
</template>
</wj-flex-grid-column>
ColumnHeader
Defines a template for a column header cell. Must be a child of the WjFlexGridColumn component. For example, this template adds an image to the header of the "Country" column:
<wj-flex-grid-column [header]="'Country'" [binding]="'country'">
<template wjFlexGridCellTemplate [cellType]="'ColumnHeader'" let-cell="cell">
<img src="resources/globe.png" />
{{cell.col.header}}
</template>
</wj-flex-grid-column>
RowHeader
Defines a template for a row header cell. Must be a child of the WjFlexGrid component. For example, this template shows row indices in the row headers:
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'RowHeader'" let-cell="cell">
{{cell.row.index + 1}}
</template>
</wj-flex-grid>
Note that this template is applied to a row header cell, even if it is in a row that is in edit mode. In order to provide an edit-mode version of a row header cell with alternate content, define the RowHeaderEdit template.
RowHeaderEdit
Defines a template for a row header cell in edit mode. Must be a child of the WjFlexGrid component. For example, this template shows dots in the header of rows being edited:
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'RowHeaderEdit'">
...
</template>
</wj-flex-grid>
Use the following RowHeaderEdit template to add the standard edit-mode indicator to cells where the RowHeader template applies:
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'RowHeaderEdit'">
{{✎}}
</template>
</wj-flex-grid>
TopLeft
Defines a template for the top left cell. Must be a child of the WjFlexGrid component. For example, this template shows a down/right glyph in the top-left cell of the grid:
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'TopLeft'">
<span class="wj-glyph-down-right"></span>
</template>
</wj-flex-grid>
GroupHeader
Defines a template for a group header cell in a GroupRow, Must be a child of the WjFlexGridColumn component.
The cell.row property contains an instance of the GroupRow class. If the grouping comes from CollectionView, the cell.item property references the CollectionViewGroup object.
For example, this template uses a checkbox element as an expand/collapse toggle:
<wj-flex-grid-column [header]="'Country'" [binding]="'country'">
<template wjFlexGridCellTemplate [cellType]="'GroupHeader'" let-cell="cell">
<input type="checkbox" [(ngModel)]="cell.row.isCollapsed"/>
{{cell.item.name}} ({{cell.item.items.length}} items)
</template>
</wj-flex-grid-column>
Group
Defines a template for a regular cell (not a group header) in a GroupRow. Must be a child of the WjFlexGridColumn component. This cell type has an additional cell.value property available for binding. In cases where columns have the aggregate property specified, it contains the unformatted aggregate value.
For example, this template shows aggregate's value and kind for group row cells in the "Sales" column:
<wj-flex-grid-column [header]="'Sales'" [binding]="'sales'" [aggregate]="'Avg'">
<template wjFlexGridCellTemplate [cellType]="'Group'" let-cell="cell">
Average: {{cell.value | number:'1.0-0'}}
</template>
</wj-flex-grid-column>
ColumnFooter
Defines a template for a regular cell in a columnFooters panel. Must be a child of the WjFlexGridColumn component. This cell type has an additional cell.value property available for binding that contains a cell value.
For example, this template shows aggregate's value and kind for a footer cell in the "Sales" column:
<wj-flex-grid-column [header]="'Sales'" [binding]="'sales'" [aggregate]="'Avg'">
<template wjFlexGridCellTemplate [cellType]="'ColumnFooter'" let-cell="cell">
Average: {{cell.value | number:'1.0-0'}}
</template>
</wj-flex-grid-column>
BottomLeft
Defines a template for the bottom left cells (at the intersection of the row header and column footer cells). Must be a child of the WjFlexGrid component. For example, this template shows a sigma glyph in the bottom-left cell of the grid:
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridCellTemplate [cellType]="'BottomLeft'">
Σ
</template>
</wj-flex-grid>
NewCellTemplate
Defines a cell in a new row template. Must be a child of the WjFlexGridColumn component. Note that the cell.item property is undefined for this type of a cell. For example, this cell template shows a placeholder in the Date column's cell in the "new row" item:
<wj-flex-grid-column [header]="'Date'" [binding]="'date'">
<template wjFlexGridCellTemplate [cellType]="'NewCellTemplate'">
Enter a date here
</template>
</wj-flex-grid-column>Gets or sets a value indicating whether the cell template will increase grid's default row height to accomodate cells content. Defaults to true.
Defines the style.overflow property value for cells.
For cell edit templates, indicates whether cell editing forcibly starts in full edit mode, regardless of how the editing was initiated. In full edit mode pressing cursor keys don't finish editing. Defaults to true.
Angular 2 component for the Column control.
The wj-flex-grid-column component must be contained in a WjFlexGrid component.
Use the wj-flex-grid-column component to add Column controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexGridColumn component is derived from the Column control and inherits all its properties, events and methods.
The wj-flex-grid-column component may contain a WjFlexGridCellTemplate child directive.
constructor(options?: any): Column
Initializes a new instance of the Column class.
Initialization options for the column.
Gets or sets the Aggregate to display in the group header rows for the column.
Gets or sets the horizontal alignment of items in the column.
The default value for this property is null, which causes the grid to select the alignment automatically based on the column's dataType (numbers are right-aligned, Boolean values are centered, and other types are left-aligned).
If you want to override the default alignment, set this property to 'left', 'right', or 'center'.
Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.
Gets or sets a value that indicates whether cells in the row or column can be merged.
Gets or sets a value that indicates whether the user can resize the row or column with the mouse.
Gets or sets a value that indicates whether the user can sort the column by clicking its header.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property the column is bound to.
Gets the ICollectionView bound to this row or column.
Gets or sets a CSS class name to use when rendering non-header cells in the row or column.
Gets a string that describes the current sorting applied to the column. Possible values are '+' for ascending order, '-' for descending order, or null for unsorted columns.
Gets or sets the DataMap used to convert raw values into display values for the column.
Columns with an associated dataMap show drop-down buttons that can be used for quick editing. If you do not want to show the drop-down buttons, set the column's showDropDown property to false.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the type of value stored in the column.
Values are coerced into the proper type when editing the grid.
Gets or sets a CSS class name to add to drop-downs in this column.
The drop-down buttons are shown only if the column has a dataMap set and is editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the format string used to convert raw values into display values for the column (see Globalize).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the "type" attribute of the HTML input element used to edit values in this column.
By default, this property is set to "tel" for numeric columns, and to "text" for all other non-boolean column types. The "tel" input type causes mobile devices to show a numeric keyboard that includes a negative sign and a decimal separator.
Use this property to change the default setting if the default does not work well for the current culture, device, or application. In these cases, try setting the property to "number" or simply "text."
Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether cells in the row or column can be edited.
Gets or sets a value that determines whether values in the column are required.
By default, this property is set to null, which means values are required, but non-masked string columns may contain empty strings.
When set to true, values are required and empty strings are not allowed.
When set to false, null values and empty strings are allowed.
Gets or sets a value that indicates whether the row or column is selected.
Gets a value that indicates whether the row or column is visible and not collapsed.
This property is read-only. To change the visibility of a row or column, use the visible property instead.
Gets or sets a mask to use while editing values in this column.
The mask format is the same used by the InputMask control.
If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.
Gets or sets the maximum number of characters that the can be entered into the cell.
Set this property to null to allow entry of any number of characters.
Gets or sets the name of the column.
The column name can be used to retrieve the column using the getColumn method.
Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.
Gets the render width of the column.
The value returned takes into account the column's visibility, default size, and min and max sizes.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in this column.
The drop-down buttons are shown only if the column has a dataMap set and is editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.
Gets or sets the name of the property to use when sorting this column.
Use this property in cases where you want the sorting to be performed based on values other than the ones specified by the binding property.
Setting this property is null causes the grid to use the value of the binding property to sort the column.
Gets or sets a value that indicates whether the row or column is visible.
Gets the index of the row or column in the parent collection ignoring invisible elements (isVisible).
Gets or sets the width of the column.
Column widths may be positive numbers (sets the column width in pixels), null or negative numbers (uses the collection's default column width), or strings in the format '{number}*' (star sizing).
The star-sizing option performs a XAML-style dynamic sizing where column widths are proportional to the number before the star. For example, if a grid has three columns with widths "100", "*", and "3*", the first column will be 100 pixels wide, the second will take up 1/4th of the remaining space, and the last will take up the remaining 3/4ths of the remaining space.
Star-sizing allows you to define columns that automatically stretch to fill the width available. For example, set the width of the last column to "*" and it will automatically extend to fill the entire grid width so there's no empty space. You may also want to set the column's minWidth property to prevent the column from getting too narrow.
Gets or sets a name of a property that this component is assigned to. Default value is 'columns'.
Gets or sets a value that indicates whether cells in the row or column wrap their content.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
getAlignment(): string
Gets the actual column alignment.
Returns the value of the align property if it is not null, or selects the alignment based on the column's dataType.
getIsRequired(): boolean
Gets a value that determines whether the column is required.
Returns the value of the isRequired property if it is not null, or determines the required status based on the column's dataType.
By default, string columns are not required unless they have an associated dataMap or mask; all other data types are required.
onPropertyChanged(): void
Marks the owner list as dirty and refreshes the owner grid.
Defines the type of cell on which a template is to be applied. This value is specified in the cellType attribute of the WjFlexGridCellTemplate directive.
| Name | Value | Description |
|---|---|---|
| Cell | 0 | Defines a regular (data) cell. |
| CellEdit | 1 | Defines a cell in edit mode. |
| ColumnHeader | 2 | Defines a column header cell. |
| RowHeader | 3 | Defines a row header cell. |
| RowHeaderEdit | 4 | Defines a row header cell in edit mode. |
| TopLeft | 5 | Defines a top left cell. |
| GroupHeader | 6 | Defines a group header cell in a group row. |
| Group | 7 | Defines a regular cell in a group row. |
| NewCellTemplate | 8 | Defines a cell in a new row template. |
| ColumnFooter | 9 | Defines a column footer cell. |
| BottomLeft | 10 | Defines a bottom left cell (at the intersection of the row header and column footer cells). |
Contains Angular 2 components for the wijmo.grid.filter module.
wijmo.angular2.grid.filter is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjFilter from 'wijmo/wijmo.angular2.grid.filter';
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
@Component({
directives: [wjGrid.WjFlexGrid, wjFilter.WjFlexGridFilter],
template: `
<wj-flex-grid [itemsSource]="data">
<wj-flex-grid-filter [filterColumns]="['country', 'expenses']"></wj-flex-grid-filter>
</wj-flex-grid>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the FlexGridFilter control.
The wj-flex-grid-filter component must be contained in a WjFlexGrid component.
Use the wj-flex-grid-filter component to add FlexGridFilter controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexGridFilter component is derived from the FlexGridFilter control and inherits all its properties, events and methods.
constructor(grid: FlexGrid, options?: any): FlexGridFilter
Initializes a new instance of the FlexGridFilter class.
The FlexGrid to filter.
Initialization options for the FlexGridFilter.
Gets or sets the default filter type to use.
This value can be overridden in filters for specific columns. For example, the code below creates a filter that filters by conditions on all columns except the "ByValue" column:
var f = new wijmo.grid.filter.FlexGridFilter(flex);
f.defaultFilterType = wijmo.grid.filter.FilterType.Condition;
var col = flex.columns.getColumn('ByValue'),
cf = f.getColumnFilter(col);
cf.filterType = wijmo.grid.filter.FilterType.Value;Angular (EventEmitter) version of the Wijmo filterApplied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional filterApplied Wijmo event name.
Angular (EventEmitter) version of the Wijmo filterChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional filterChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo filterChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional filterChanging Wijmo event name.
Gets or sets an array containing the names or bindings of the columns that have filters.
Setting this property to null or to an empty array adds filters to all columns.
Gets or sets the current filter definition as a JSON string.
Gets a reference to the FlexGrid that owns this filter.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value indicating whether the FlexGridFilter adds filter editing buttons to the grid's column headers.
If you set this property to false, then you are responsible for providing a way for users to edit, clear, and apply the filters.
Gets or sets a value indicating whether the filter editor should include sort buttons.
By default, the editor shows sort buttons like Excel does. But since users can sort columns by clicking their headers, sort buttons in the filter editor may not be desirable in some circumstances.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
apply(): void
Applies the current column filters to the grid.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
editColumnFilter(col: any, ht?: HitTestInfo): void
Shows the filter editor for the given grid column.
The Column that contains the filter to edit.
A HitTestInfo object containing the range of the cell that triggered the filter display.
getColumnFilter(col: any, create?: boolean): ColumnFilter
Gets the filter for the given column.
The Column that the filter applies to (or column name or index).
Whether to create the filter if it does not exist.
onFilterApplied(e?: EventArgs): void
Raises the filterApplied event.
onFilterChanged(e: CellRangeEventArgs): void
Raises the filterChanged event.
onFilterChanging(e: CellRangeEventArgs): void
Raises the filterChanging event.
Occurs after a column filter has been edited by the user.
Use the event parameters to determine the column that owns the filter and whether changes were applied or canceled.
Occurs when a column filter is about to be edited by the user.
Use this event to customize the column filter if you want to override the default settings for the filter.
For example, the code below sets the operator used by the filter conditions to 'contains' if they are null:
filter.filterChanging.addHandler(function (s, e) {
var cf = filter.getColumnFilter(e.col);
if (!cf.valueFilter.isActive && cf.conditionFilter.condition1.operator == null) {
cf.filterType = wijmo.grid.filter.FilterType.Condition;
cf.conditionFilter.condition1.operator = wijmo.grid.filter.Operator.CT;
}
});Contains Angular 2 components for the wijmo.grid.grouppanel module.
wijmo.angular2.grid.grouppanel is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjPanel from 'wijmo/wijmo.angular2.grid.grouppanel';
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
@Component({
directives: [wjGrid.WjFlexGrid, wjPanel.WjGroupPanel],
template: `
<wj-group-panel
[grid]="flex"
[placeholder]="'Drag columns here to create groups.'">
</wj-group-panel>
<wj-flex-grid #flex [itemsSource]="data">
</wj-flex-grid>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the GroupPanel control.
Use the wj-group-panel component to add GroupPanel controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjGroupPanel component is derived from the GroupPanel control and inherits all its properties, events and methods.
constructor(element: any, options?): GroupPanel
Initializes a new instance of the GroupPanel class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets the template used to instantiate GroupPanel controls.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets the FlexGrid that is connected to this GroupPanel.
Once a grid is connected to the panel, the panel displays the groups defined in the grid's data source. Users can drag grid columns into the panel to create new groups, drag groups within the panel to re-arrange the groups, or delete items in the panel to remove the groups.
Gets or sets a value indicating whether the panel hides grouped columns in the owner grid.
The FlexGrid displays grouping information in row headers, so it is usually a good idea to hide grouped columns since they display redundant information.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets a string to display in the control when it contains no groups.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(): void
Updates the panel to show the current groups.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Contains Angular 2 components for the wijmo.grid.detail module.
wijmo.angular2.grid.detail is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjDetail from 'wijmo/wijmo.angular2.grid.detail';
import * as wjGrid from 'wijmo/wijmo.angular2.grid';
@Component({
directives: [wjGrid.WjFlexGrid, wjDetail.WjFlexGridDetail],
template: `
<wj-flex-grid [itemsSource]="data">
<template wjFlexGridDetail>
Detail row content here...
</template>
</wj-flex-grid>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 directive for FlexGrid DetailRow templates.
The wj-flex-grid-detail directive must be specified on a <template> template element contained in a wj-flex-grid component.
The wj-flex-grid-detail directive is derived from the FlexGridDetailProvider class that maintains detail rows visibility, with detail rows content defined as an arbitrary HTML fragment within the directive tag. The fragment may contain Angular 2 bindings, components and directives. The row and item template variables can be used in Angular 2 bindings that refer to the detail row's parent Row and Row.dataItem objects.
constructor(grid: FlexGrid, options?: any): FlexGridDetailProvider
Initializes a new instance of the FlexGridDetailProvider class.
FlexGrid that will receive detail rows.
Initialization options for the new FlexGridDetailProvider.
Gets or sets the callback function that creates detail cells.
The callback function takes a Row as a parameter and returns an HTML element representing the row details. For example:
// create detail cells for a given row
dp.createDetailCell = function (row) {
var cell = document.createElement('div');
var detailGrid = new wijmo.grid.FlexGrid(cell, {
itemsSource: getProducts(row.dataItem.CategoryID),
headersVisibility: wijmo.grid.HeadersVisibility.Column
});
return cell;
};Gets or sets a value that determines when row details are displayed.
Gets or sets the callback function that disposes of detail cells.
The callback function takes a Row as a parameter and disposes of any resources associated with the detail cell.
This function is optional. Use it in cases where the createDetailCell function allocates resources that are not automatically garbage-collected.
Gets the FlexGrid that owns this FlexGridDetailProvider.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that indicates whether to use animation when showing row details.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the maximum height of the detail rows, in pixels.
Gets or sets the callback function that determines whether a row has details.
The callback function takes a Row as a parameter and returns a boolean value that indicates whether the row has details. For example:
// remove details from items with odd CategoryID
dp.rowHasDetail = function (row) {
return row.dataItem.CategoryID % 2 == 0;
};
Setting this property to null indicates all rows have details.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
getDetailRow(row: any): DetailRow
Gets the detail row associated with a given grid row.
Row or index of the row to investigate.
hideDetail(row?: any): void
Hides the detail row for a given row.
Row or index of the row that will have its details hidden. This parameter is optional. If not provided, all detail rows are hidden.
isDetailAvailable(row: any): boolean
Gets a value that determines if a row has details to show.
Row or index of the row to investigate.
isDetailVisible(row: any): boolean
Gets a value that determines if a row's details are visible.
Row or index of the row to investigate.
showDetail(row: any, hideOthers?: boolean): void
Shows the detail row for a given row.
Row or index of the row that will have its details shown.
Whether to hide details for all other rows.
Contains Angular 2 components for the wijmo.grid.multirow module.
wijmo.angular2.grid.multirow is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjMultiRow from 'wijmo/wijmo.angular2.grid.multirow';
@Component({
directives: [wjMultiRow.WjMultiRow],
template: `<wj-multi-row></wj-multi-row>`,
selector: 'my-cmp',
})
export class MyCmp {
}Angular 2 component for the MultiRow control.
Use the wj-multi-row component to add MultiRow controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjMultiRow component is derived from the MultiRow control and inherits all its properties, events and methods.
constructor(element: any, options?): MultiRow
Initializes a new instance of the MultiRow class.
In most cases, the options parameter will include the value for the layoutDefinition property.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Angular (EventEmitter) version of the Wijmo autoSizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedRow Wijmo event name.
Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Angular (EventEmitter) version of the Wijmo autoSizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo beginningEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional beginningEdit Wijmo event name.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Angular (EventEmitter) version of the Wijmo cellEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo cellEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnding Wijmo event name.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets a value that determines whether the content of cells that span multiple rows should be vertically centered.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets or sets a value that determines whether column headers should be collapsed and displayed as a single row containing the group headers.
If you set the collapsedHeaders property to true, remember to set the header property of every group in order to avoid empty header cells.
Setting the collapsedHeaders property to null causes the grid to show all header information (groups and columns). In this case, the first row will show the group headers and the remaining rows will show the individual column headers.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets the template used to instantiate FlexGrid controls.
Angular (EventEmitter) version of the Wijmo copied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copied Wijmo event name.
Angular (EventEmitter) version of the Wijmo copying event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copying Wijmo event name.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Angular (EventEmitter) version of the Wijmo deletedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo deletingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumnOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumnOver Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRowOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowOver Wijmo event name.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanging Wijmo event name.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Gets or sets an array that defines the layout of the rows used to display each data item.
The array contains a list of cell group objects which have the following properties:
When the layoutDefinition property is set, the grid scans the cells in each group as follows:
When all groups are ready, the grid calculates the number of rows per record to the maximum rowspan of all groups, and adds rows to each group to pad their height as needed.
This scheme is simple and flexible. For example:
{ header: 'Group 1', cells: [{ binding: 'c1' }, { bnding: 'c2'}, { binding: 'c3' }]}
The group has colspan 1, so there will be one cell per column. The result is:
| C1 | | C2 | | C3 |
To create a group with two columns, set colspan property of the group:
{ header: 'Group 1', colspan: 2, cells:[{ binding: 'c1' }, { binding: 'c2'}, { binding: 'c3' }]}
The cells will wrap as follows:
| C1 | C2 | | C3 |
Note that the last cell spans two columns (to fill the group).
You can also specify the colspan on individual cells rather than on the group:
{ header: 'Group 1', cells: [{binding: 'c1', colspan: 2 }, { bnding: 'c2'}, { binding: 'c3' }]}
Now the first cell has colspan 2, so the result is:
| C1 | | C2 | C3 |
Because cells extend the Column class, you can add all the usual Column properties to any cells:
{ header: 'Group 1', cells: [
{ binding: 'c1', colspan: 2 },
{ bnding: 'c2'},
{ binding: 'c3', format: 'n0', required: false, etc... }
]}Angular (EventEmitter) version of the Wijmo loadedRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadedRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo loadingRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadingRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Angular (EventEmitter) version of the Wijmo pastedCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastedCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasted Wijmo event name.
Angular (EventEmitter) version of the Wijmo pastingCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastingCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasting Wijmo event name.
Angular (EventEmitter) version of the Wijmo prepareCellForEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional prepareCellForEdit Wijmo event name.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Angular (EventEmitter) version of the Wijmo resizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingRow Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo rowAdded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowAdded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnding Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarted Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarting Wijmo event name.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets the number of rows used to display each item.
This value is calculated automatically based on the value of the layoutDefinition property.
Gets or sets a Point that represents the value of the grid's scrollbars.
Angular (EventEmitter) version of the Wijmo scrollPositionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional scrollPositionChanged Wijmo event name.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo selectionChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanging Wijmo event name.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that determines whether the grid should display a button in the column header panel to allow users to collapse and expand the column headers.
If the button is visible, clicking on it will cause the grid to toggle the value of the collapsedHeaders property.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Angular (EventEmitter) version of the Wijmo sortedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo sortingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortingColumn Wijmo event name.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Angular (EventEmitter) version of the Wijmo updatedLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getBindingColumn(p: GridPanel, r: number, c: number): Column
Gets the Column object used to bind a data item to a grid cell.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Contains Angular 2 components for the wijmo.grid.sheet module.
wijmo.angular2.grid.sheet is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjSheet from 'wijmo/wijmo.angular2.grid.sheet';
@Component({
directives: [wjSheet.WjFlexSheet],
template: `<wj-flex-sheet></wj-flex-sheet>`,
selector: 'my-cmp',
})
export class MyCmp {
}Angular 2 component for the FlexSheet control.
Use the wj-flex-sheet component to add FlexSheet controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexSheet component is derived from the FlexSheet control and inherits all its properties, events and methods.
The wj-flex-sheet component may contain a WjSheet child component.
constructor(element: any, options?): FlexSheet
Initializes a new instance of the FlexSheet class.
The DOM element that will host the control, or a jQuery selector (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Angular (EventEmitter) version of the Wijmo autoSizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedRow Wijmo event name.
Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Angular (EventEmitter) version of the Wijmo autoSizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo beginningEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional beginningEdit Wijmo event name.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Angular (EventEmitter) version of the Wijmo cellEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo cellEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnding Wijmo event name.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Overrides the template used to instantiate FlexSheet control.
Angular (EventEmitter) version of the Wijmo copied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copied Wijmo event name.
Angular (EventEmitter) version of the Wijmo copying event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copying Wijmo event name.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Gets an array the IDefinedName objects representing named ranges/expressions defined in the FlexSheet.
Angular (EventEmitter) version of the Wijmo deletedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo deletingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumnOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumnOver Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRowColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRowOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowOver Wijmo event name.
Angular (EventEmitter) version of the Wijmo droppingRowColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional droppingRowColumn Wijmo event name.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanging Wijmo event name.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Gets a value indicating whether the function list is opened.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets or sets a value indicating whether the TabHolder is visible.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Angular (EventEmitter) version of the Wijmo loaded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loaded Wijmo event name.
Angular (EventEmitter) version of the Wijmo loadedRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadedRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo loadingRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadingRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Angular (EventEmitter) version of the Wijmo pastedCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastedCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasted Wijmo event name.
Angular (EventEmitter) version of the Wijmo pastingCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastingCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasting Wijmo event name.
Angular (EventEmitter) version of the Wijmo prepareCellForEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional prepareCellForEdit Wijmo event name.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Angular (EventEmitter) version of the Wijmo resizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingRow Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo rowAdded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowAdded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnding Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarted Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarting Wijmo event name.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets or sets a Point that represents the value of the grid's scrollbars.
Angular (EventEmitter) version of the Wijmo scrollPositionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional scrollPositionChanged Wijmo event name.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Angular (EventEmitter) version of the Wijmo selectedSheetChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectedSheetChanged Wijmo event name.
Gets or sets the index of the current sheet in the FlexSheet.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo selectionChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanging Wijmo event name.
Angular (EventEmitter) version of the Wijmo sheetCleared event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sheetCleared Wijmo event name.
Gets the collection of Sheet objects representing workbook sheets.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Angular (EventEmitter) version of the Wijmo sortedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo sortingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortingColumn Wijmo event name.
Gets the SortManager instance that controls FlexSheet sorting.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Gets the UndoStack instance that controls undo and redo operations of the FlexSheet.
Angular (EventEmitter) version of the Wijmo unknownFunction event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional unknownFunction Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatedLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addBoundSheet(sheetName: string, source: any, pos?: number, grid?: FlexGrid): Sheet
Add a bound Sheet to the FlexSheet.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
addFunction(name: string, func: Function, description?: string, minParamsCount?: number, maxParamsCount?: number): void
Add custom function in FlexSheet.
the name of the custom function.
the custom function.
The function signature looks as follows:
function (...params: any[][][]): any;
The function takes a variable number of parameters, each parameter corresponds to an expression
passed as a function argument. Independently of whether the expression passed as a function argument
resolves to a single value or to a cell range, each parameter value is always a two dimensional array
of resolved values. The number of rows (first index) and columns (second index) in the array corresponds
to the size of the specified cell range. In case where argument is an expression that resolves
to a single value, it will be a one-to-one array where its value can be retrieved using the
param[0][0] indexer.
The sample below adds a custom Sum Product function ('customSumProduct') to the FlexSheet:
flexSheet.addFunction('customSumProduct', (...params: any[][][]) => {
let result = 0,
range1 = params[0],
range2 = params[1];
if (range1.length > 0 && range1.length === range2.length && range1[0].length === range2[0].length) {
for (let i = 0; i < range1.length; i++) {
for (let j = 0; j < range1[0].length; j++) {
result += range1[i][j] * range2[i][j];
}
}
}
return result;
}, 'Custom SumProduct Function', 2, 2);
After adding this function, it can be used it in sheet cell expressions, like here:
=customSumProduct(A1:B5, B1:C5)
the description of the custom function, it will be shown in the function autocompletion of the FlexSheet.
the minimum count of the parameter that the function need.
the maximum count of the parameter that the function need. If the count of the parameters in the custom function is arbitrary, the minParamsCount and maxParamsCount should be set to null.
addTable(rowIndex: number, colIndex: number, rowSpan: number, colSpan: number, tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, sheet?: Sheet): Table
Add empty table in FlexSheet.
The top row position of the table.
The left column position of the table.
The number of the rows in the table.
The number of the columns in the table.
The name of the table.
The table style is applied to the table.
The options of the table.
Indicates the table will be added in which sheet. If the sheet is omitted, it will be added in current sheet.
addTableFromDataSource(rowIndex: number, colIndex: number, dataSource: any[], tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, sheet?: Sheet): Table
Add the table from the data source in FlexSheet.
The top row position of the table.
The left column position of the table.
The dataSource load to the table.
The name of the table.
The table style is applied to the table.
The options of the table.
Indicates the table will be added in which sheet. If the sheet is omitted, it will be added in current sheet.
addUnboundSheet(sheetName?: string, rows?: number, cols?: number, pos?: number, grid?: FlexGrid): Sheet
Add an unbound Sheet to the FlexSheet.
The name of the Sheet.
The row count of the Sheet.
The column count of the Sheet.
The position in the sheets collection.
The FlexGrid instance associated with the Sheet. If not specified then new FlexGrid instance will be created.
applyCellsStyle(cellStyle: ICellStyle, cells?: CellRange[], isPreview?: boolean): void
Apply the style to a range of cells.
The ICellStyle object to apply.
An array of CellRange objects to apply the style to. If not specified then style is applied to the currently selected cells.
Indicates whether the applied style is just for preview.
applyFunctionToCell(): void
Inserts the selected function from the function list to the cell value editor.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
clear(): void
Clears the content of the FlexSheet control.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
containsFocus(): boolean
Overrides the base class method to take into account the function list.
convertNumberToAlpha(c: number): string
Converts the number value to its corresponding alpha value. For instance: 0, 1, 2...to a, b, c...
The number value need to be converted.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
deleteColumns(index?: number, count?: number): void
Deletes columns from the current Sheet of the FlexSheet control.
The starting index of the deleting columns. If not specified then columns will be deleted starting from the first column of the current selection.
The numbers of columns to delete. If not specified then one column will be deleted.
deleteRows(index?: number, count?: number): void
Deletes rows from the current Sheet of the FlexSheet control.
The starting index of the deleting rows. If not specified then rows will be deleted starting from the first row of the current selection.
The numbers of rows to delete. If not specified then one row will be deleted.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
evaluate(formula: string, format?: string, sheet?: Sheet): any
Evaluates a formula.
FlexSheet formulas follow the Excel syntax, including a large subset of the functions supported by Excel. A complete list of the functions supported by FlexSheet can be found here: FlexSheet Functions.
The formula to evaluate. The formula may start with an optional equals sign ('=').
If specified, defines the .Net format that will be applied to the evaluated value.
The Sheet whose data will be used for evaluation. If not specified then the current sheet is used.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
freezeAtCursor(): void
Freeze or unfreeze the columns and rows of the FlexSheet control.
getBuiltInTableStyle(styleName: string): TableStyle
Get the built-in table style via its name.
The name of the built-in table style.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getCellValue(rowIndex: number, colIndex: number, formatted?: boolean, sheet?: Sheet): any
Gets the evaluated cell value.
Unlike the getCellData method that returns a raw data that can be a value or a formula, the getCellValue method always returns an evaluated value, that is if the cell contains a formula then it will be evaluated first and the resulting value will be returned.
The row index of the cell.
The column index of the cell.
Indicates whether to return an original or a formatted value of the cell.
The Sheet whose value to evaluate. If not specified then the data from current sheet is used.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
FlexSheet overrides this method to support multiple rows or columns selection in FlexSheet.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getMergedRange(panel: GridPanel, r: number, c: number, clip?: boolean): CellRange
Gets a CellRange that specifies the merged extent of a cell in a GridPanel. This method overrides the getMergedRange method of its parent class FlexGrid
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getSelectionFormatState(): IFormatState
Gets the IFormatState object describing formatting of the selected cells.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hideFunctionList(): void
Close the function list.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
insertColumns(index?: number, count?: number): void
Inserts columns in the current Sheet of the FlexSheet control.
The position where new columns should be added. If not specified then columns will be added before the left column of the current selection.
The numbers of columns to add. If not specified then one column will be added.
insertRows(index?: number, count?: number): void
Inserts rows in the current Sheet of the FlexSheet control.
The position where new rows should be added. If not specified then rows will be added before the first row of the current selection.
The numbers of rows to add. If not specified then one row will be added.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
load(workbook: any): void
Loads the workbook into FlexSheet. This method works with JSZip 2.5.
For example:
// This sample opens an xlsx file chosen through Open File
// dialog and fills FlexSheet
// HTML
<input type="file"
id="importFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
/>
<div id="flexHost"></>
// JavaScript
var flexSheet = new wijmo.grid.FlexSheet("#flexHost"),
importFile = document.getElementById('importFile');
importFile.addEventListener('change', function () {
loadWorkbook();
});
function loadWorkbook() {
var reader,
file = importFile.files[0];
if (file) {
reader = new FileReader();
reader.onload = function (e) {
flexSheet.load(reader.result);
};
reader.readAsArrayBuffer(file);
}
}A workbook instance or a Blob instance or a base-64 string or an ArrayBuffer containing xlsx file content.
loadAsync(workbook: any, onLoaded?: (workbook: wijmo.xlsx.Workbook), onError?: (reason?: any)): void
Loads the workbook into FlexSheet asynchronously. This method works with JSZip 3.0.
A workbook instance or a Blob instance or a base-64 string or an ArrayBuffer containing xlsx file content.
This callback provides an approach to get the loaded workbook instance. Since this method is an asynchronous method, user is not able to get the loaded workbook instance immediately. User has to get the loaded workbook instance through this callback. This has a single parameter, the loaded workbook instance. It is passed to user.
This callback catches error information when loading. This has a single parameter, the failure reason. The return value is passed to user if he wants to catch the load failure reason.
For example:
flexsheet.loadAsync(blob, function (workbook) {
// user can access the loaded workbook instance in this callback.
var app = worksheet.application ;
...
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of load failure is ' + reason);
});mergeRange(cells?: CellRange, isCopyMergeCell?: boolean): void
Merges the selected CellRange into one cell.
The CellRange to merge.
This parameter indicates that merge operation is done by copy\paste merge cell or not.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onColumnChanged(e: RowColumnChangedEventArgs): void
Raises the columnChanged event.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowColumn(e: DraggingRowColumnEventArgs): void
Raises the draggingRowColumn event.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onDroppingRowColumn(e?: EventArgs): void
Raises the droppingRowColumn event.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoaded(e?: EventArgs): void
Raises the loaded event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onPrepareChangingColumn(): void
Raises the prepareChangingColumn event.
onPrepareChangingRow(): void
Raises the prepareChangingRow event.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowChanged(e: RowColumnChangedEventArgs): void
Raises the rowChanged event.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectedSheetChanged(e: PropertyChangedEventArgs): void
Raises the currentSheetChanged event.
PropertyChangedEventArgs that contains the event data.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSheetCleared(e?: EventArgs): void
Raises the sheetCleared event.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUnknownFunction(e: UnknownFunctionEventArgs): void
Raises the unknownFunction event.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Overridden to refresh the sheet and the TabHolder.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
save(fileName?: string): Workbook
Saves FlexSheet to xlsx file. This method works with JSZip 2.5.
For example:
// This sample exports FlexSheet content to an xlsx file.
// click.
// HTML
<button
onclick="saveXlsx('FlexSheet.xlsx')">
Save
</button>
// JavaScript
function saveXlsx(fileName) {
// Save the flexGrid to xlsx file.
flexsheet.save(fileName);
}Name of the file that is generated.
saveAsync(fileName?: string, onSaved?: (base64?: string), onError?: (reason?: any)): void
Saves the FlexSheet to xlsx file asynchronously. This method works with JSZip 3.0.
Name of the file that is generated.
This callback provides an approach to get the base-64 string that represents the content of the saved FlexSheet. Since this method is an asynchronous method, user is not able to get the base-64 string immediately. User has to get the base-64 string through this callback. This has a single parameter, the base64 string of the saved flexsheet. It is passed to user.
This callback catches error information when saving. This has a single parameter, the failure reason. The return value is passed to user if he wants to catch the save failure reason.
For example:
flexsheet.saveAsync('', function (base64) {
// user can access the base64 string in this callback.
document.getElementByID('export').href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;' + 'base64,' + base64;
}, function (reason) {
// User can catch the failure reason in this callback.
console.log('The reason of save failure is ' + reason);
});scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
FlexSheet overrides this method to adjust the selection cell range for the merged cells in the FlexSheet.
The cell range to select.
Indicates whether to scroll the new selection into view.
selectNextFunction(): void
Select next function in the function list.
selectPreviousFunction(): void
Select previous function in the function list.
setCellData(r: number, c: any, value: any, coerce?: boolean): boolean
Overrides the setCellData function of the base class.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Override the setClipString method of FlexGrid.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
showColumnFilter(): void
Show the filter editor.
showFunctionList(target: HTMLElement): void
Open the function list.
The DOM element that toggle the function list.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the FlexSheet insert\delete columns.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs when dragging the rows or the columns of the FlexSheet.
Occurs as the user drags a row to a new position.
Occurs when dropping the rows or the columns of the FlexSheet.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs before the FlexSheet insert\delete columns.
Occurs before the FlexSheet insert\delete rows.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs after the FlexSheet insert\delete rows.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs when current sheet index changed.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs when the FlexSheet meets the unknown formula.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Angular 2 component for the Sheet control.
The wj-sheet component must be contained in a WjFlexSheet component.
Use the wj-sheet component to add Sheet controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjSheet component is derived from the Sheet control and inherits all its properties, events and methods.
constructor(owner?: FlexSheet, grid?: FlexGrid, sheetName?: string, rows?: number, cols?: number): Sheet
Initializes a new instance of the Sheet class.
The owner @see: FlexSheet control.
The associated FlexGrid control used to store the sheet data. If not specified then the new FlexGrid control will be created.
The name of the sheet within the FlexSheet control.
The row count for the sheet.
The column count for the sheet.
Gets the associated FlexGrid control used to store the sheet data.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView for the FlexGrid instance of the sheet.
Angular (EventEmitter) version of the Wijmo nameChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional nameChanged Wijmo event name.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
findTable(rowIndex: number, columnIndex: number): Table
Finds the table via the cell location.
the row index of the specified cell.
the column index of the specified cell.
getCellStyle(rowIndex: number, columnIndex: number): ICellStyle
Gets the style of specified cell.
the row index of the specified cell.
the column index of the specified cell.
onNameChanged(e: PropertyChangedEventArgs): void
Raises the nameChanged event.
onVisibleChanged(e: EventArgs): void
Raises the visibleChanged event.
Occurs after the sheet name has changed.
Contains Angular 2 components for the wijmo.chart module.
wijmo.angular2.chart is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjChart from 'wijmo/wijmo.angular2.chart';
@Component({
directives: [wjChart.WjFlexChart, wjChart.WjFlexChartSeries],
template: `
<wj-flex-chart [itemsSource]="data" [bindingX]="'x'">
<wj-flex-chart-series [binding]="'y'"></wj-flex-chart-series>
</wj-flex-chart>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the FlexChart control.
Use the wj-flex-chart component to add FlexChart controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChart component is derived from the FlexChart control and inherits all its properties, events and methods.
The wj-flex-chart component may contain the following child components: WjFlexChartTrendLine , WjFlexChartMovingAverage , WjFlexChartYFunctionSeries , WjFlexChartParametricFunctionSeries , WjFlexChartWaterfall , WjFlexChartBoxWhisker , WjFlexChartErrorBar , WjFlexChartAnimation , WjFlexChartAnnotationLayer , WjFlexChartRangeSelector , WjFlexChartGestures , WjFlexChartAxis , WjFlexChartLegend , WjFlexChartDataLabel , WjFlexChartSeries , WjFlexChartLineMarker and WjFlexChartPlotArea.
constructor(element: any, options?): FlexChart
Initializes a new instance of the FlexChart class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets various chart options.
The following options are supported:
bubble.maxSize: Specifies the maximum size of symbols in the Bubble chart. The default value is 30 pixels.
bubble.minSize: Specifies the minimum size of symbols in the Bubble chart. The default value is 5 pixels.
chart.options = {
bubble: { minSize: 5, maxSize: 30 }
}
funnel.neckWidth: Specifies the neck width as a percentage for the Funnel chart. The default value is 0.2.
funnel.neckHeight: Specifies the neck height as a percentage for the Funnel chart. The default value is 0.
funnel.type: Specifies the type of Funnel chart. It should be 'rectangle' or 'default'. neckWidth and neckHeight don't work if type is set to rectangle.
chart.options = {
funnel: { neckWidth: 0.3, neckHeight: 0.3, type: 'rectangle' }
}
groupWidth: Specifies the group width for the Column charts, or the group height for the Bar charts. The group width can be specified in pixels or as percentage of the available space. The default value is '70%'.
chart.options = {
groupWidth : 50; // 50 pixels
}
chart.options = {
groupWidth : '100%'; // 100% pixels
}Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value indicating whether to flip the axes so that X becomes vertical and Y becomes horizontal.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Angular (EventEmitter) version of the Wijmo seriesVisibilityChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional seriesVisibilityChanged Wijmo event name.
Gets or sets a value that determines whether and how the series objects are stacked.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
Angular 2 component for the Axis control.
The wj-flex-chart-axis component must be contained in one of the following components: WjFlexChart , WjFlexChartSeries , WjFinancialChart or WjFinancialChartSeries.
Use the wj-flex-chart-axis component to add Axis controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAxis component is derived from the Axis control and inherits all its properties, events and methods.
constructor(position?: Position): Axis
Initializes a new instance of the Axis class.
The position of the axis on the chart.
Gets the actual axis maximum.
It returns a number or a Date object (for time-based data).
Gets the actual axis minimum.
It returns a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis line is visible.
Gets or sets the comma-separated property names for the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents the corresponding axis label. The default value is 'value,text'.
Gets or sets the format string used for the axis labels (see Globalize).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the itemFormatter function for the axis labels.
If specified, the function takes two parameters:
The function returns the label parameters of labels for which properties are modified.
For example:
chart.axisY.itemFormatter = function(engine, label) {
if (label.val > 5){
engine.textFill = 'red'; // red text
label.cls = null; // no default CSS
}
return label;
}Gets or sets the items source for the axis labels.
Names of the properties are specified by the binding property.
For example:
// default value for Axis.binding is 'value,text'
chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];Gets or sets the label alignment.
By default the labels are centered. The supported values are 'left' and 'right for x-axis and 'top' and 'bottom' for y-axis.
Gets or sets the rotation angle of the axis labels.
The angle is measured in degrees with valid values ranging from -90 to 90.
Gets or sets a value indicating whether the axis labels are visible.
Gets or sets the logarithmic base of the axis.
If the base is not specified the axis uses a linear scale.
Use the logBase property to spread data that is clustered around the origin. This is common in several financial and economic data sets.
Gets or sets a value indicating whether the axis includes grid lines.
Gets or sets the number of units between axis labels.
If the axis contains date values, then the units are expressed in days.
Gets or sets the maximum value shown on the axis.
If not set, the maximum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the minimum value shown on the axis.
If not set, the minimum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis includes minor grid lines.
Gets or sets the location of the minor axis tick marks.
Gets or sets the number of units between minor axis ticks.
If the axis contains date values, then the units are expressed in days.
Gets or sets the value at which an axis crosses the perpendicular axis.
Gets or sets a value indicating how to handle the overlapping axis labels.
Gets or sets the position of the axis with respect to the plot area.
Angular (EventEmitter) version of the Wijmo rangeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rangeChanged Wijmo event name.
Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).
Gets or sets a name of a property that this component is assigned to. Default value is 'axes'.
convert(val: number, maxValue?: number, minValue?: number): number
Converts the specified value from data to pixel coordinates.
The data value to convert.
The max value of the data, it's optional.
The min value of the data, it's optional.
convertBack(val: number): number
Converts the specified value from pixel to data coordinates.
The pixel coordinates to convert back.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
Angular 2 component for the DataLabel control.
The wj-flex-chart-data-label component must be contained in a WjFlexChart component.
Use the wj-flex-chart-data-label component to add DataLabel controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartDataLabel component is derived from the DataLabel control and inherits all its properties, events and methods.
Gets or sets a value indicating whether the data labels have borders.
Gets or sets a value indicating whether to draw lines that connect labels to the data points.
Gets or sets the content of data labels.
The content can be specified as a string or as a function that takes HitTestInfo object as a parameter.
When the label content is a string, it can contain any of the following parameters:
The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
In the following example, we show the y value of the data point in the labels.
// Create a chart and show y data in labels positioned above the data point.
var chart = new wijmo.chart.FlexChart('#theChart');
chart.initialize({
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads' }],
});
chart.dataLabel.position = "Top";
chart.dataLabel.content = "{country} {seriesName}:{y}";
The next example shows how to set data label content using a function.
// Set the data label content
chart.dataLabel.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a name of a property that this component is assigned to. Default value is 'dataLabel'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onRendering(e: DataLabelRenderEventArgs): void
Raises the rendering event.
The DataLabelRenderEventArgs object used to render the label.
Occurs before the data label is rendered.
Angular 2 component for the DataPoint control.
The wj-flex-chart-data-point component must be contained in one of the following components: WjFlexChartAnnotationText , WjFlexChartAnnotationEllipse , WjFlexChartAnnotationRectangle , WjFlexChartAnnotationLine , WjFlexChartAnnotationPolygon , WjFlexChartAnnotationCircle , WjFlexChartAnnotationSquare or WjFlexChartAnnotationImage.
Use the wj-flex-chart-data-point component to add DataPoint controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartDataPoint component is derived from the DataPoint control and inherits all its properties, events and methods.
constructor(x?: any, y?: any): DataPoint
Initializes a new instance of the DataPoint class.
X coordinate of the new DataPoint.
Y coordinate of the new DataPoint.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the Legend control.
The wj-flex-chart-legend component must be contained in one of the following components: WjFlexChart , WjFlexPie , WjFinancialChart , WjFlexRadar or WjSunburst.
Use the wj-flex-chart-legend component to add Legend controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartLegend component is derived from the Legend control and inherits all its properties, events and methods.
constructor(chart: FlexChartBase): Legend
Initializes a new instance of the Legend class.
FlexChartBase that owns this Legend.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that determines whether and where the legend appears in relation to the plot area.
Gets or sets a name of a property that this component is assigned to. Default value is 'legend'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the LineMarker control.
The wj-flex-line-marker component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-line-marker component to add LineMarker controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartLineMarker component is derived from the LineMarker control and inherits all its properties, events and methods.
constructor(chart: FlexChartCore, options?): LineMarker
Initializes a new instance of the LineMarker class.
The chart on which the LineMarker appears.
A JavaScript object containing initialization data for the control.
Gets or sets the alignment of the LineMarker content.
By default, the LineMarker shows to the right, at the bottom of the target point. Use '|' to combine alignment values.
// set the alignment to the left. marker.alignment = wijmo.chart.LineMarkerAlignment.Left; // set the alignment to the left top. marker.alignment = wijmo.chart.LineMarkerAlignment.Left | wijmo.chart.LineMarkerAlignment.Top;
Gets the FlexChart object that owns the LineMarker.
Gets or sets the content function that allows you to customize the text content of the LineMarker.
Gets or sets a value indicating whether the content of the marker is draggable when the interaction mode is "Drag."
Gets or sets a value indicating whether the lines are linked when the horizontal or vertical line is dragged when the interaction mode is "Drag."
Gets or sets the maximum distance from the horizontal or vertical line that the marker can be dragged.
Gets or sets the horizontal position of the LineMarker relative to the plot area.
Its value range is (0, 1). If the value is null or undefined and interaction is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag, the horizontal position of the marker is calculated automatically based on the pointer's position.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the interaction mode of the LineMarker.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the visibility of the LineMarker lines.
Angular (EventEmitter) version of the Wijmo positionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional positionChanged Wijmo event name.
Gets or sets the index of the series in the chart in which the LineMarker appears. This takes effect when the interaction property is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag.
Gets or sets the vertical position of the LineMarker relative to the plot area.
Its value range is (0, 1). If the value is null or undefined and interaction is set to wijmo.chart.LineMarkerInteraction.Move or wijmo.chart.LineMarkerInteraction.Drag, the vertical position of the LineMarker is calculated automatically based on the pointer's position.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onPositionChanged(point: Point): void
Raises the positionChanged event.
The target point at which to show the LineMarker.
Occurs after the LineMarker's position changes.
Angular 2 component for the PlotArea control.
The wj-flex-chart-plot-area component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-plot-area component to add PlotArea controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartPlotArea component is derived from the PlotArea control and inherits all its properties, events and methods.
constructor(options?: any): PlotArea
Initializes a new instance of the PlotArea class.
Initialization options for the plot area.
Gets or sets the column index of plot area. This determines the horizontal position of the plot area on the chart.
Gets or sets the height of the plot area.
The height can be specified as a number (in pixels) or as a string in the format '{number}*' (star sizing).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the row index of plot area. This determines the vertical position of the plot area on the chart.
Gets or sets the style of the plot area.
Using style property, you can set appearance of the plot area. For example:
pa.style = { fill: 'rgba(0,255,0,0.1)' };Gets or sets width of the plot area.
The width can be specified as a number (in pixels) or as a string in the format '{number}*' (star sizing).
Gets or sets a name of a property that this component is assigned to. Default value is 'plotAreas'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Angular 2 component for the Series control.
The wj-flex-chart-series component must be contained in a WjFlexChart component.
Use the wj-flex-chart-series component to add Series controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartSeries component is derived from the Series control and inherits all its properties, events and methods.
The wj-flex-chart-series component may contain a WjFlexChartAxis child component.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the FlexPie control.
Use the wj-flex-pie component to add FlexPie controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexPie component is derived from the FlexPie control and inherits all its properties, events and methods.
The wj-flex-pie component may contain the following child components: WjFlexChartAnimation , WjFlexChartLegend and WjFlexPieDataLabel.
constructor(element: any, options?): FlexPie
Initializes a new instance of the FlexPie class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property that contains the chart values.
Gets or sets the name of the property that contains the name of the data items.
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the size of the pie's inner radius.
The inner radius is measured as a fraction of the pie radius.
The default value for this property is zero, which creates a pie. Setting this property to values greater than zero creates pies with a hole in the middle, also known as doughnut charts.
Gets or sets a value indicating whether to use animation when items are selected.
See also the selectedItemPosition and selectionMode properties.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the offset of the slices from the pie center.
The offset is measured as a fraction of the pie radius.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the offset of the selected slice from the pie center.
Offsets are measured as a fraction of the pie radius.
Gets or sets the position of the selected slice.
Setting this property to a value other than 'None' causes the pie to rotate when an item is selected.
Note that in order to select slices by clicking the chart, you must set the selectionMode property to "Point".
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the starting angle for the pie slices, in degrees.
Angles are measured clockwise, starting at the 9 o'clock position.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Angular 2 component for the PieDataLabel control.
The wj-flex-pie-data-label component must be contained in a WjFlexPie component.
Use the wj-flex-pie-data-label component to add PieDataLabel controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexPieDataLabel component is derived from the PieDataLabel control and inherits all its properties, events and methods.
Gets or sets a value indicating whether the data labels have borders.
Gets or sets a value indicating whether to draw lines that connect labels to the data points.
Gets or sets the content of data labels.
The content can be specified as a string or as a function that takes HitTestInfo object as a parameter.
When the label content is a string, it can contain any of the following parameters:
The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
In the following example, we show the y value of the data point in the labels.
// Create a chart and show y data in labels positioned above the data point.
var chart = new wijmo.chart.FlexChart('#theChart');
chart.initialize({
itemsSource: data,
bindingX: 'country',
series: [
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads' }],
});
chart.dataLabel.position = "Top";
chart.dataLabel.content = "{country} {seriesName}:{y}";
The next example shows how to set data label content using a function.
// Set the data label content
chart.dataLabel.content = function (ht) {
return ht.name + ":" + ht.value.toFixed();
}This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the position of the data labels.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a name of a property that this component is assigned to. Default value is 'dataLabel'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onRendering(e: DataLabelRenderEventArgs): void
Raises the rendering event.
The DataLabelRenderEventArgs object used to render the label.
Occurs before the data label is rendered.
Contains Angular 2 components for the wijmo.chart.interaction module.
wijmo.angular2.chart.interaction is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjInteraction from 'wijmo/wijmo.angular2.chart.interaction';
import * as wjChart from 'wijmo/wijmo.angular2.chart';
@Component({
directives: [wjChart.WjFlexChart, wjInteraction.WjFlexChartRangeSelector, wjChart.WjFlexChartSeries],
template: `
<wj-flex-chart [itemsSource]="data" [bindingX]="'x'">
<wj-flex-chart-range-selector></wj-flex-chart-range-selector>
<wj-flex-chart-series [binding]="'y'"></wj-flex-chart-series>
</wj-flex-chart>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the ChartGestures control.
The wj-flex-chart-gestures component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-gestures component to add ChartGestures controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartGestures component is derived from the ChartGestures control and inherits all its properties, events and methods.
constructor(chart: FlexChartCore, options?): ChartGestures
Initializes a new instance of the ChartGestures class.
The FlexChart that allows the user to zoom or pan.
A JavaScript object containing initialization data for the control.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the interactive axes of the ChartGestures.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the mouse action of the ChartGestures.
Gets or sets the initial position of the axis X. The value represents initial position on the axis when the Scale is less than 1. Otherwise, the Value has no effect. The Value should lie between 0 to 1.
Gets or sets the initial position of the axis Y. The value represents initial position on the axis when the Scale is less than 1. Otherwise, the Value has no effect. The Value should lie between 0 to 1.
Gets or sets the initial scale of axis X. The scale should be more than 0 and less than or equal to 1. The scale specifies which part of the range between Min and Max is shown. When scale is 1 (default value), the whole axis range is visible.
Gets or sets the initial scale of axis Y. The scale should be more than 0 and less than or equal to 1. The scale specifies which part of the range between Min and Max is shown. When scale is 1 (default value), the whole axis range is visible.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
remove(): void
Removes the ChartGestures control from the chart.
Angular 2 component for the RangeSelector control.
The wj-flex-chart-range-selector component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-range-selector component to add RangeSelector controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartRangeSelector component is derived from the RangeSelector control and inherits all its properties, events and methods.
constructor(chart: FlexChartCore, options?): RangeSelector
Initializes a new instance of the RangeSelector class.
The FlexChart that displays the selected range.
A JavaScript object containing initialization data for the control.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the visibility of the range selector.
Gets or sets the maximum value of the range. If not set, the maximum is calculated automatically.
Gets or sets the maximum amount of data that can be selected, as a percentage of the total range. This property must be set to a value between zero and one.
Gets or sets the minimum value of the range. If not set, the minimum is calculated automatically.
Gets or sets the minimum amount of data that can be selected, as a percentage of the overall chart range. This property must be set to a value between zero and one.
Gets or sets the orientation of the range selector.
Angular (EventEmitter) version of the Wijmo rangeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rangeChanged Wijmo event name.
Gets or sets a value that determines whether the min/max elements may be reversed by dragging one over the other.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
remove(): void
Removes the RangeSelector control from the chart.
Contains Angular 2 components for the wijmo.chart.animation module.
wijmo.angular2.chart.animation is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjAnimation from 'wijmo/wijmo.angular2.chart.animation';
import * as wjChart from 'wijmo/wijmo.angular2.chart';
@Component({
directives: [wjChart.WjFlexChart, wjAnimation.WjFlexChartAnimation, wjChart.WjFlexChartSeries],
template: `
<wj-flex-chart [itemsSource]="data" [bindingX]="'x'">
<wj-flex-chart-animation [animationMode]="'Point'"></wj-flex-chart-animation>
<wj-flex-chart-series [binding]="'y'"></wj-flex-chart-series>
</wj-flex-chart>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the ChartAnimation control.
The wj-flex-chart-animation component must be contained in one of the following components: WjFlexChart , WjFlexPie , WjFinancialChart or WjFlexRadar.
Use the wj-flex-chart-animation component to add ChartAnimation controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnimation component is derived from the ChartAnimation control and inherits all its properties, events and methods.
constructor(chart: FlexChartBase, options?: any): ChartAnimation
Initializes a new instance of the ChartAnimation class.
A chart to which the ChartAnimation is attached.
A JavaScript object containing initialization data for ChartAnimation.
Gets or sets whether the plot points animate one at a time, series by series, or all at once. The whole animation is still completed within the duration.
Gets or sets a value indicating whether animation is applied to the axis.
Gets or sets the length of entire animation in milliseconds.
Gets or sets the easing function applied to the animation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
Contains Angular 2 components for the wijmo.chart.analytics module.
wijmo.angular2.chart.analytics is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjAnalitics from 'wijmo/wijmo.angular2.chart.analytics';
Angular 2 component for the BoxWhisker control.
The wj-flex-chart-box-whisker component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-box-whisker component to add BoxWhisker controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartBoxWhisker component is derived from the BoxWhisker control and inherits all its properties, events and methods.
constructor(options?: any): BoxWhisker
Initializes a new instance of the BoxWhisker class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that determines the width of the gab between groups as a percentage.
The default value for this property is 0.1. The min value is 0 and max value is 1.
Gets or sets a value that determines the group width as a percentage.
The default value for this property is 0.8. The min value is 0 and max value is 1.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets a value that specifies the style for the mean line.
Gets or sets a value that specifies the style for the mean marker.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets a value that specifies the quartile calculation method.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a value that determines whether to show the inner data points for each point in the series.
Gets or sets a value that determines whether to show the mean line.
Gets or sets a value that determines whether to show the mean marker.
Gets or sets a value that determines whether to show outliers.
Outliers are inner points outside the range between the first and third quartiles.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the ErrorBar control.
The wj-flex-chart-error-bar component must be contained in a WjFlexChart component.
Use the wj-flex-chart-error-bar component to add ErrorBar controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartErrorBar component is derived from the ErrorBar control and inherits all its properties, events and methods.
constructor(options?: any): ErrorBar
Initializes a new instance of the ErrorBar class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that specifies the direction of the error bars.
Gets or sets a value that specifies the end style of the error bars.
Gets or sets a value that specifies the meaning of the value property.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets a value that specifies the error value of the series.
This property works with the errorAmount property.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the MovingAverage control.
The wj-flex-chart-moving-average component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-moving-average component to add MovingAverage controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartMovingAverage component is derived from the MovingAverage control and inherits all its properties, events and methods.
constructor(options?: any): MovingAverage
Initializes a new instance of the MovingAverage class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period of the moving average series. It should be set to integer value greater than 1.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the type of the moving average series.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the ParametricFunctionSeries control.
The wj-flex-chart-parametric-function-series component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-parametric-function-series component to add ParametricFunctionSeries controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartParametricFunctionSeries component is derived from the ParametricFunctionSeries control and inherits all its properties, events and methods.
constructor(options?: any): ParametricFunctionSeries
Initializes a new instance of the ParametricFunctionSeries class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the maximum value of the parameter for calculating a function.
Gets or sets the minimum value of the parameter for calculating a function.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
Gets or sets the function used to calculate the x value.
Gets or sets the function used to calculate the y value.
approximate(value: number): void
Gets the approximate x and y from the given value.
The value to calculate.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the TrendLine control.
The wj-flex-chart-trend-line component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-trend-line component to add TrendLine controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartTrendLine component is derived from the TrendLine control and inherits all its properties, events and methods.
constructor(options?: any): TrendLine
Initializes a new instance of the TrendLine class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the number of terms in a polynomial or Fourier equation.
Set this value to an integer greater than 1. It gets applied when the fitType is set to wijmo.chart.analytics.TrendLineFitType.Polynomial or wijmo.chart.analytics.TrendLineFitType.Fourier.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getEquation(fmt?: Function): void
Gets the formatted equation string for the coefficients.
The formatting function used to convert the coefficients into strings. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the Waterfall control.
The wj-flex-chart-waterfall component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-waterfall component to add Waterfall controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartWaterfall component is derived from the Waterfall control and inherits all its properties, events and methods.
constructor(options?: any): Waterfall
Initializes a new instance of the Waterfall class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets a value that determines whether to show connector lines.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the name of the property that contains labels for the intermediate total bars. This should be an array or a string.
This property works with the showIntermediateTotal and intermediateTotalPositions properties.
Gets or sets a value of the property that contains the index for positions of the intermediate total bars.
This property works with the showIntermediateTotal and intermediateTotalLabels properties.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets a value that determines whether the given data represents absolute or relative values (differences).
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a value that determines whether to show intermediate total bars.
This property works with intermediateTotalPositions and intermediateTotalLabels properties.
Gets or sets a value that determines whether to show the total bar at the end of the chart.
Gets or sets a value that determines the value of the start bar. If start is null, the start bar will not be shown.
Gets or sets the Waterfall styles.
The following styles are supported:
waterfall.styles = {
start: { fill: 'blue', stroke: 'blue' },
total: { fill: 'yellow', stroke: 'yellow' },
falling: { fill: 'red', stroke: 'red' },
rising: { fill: 'green', stroke: 'green' },
connectorLines: { stroke: 'blue', 'stroke-dasharray': '10, 10' }
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the YFunctionSeries control.
The wj-flex-chart-y-function-series component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-y-function-series component to add YFunctionSeries controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartYFunctionSeries component is derived from the YFunctionSeries control and inherits all its properties, events and methods.
constructor(options?: any): YFunctionSeries
Initializes a new instance of the YFunctionSeries class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the function used to calculate Y value.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the maximum value of the parameter for calculating a function.
Gets or sets the minimum value of the parameter for calculating a function.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the sample count for function calculation. The property doesn't apply for MovingAverage.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
approximate(x: number): number
Gets the approximate y value from the given x value.
The x value to be used for calculating the Y value.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Contains Angular 2 components for the wijmo.chart.annotation module.
wijmo.angular2.chart.annotation is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjAnnotation from 'wijmo/wijmo.angular2.chart.annotation';
import * as wjChart from 'wijmo/wijmo.angular2.chart';
@Component({
directives: [wjChart.WjFlexChart, wjAnnotation.WjFlexChartAnnotationLayer,
wjAnnotation.WjFlexChartAnnotationCircle, wjChart.WjFlexChartSeries],
template: `
<wj-flex-chart [itemsSource]="data" [bindingX]="'x'">
<wj-flex-chart-series [binding]="'y'"></wj-flex-chart-series>
<wj-flex-chart-annotation-layer>
<wj-flex-chart-annotation-circle [radius]="40" [point]="{x: 250, y: 150}"></wj-flex-chart-annotation-circle>
</wj-flex-chart-annotation-layer>
</wj-flex-chart>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the Circle control.
The wj-flex-chart-annotation-circle component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-circle component to add Circle controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationCircle component is derived from the Circle control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-circle component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Circle
Initializes a new instance of the Circle annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Ellipse control.
The wj-flex-chart-annotation-ellipse component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-ellipse component to add Ellipse controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationEllipse component is derived from the Ellipse control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-ellipse component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Ellipse
Initializes a new instance of the Ellipse annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Image control.
The wj-flex-chart-annotation-image component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-image component to add Image controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationImage component is derived from the Image control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-image component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Image
Initializes a new instance of the Image annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the AnnotationLayer control.
The wj-flex-chart-annotation-layer component must be contained in one of the following components: WjFlexChart or WjFinancialChart.
Use the wj-flex-chart-annotation-layer component to add AnnotationLayer controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationLayer component is derived from the AnnotationLayer control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-layer component may contain the following child components: WjFlexChartAnnotationText , WjFlexChartAnnotationEllipse , WjFlexChartAnnotationRectangle , WjFlexChartAnnotationLine , WjFlexChartAnnotationPolygon , WjFlexChartAnnotationCircle , WjFlexChartAnnotationSquare and WjFlexChartAnnotationImage.
constructor(chart: FlexChartCore, options?): AnnotationLayer
Initializes a new instance of the AnnotationLayer class.
A chart to which the AnnotationLayer is attached.
A JavaScript object containing initialization data for AnnotationLayer.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets the collection of annotation elements in the AnnotationLayer.
Gets or sets a name of a property that this component is assigned to. Default value is ''.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
getItem(name: string): AnnotationBase
Gets an annotation element by name in the AnnotationLayer.
The annotation's name.
getItems(name: string): Array
Gets the annotation elements by name in the AnnotationLayer.
The annotations' name.
Angular 2 component for the Line control.
The wj-flex-chart-annotation-line component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-line component to add Line controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationLine component is derived from the Line control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-line component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Line
Initializes a new instance of the Line annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Polygon control.
The wj-flex-chart-annotation-polygon component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-polygon component to add Polygon controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationPolygon component is derived from the Polygon control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-polygon component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Polygon
Initializes a new instance of the Polygon annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets the collection of points of the Polygon annotation.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Rectangle control.
The wj-flex-chart-annotation-rectangle component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-rectangle component to add Rectangle controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationRectangle component is derived from the Rectangle control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-rectangle component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Rectangle
Initializes a new instance of the Rectangle annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Square control.
The wj-flex-chart-annotation-square component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-square component to add Square controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationSquare component is derived from the Square control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-square component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Square
Initializes a new instance of the Square annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Angular 2 component for the Text control.
The wj-flex-chart-annotation-text component must be contained in a WjFlexChartAnnotationLayer component.
Use the wj-flex-chart-annotation-text component to add Text controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAnnotationText component is derived from the Text control and inherits all its properties, events and methods.
The wj-flex-chart-annotation-text component may contain a WjFlexChartDataPoint child component.
constructor(options?: any): Text
Initializes a new instance of the Text annotation class.
JavaScript object containing initialization data for the object.
Gets or sets the attachment of the annotation.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the offset of the annotation from the point.
Gets or sets the point of the annotation. The coordinates of points depends on the attachment property. See AnnotationAttachment for further description.
Gets or sets the data point index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets the position of the annotation. The position is relative to the point.
Gets or sets the data series index of the annotation. Applies only when the attachment property is set to DataIndex.
Gets or sets a name of a property that this component is assigned to. Default value is 'items'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
render(engine: IRenderEngine): void
Render this annotation.
The engine to render annotation.
Contains Angular 2 components for the wijmo.chart.finance module.
wijmo.angular2.chart.finance is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjFinance from 'wijmo/wijmo.angular2.chart.finance';
@Component({
directives: [wjFinance.WjFinancialChart, wjFinance.WjFinancialChartSeries],
template: `
<wj-financial-chart [itemsSource]="data" [bindingX]="'x'">
<wj-financial-chart-series [binding]="'y'"></wj-financial-chart-series>
</wj-financial-chart>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the FinancialChart control.
Use the wj-financial-chart component to add FinancialChart controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFinancialChart component is derived from the FinancialChart control and inherits all its properties, events and methods.
The wj-financial-chart component may contain the following child components: WjFlexChartTrendLine , WjFlexChartMovingAverage , WjFlexChartYFunctionSeries , WjFlexChartParametricFunctionSeries , WjFlexChartWaterfall , WjFlexChartBoxWhisker , WjFlexChartAnimation , WjFlexChartAnnotationLayer , WjFlexChartFibonacci , WjFlexChartFibonacciArcs , WjFlexChartFibonacciFans , WjFlexChartFibonacciTimeZones , WjFlexChartAtr , WjFlexChartCci , WjFlexChartRsi , WjFlexChartWilliamsR , WjFlexChartMacd , WjFlexChartMacdHistogram , WjFlexChartStochastic , WjFlexChartBollingerBands , WjFlexChartEnvelopes , WjFinancialChartSeries , WjFlexChartRangeSelector , WjFlexChartGestures , WjFlexChartAxis , WjFlexChartLegend , WjFlexChartLineMarker and WjFlexChartPlotArea.
constructor(element: any, options?): FinancialChart
Initializes a new instance of the FlexChart class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets or sets the type of financial chart to create.
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets various chart options.
The following options are supported:
kagi.fields: Specifies the DataFields used for the Kagi chart. The default value is DataFields.Close.
kagi.rangeMode: Specifies the RangeMode for the Kagi chart. The default value is RangeMode.Fixed.
kagi.reversalAmount: Specifies the reversal amount for the Kagi chart. The default value is 14.
chart.options = {
kagi: {
fields: wijmo.chart.finance.DataFields.Close,
rangeMode: wijmo.chart.finance.RangeMode.Fixed,
reversalAmount: 14
}
}
lineBreak.newLineBreaks: Gets or sets the number of previous boxes that must be compared before a new box is drawn in Line Break charts. The default value is 3.
chart.options = {
lineBreak: { newLineBreaks: 3 }
}
renko.fields: Specifies the DataFields used for the Renko chart. The default value is DataFields.Close.
renko.rangeMode: Specifies the RangeMode for the Renko chart. The default value is RangeMode.Fixed.
renko.boxSize: Specifies the box size for the Renko chart. The default value is 14.
chart.options = {
renko: {
fields: wijmo.chart.finance.DataFields.Close,
rangeMode: wijmo.chart.finance.RangeMode.Fixed,
boxSize: 14
}
}Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Angular (EventEmitter) version of the Wijmo seriesVisibilityChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional seriesVisibilityChanged Wijmo event name.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
Angular 2 component for the FinancialSeries control.
The wj-financial-chart-series component must be contained in a WjFinancialChart component.
Use the wj-financial-chart-series component to add FinancialSeries controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFinancialChartSeries component is derived from the FinancialSeries control and inherits all its properties, events and methods.
The wj-financial-chart-series component may contain a WjFlexChartAxis child component.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart. Please note that ColumnVolume, EquiVolume, CandleVolume and ArmsCandleVolume chart types are not supported and should be set on the FinancialChart.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Contains Angular 2 components for the wijmo.chart.finance.analytics module.
wijmo.angular2.chart.finance.analytics is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjFinanceAnalitics from 'wijmo/wijmo.angular2.chart.finance.analytics';
Angular 2 component for the ATR control.
The wj-flex-chart-atr component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-atr component to add ATR controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartAtr component is derived from the ATR control and inherits all its properties, events and methods.
constructor(options?: any): ATR
Initializes a new instance of the ATR class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the BollingerBands control.
The wj-flex-chart-bollinger-bands component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-bollinger-bands component to add BollingerBands controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartBollingerBands component is derived from the BollingerBands control and inherits all its properties, events and methods.
constructor(options?: any): BollingerBands
Initializes a new instance of the BollingerBands class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the CCI control.
The wj-flex-chart-cci component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-cci component to add CCI controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartCci component is derived from the CCI control and inherits all its properties, events and methods.
constructor(options?: any): CCI
Initializes a new instance of the CCI class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the constant value for the CCI calculation. The default value is 0.015.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the Envelopes control.
The wj-flex-chart-envelopes component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-envelopes component to add Envelopes controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartEnvelopes component is derived from the Envelopes control and inherits all its properties, events and methods.
constructor(options?: any): Envelopes
Initializes a new instance of the Envelopes class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or set the size of the moving average envelopes. The default value is 2.5 percent (0.025).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the moving average type for the envelopes. The default value is Simple.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the Fibonacci control.
The wj-flex-chart-fibonacci component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-fibonacci component to add Fibonacci controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartFibonacci component is derived from the Fibonacci control and inherits all its properties, events and methods.
constructor(options?: any): Fibonacci
Initializes a new instance of the Fibonacci class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the high value of Fibonacci tool.
If not specified, the high value is caclulated based on data values provided by the itemsSource.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the label position for levels in Fibonacci tool.
Gets or sets the array of levels for plotting.
Default value is [0, 23.6, 38.2, 50, 61.8, 100].
Gets or sets the low value of Fibonacci tool.
If not specified, the low value is calculated based on data values provided by itemsSource.
Gets or sets the x maximum value of the Fibonacci tool.
If not specified, current maximum of x-axis is used. The value can be specified as a number or Date object.
Gets or sets the x minimal value of the Fibonacci tool.
If not specified, current minimum of x-axis is used. The value can be specified as a number or Date object.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets a value indicating whether to create uptrending Fibonacci tool.
Default value is true(uptrend). If the value is false, the downtrending levels are plotted.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the FibonacciArcs control.
The wj-flex-chart-fibonacci-arcs component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-fibonacci-arcs component to add FibonacciArcs controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartFibonacciArcs component is derived from the FibonacciArcs control and inherits all its properties, events and methods.
constructor(options?: any): FibonacciArcs
Initializes a new instance of the FibonacciArcs class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending DataPoint for the base line.
The DataPoint x value can be a number or a Date object (for time-based data).
Unlike some of the other Fibonacci tools, the ending DataPoint is not calculated automatically if undefined.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the LabelPosition for levels in FibonacciArcs tool.
Gets or sets the array of levels for plotting.
Default value is [38.2, 50, 61.8].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the starting DataPoint for the base line.
The DataPoint x value can be a number or a Date object (for time-based data).
Unlike some of the other Fibonacci tools, the starting DataPoint is not calculated automatically if undefined.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the FibonacciFans control.
The wj-flex-chart-fibonacci-fans component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-fibonacci-fans component to add FibonacciFans controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartFibonacciFans component is derived from the FibonacciFans control and inherits all its properties, events and methods.
constructor(options?: any): FibonacciFans
Initializes a new instance of the FibonacciFans class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending DataPoint for the base line.
If not set, the starting DataPoint is calculated automatically. The DataPoint x value can be a number or a Date object (for time-based data).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the LabelPosition for levels in FibonacciFans tool.
Gets or sets the array of levels for plotting.
Default value is [0, 23.6, 38.2, 50, 61.8, 100].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the starting DataPoint for the base line.
If not set, the starting DataPoint is calculated automatically. The DataPoint x value can be a number or a Date object (for time-based data).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the FibonacciTimeZones control.
The wj-flex-chart-fibonacci-time-zones component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-fibonacci-time-zones component to add FibonacciTimeZones controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartFibonacciTimeZones component is derived from the FibonacciTimeZones control and inherits all its properties, events and methods.
constructor(options?: any): FibonacciTimeZones
Initializes a new instance of the FibonacciTimeZones class.
A JavaScript object containing initialization data.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the ending X data point for the time zones.
If not set, the ending X data point is calculated automatically. The value can be a number or a Date object (for time-based data).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the LabelPosition for levels in FibonacciTimeZones tool.
Gets or sets the array of levels for plotting.
Default value is [0, 1, 2, 3, 5, 8, 13, 21, 34].
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the starting X data point for the time zones.
If not set, the starting X data point is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the Macd control.
The wj-flex-chart-macd component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-macd component to add Macd controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartMacd component is derived from the Macd control and inherits all its properties, events and methods.
constructor(options?: any): Macd
Initializes a new instance of the Macd class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the fast exponential moving average period for the MACD line.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the slow exponential moving average period for the MACD line.
Gets or sets the exponential moving average period for the signal line.
Gets or sets the styles for the MACD and Signal lines.
The following options are supported:
series.styles = {
macdLine: {
stroke: 'red',
strokeWidth: 1
},
signalLine: {
stroke: 'green',
strokeWidth: 1
},
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the MacdHistogram control.
The wj-flex-chart-macd-histogram component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-macd-histogram component to add MacdHistogram controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartMacdHistogram component is derived from the MacdHistogram control and inherits all its properties, events and methods.
constructor(options?: any): MacdHistogram
Initializes a new instance of the MacdHistogram class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the fast exponential moving average period for the MACD line.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the slow exponential moving average period for the MACD line.
Gets or sets the exponential moving average period for the signal line.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the RSI control.
The wj-flex-chart-rsi component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-rsi component to add RSI controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartRsi component is derived from the RSI control and inherits all its properties, events and methods.
constructor(options?: any): RSI
Initializes a new instance of the RSI class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the Stochastic control.
The wj-flex-chart-stochastic component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-stochastic component to add Stochastic controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartStochastic component is derived from the Stochastic control and inherits all its properties, events and methods.
constructor(options?: any): Stochastic
Initializes a new instance of the Stochastic class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
Gets or sets the period for the %D simple moving average.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the styles for the %K and %D lines.
The following options are supported:
series.styles = {
kLine: {
stroke: 'red',
strokeWidth: 1
},
dLine: {
stroke: 'green',
strokeWidth: 1
},
}Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Angular 2 component for the WilliamsR control.
The wj-flex-chart-williams-r component must be contained in a WjFinancialChart component.
Use the wj-flex-chart-williams-r component to add WilliamsR controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexChartWilliamsR component is derived from the WilliamsR control and inherits all its properties, events and methods.
constructor(options?: any): WilliamsR
Initializes a new instance of the WilliamsR class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Gets or sets the period for the calculation as an integer value.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Contains Angular 2 components for the wijmo.chart.hierarchical module.
wijmo.angular2.chart.hierarchical is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjHierarchical from 'wijmo/wijmo.angular2.chart.hierarchical';
@Component({
directives: [wjHierarchical.WjSunburst],
template: `
<wj-sunburst [itemsSource]="data" [binding]="'y'" [bindingX]="'x'">
</wj-sunburst>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the Sunburst control.
Use the wj-sunburst component to add Sunburst controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjSunburst component is derived from the Sunburst control and inherits all its properties, events and methods.
The wj-sunburst component may contain a WjFlexChartLegend child component.
constructor(element: any, options?): FlexPie
Initializes a new instance of the FlexPie class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property that contains the chart values.
Gets or sets the name of the property containing name of the data item; it should be an array or a string.
Gets or sets the name of the property (or properties) used to generate child items in hierarchical data.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
Set this property to an array containing the names of the properties
that contain child items at each level, when the items are child items
at different levels with different names
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets the size of the pie's inner radius.
The inner radius is measured as a fraction of the pie radius.
The default value for this property is zero, which creates a pie. Setting this property to values greater than zero creates pies with a hole in the middle, also known as doughnut charts.
Gets or sets a value indicating whether to use animation when items are selected.
See also the selectedItemPosition and selectionMode properties.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the offset of the slices from the pie center.
The offset is measured as a fraction of the pie radius.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets the offset of the selected slice from the pie center.
Offsets are measured as a fraction of the pie radius.
Gets or sets the position of the selected slice.
Setting this property to a value other than 'None' causes the pie to rotate when an item is selected.
Note that in order to select slices by clicking the chart, you must set the selectionMode property to "Point".
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Gets or sets the starting angle for the pie slices, in degrees.
Angles are measured clockwise, starting at the 9 o'clock position.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Angular 2 component for the TreeMap control.
Use the wj-tree-map component to add TreeMap controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjTreeMap component is derived from the TreeMap control and inherits all its properties, events and methods.
constructor(element: any, options?): TreeMap
Initializes a new instance of the TreeMap class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A Javascript object containing initialization data for the control.
Gets or sets the name of the property of the data item that contains the chart value.
The binding property is used to calculate the size of the node as compared to other node values. The property should contain numeric data.
Gets or sets the name of the property containing name of the data item. The bindingName property is used to show name of the node. It should be an array or a string.
Gets or sets the name of the property (or properties) used to generate child items in hierarchical data.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
Set this property to an array containing the names of the properties
that contain child items at each level, when the items are child items
at different levels with different names
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum number of node levels to show in the current view. These levels are flattened into the current plane. If a treemap has more levels than this value, user has to move up and down.
Gets or sets an array of default colors to be used in a treemap.
The array contains strings that represent CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
Or contains titleColor, maxColor, minColor separately. For example:
chart.palette = [{
titleColor: '#00277d',
maxColor: 'rgba(0,39,125,0.7)',
minColor: 'rgba(168,187,230,0.7)'
}, {
titleColor: '#7d1f00',
maxColor: 'rgba(125,21,0,0.7)',
minColor: 'rgba(230,183,168,0.7)'
}, {
titleColor: '#007d27',
maxColor: 'rgba(0,125,39,0.7)',
minColor: 'rgba(168,230,188,0.7)'
}];Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Contains Angular 2 components for the wijmo.chart.radar module.
wijmo.angular2.chart.radar is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjRadar from 'wijmo/wijmo.angular2.chart.radar';
@Component({
directives: [wjRadar.WjFlexRadar, wjRadar.WjFlexRadarSeries],
template: `
<wj-flex-radar [itemsSource]="data" [bindingX]="'x'">
<wj-flex-radar-series [binding]="'y'"></wj-flex-radar-series>
</wj-flex-radar>`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the FlexRadar control.
Use the wj-flex-radar component to add FlexRadar controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexRadar component is derived from the FlexRadar control and inherits all its properties, events and methods.
The wj-flex-radar component may contain the following child components: WjFlexChartAnimation , WjFlexRadarAxis , WjFlexRadarSeries and WjFlexChartLegend.
constructor(element: any, options?): FlexRadar
Initializes a new instance of the FlexRadar class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
A JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains the Y values.
Gets or sets the name of the property that contains the X data values.
Gets or sets the type of radar chart to be created.
Gets the ICollectionView object that contains the chart data.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether to interpolate null values in the data.
If true, the chart interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the item formatter function that allows you to customize the appearance of data points. See the Explorer sample's Item Formatter for a demonstration.
Gets or sets the array or ICollectionView object that contains the data used to create the chart.
Gets or sets a value indicating whether clicking legend items toggles the series visibility in the chart.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets an array of default colors to use for displaying each series.
The array contains strings that represents CSS colors. For example:
// use colors specified by name chart.palette = ['red', 'green', 'blue']; // or use colors specified as rgba-values chart.palette = [ 'rgba(255,0,0,1)', 'rgba(255,0,0,0.8)', 'rgba(255,0,0,0.6)', 'rgba(255,0,0,0.4)'];
There is a set of predefined palettes in the Palettes class that you can use, for example:
chart.palette = wijmo.chart.Palettes.coral;
Gets the collection of PlotArea objects.
Gets or sets the plot margin in pixels.
The plot margin represents the area between the edges of the control and the plot area.
By default, this value is calculated automatically based on the space required by the axis labels, but you can override it if you want to control the precise position of the plot area within the control (for example, when aligning multiple chart controls on a page).
You may set this property to a numeric value or to a CSS-style margin specification. For example:
// set the plot margin to 20 pixels on all sides chart.plotMargin = 20; // set the plot margin for top, right, bottom, left sides chart.plotMargin = '10 15 20 25'; // set the plot margin for top/bottom (10px) and left/right (20px) chart.plotMargin = '10 20';
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets a value that determines whether angles are reversed (counter-clockwise).
The default value is false, which causes angles to be measured in the clockwise direction.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Gets or sets an enumerated value indicating whether or what is selected when the user clicks the chart.
Angular (EventEmitter) version of the Wijmo seriesVisibilityChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional seriesVisibilityChanged Wijmo event name.
Gets or sets a value that determines whether and how the series objects are stacked.
Gets or sets the starting angle for the radar, in degrees.
Angles are measured clockwise, starting at the 12 o'clock position.
Gets or sets the size of the symbols used for all Series objects in this FlexChart.
This property may be overridden by the symbolSize property on each Series object.
Gets the chart Tooltip object.
The tooltip content is generated using a template that may contain any of the following parameters:
To modify the template, assign a new value to the tooltip's content property. For example:
chart.tooltip.content = '<b>{seriesName}</b> ' +
'<img src="resources/{x}.png"/><br/>{y}';
You can disable chart tooltips by setting the template to an empty string.
You can also use the tooltip property to customize tooltip parameters such as showDelay and hideDelay:
chart.tooltip.showDelay = 1000;
See ChartTooltip properties for more details and options.
Gets or sets the total angle for the radar, in degrees. Its default value is 360. The value must be greater than 0, or less than or equal to 360.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: any, y?: number): Point
Converts a Point from data coordinates to control coordinates.
Point in data coordinates, or X coordinate of a point in data coordinates.
Y coordinate of the point (if the first parameter is a number).
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onRendered(e: RenderEventArgs): void
Raises the rendered event.
The RenderEventArgs object used to render the chart.
onRendering(e: RenderEventArgs): void
Raises the rendering event.
The RenderEventArgs object used to render the chart.
onSelectionChanged(e?: EventArgs): void
Raises the selectionChanged event.
onSeriesVisibilityChanged(e: SeriesEventArgs): void
Raises the seriesVisibilityChanged event.
The SeriesEventArgs object that contains the event data.
pageToControl(pt: any, y?: number): Point
Converts page coordinates to control coordinates.
The point of page coordinates or x value of page coordinates.
The y value of page coordinates. Its value should be a number, if pt is a number type. However, the y parameter is optional when pt is Point type.
pointToData(pt: any, y?: number): Point
Converts a Point from control coordinates to chart data coordinates.
The point to convert, in control coordinates.
The Y coordinate of the point (if the first parameter is a number).
refresh(fullUpdate?: boolean): void
Refreshes the chart.
A value indicating whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
saveImageToDataUrl(format: ImageFormat, done: Function): void
Save chart to image data url. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The ImageFormat for the exported image.
A function to be called after data url is generated. The function gets passed the data url as its argument.
saveImageToFile(filename: string): void
Save chart to an image file. The function doesn't work in IE browsers. Add wijmo.chart.render module on page to support chart export in IE browsers.
The filename for the exported image file including extension. Supported types are PNG, JPEG and SVG.
Occurs after the chart finishes rendering.
Occurs before the chart starts rendering data.
Occurs after the selection changes, whether programmatically or when the user clicks the chart. This is useful, for example, when you want to update details in a textbox showing the current selection.
Occurs when the series visibility changes, for example when the legendToggle property is set to true and the user clicks the legend.
Angular 2 component for the FlexRadarAxis control.
The wj-flex-radar-axis component must be contained in one of the following components: WjFlexRadar or WjFlexRadarSeries.
Use the wj-flex-radar-axis component to add FlexRadarAxis controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexRadarAxis component is derived from the FlexRadarAxis control and inherits all its properties, events and methods.
constructor(position?: Position): Axis
Initializes a new instance of the Axis class.
The position of the axis on the chart.
Gets the actual axis maximum.
It returns a number or a Date object (for time-based data).
Gets the actual axis minimum.
It returns a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis line is visible.
Gets or sets the comma-separated property names for the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents the corresponding axis label. The default value is 'value,text'.
Gets or sets the format string used for the axis labels (see Globalize).
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the itemFormatter function for the axis labels.
If specified, the function takes two parameters:
The function returns the label parameters of labels for which properties are modified.
For example:
chart.axisY.itemFormatter = function(engine, label) {
if (label.val > 5){
engine.textFill = 'red'; // red text
label.cls = null; // no default CSS
}
return label;
}Gets or sets the items source for the axis labels.
Names of the properties are specified by the binding property.
For example:
// default value for Axis.binding is 'value,text'
chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];Gets or sets the label alignment.
By default the labels are centered. The supported values are 'left' and 'right for x-axis and 'top' and 'bottom' for y-axis.
Gets or sets the rotation angle of the axis labels.
The angle is measured in degrees with valid values ranging from -90 to 90.
Gets or sets a value indicating whether the axis labels are visible.
Gets or sets the logarithmic base of the axis.
If the base is not specified the axis uses a linear scale.
Use the logBase property to spread data that is clustered around the origin. This is common in several financial and economic data sets.
Gets or sets a value indicating whether the axis includes grid lines.
Gets or sets the number of units between axis labels.
If the axis contains date values, then the units are expressed in days.
Gets or sets the maximum value shown on the axis.
If not set, the maximum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the minimum value shown on the axis.
If not set, the minimum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets a value indicating whether the axis includes minor grid lines.
Gets or sets the location of the minor axis tick marks.
Gets or sets the number of units between minor axis ticks.
If the axis contains date values, then the units are expressed in days.
Gets or sets the value at which an axis crosses the perpendicular axis.
Gets or sets a value indicating how to handle the overlapping axis labels.
Gets or sets the position of the axis with respect to the plot area.
Angular (EventEmitter) version of the Wijmo rangeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rangeChanged Wijmo event name.
Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).
Gets or sets a name of a property that this component is assigned to. Default value is 'axes'.
convert(val: number, maxValue?: number, minValue?: number): number
Converts the specified value from data to pixel coordinates.
The data value to convert.
The max value of the data, it's optional.
The min value of the data, it's optional.
convertBack(val: number): number
Converts the specified value from pixel to data coordinates.
The pixel coordinates to convert back.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
Angular 2 component for the FlexRadarSeries control.
The wj-flex-radar-series component must be contained in a WjFlexRadar component.
Use the wj-flex-radar-series component to add FlexRadarSeries controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjFlexRadarSeries component is derived from the FlexRadarSeries control and inherits all its properties, events and methods.
The wj-flex-radar-series component may contain a WjFlexRadarAxis child component.
constructor(options?: any): SeriesBase
Initializes a new instance of the SeriesBase class.
JavaScript object containing initialization data for the object.
Gets or sets the alternative style for the series. The values from this property will be used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.
If no value is provided, the default styles will be used.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the name of the property that contains Y values for the series.
Gets or sets the name of the property that contains X values for the series.
Gets or sets the chart type for a specific series, overriding the chart type set on the overall chart. Please note that ColumnVolume, EquiVolume, CandleVolume and ArmsCandleVolume chart types are not supported and should be set on the FinancialChart.
Gets the ICollectionView object that contains the data for this series.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the array or ICollectionView object that contains the series data.
Gets or sets the series name.
The series name is displayed in the chart legend. Any series without a name does not appear in the legend.
Angular (EventEmitter) version of the Wijmo rendered event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendered Wijmo event name.
Angular (EventEmitter) version of the Wijmo rendering event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rendering Wijmo event name.
Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets the series symbol style. Applies to Scatter, LineSymbols, and SplineSymbols chart types.
Gets or sets an enumerated value indicating whether and where the series appears.
Gets or sets a name of a property that this component is assigned to. Default value is 'series'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
dataToPoint(pt: Point): Point
Converts a Point from series data coordinates to control coordinates.
drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void
Draw a legend item at the specified position.
The rendering engine to use.
The position of the legend item.
Index of legend item(for series with multiple legend items).
getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
Returns the series bounding rectangle in data coordinates.
If getDataRect() returns null, the limits are calculated automatically based on the data values.
The current rectangle of chart. This parameter is optional.
The calculated rectangle of chart. This parameter is optional.
getPlotElement(pointIndex: number): any
Gets the plot element that corresponds to the specified point index.
The index of the data point.
hitTest(pt: any, y?: number): HitTestInfo
Gets a HitTestInfo object with information about the specified point.
The point to investigate, in window coordinates.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the series by copying the properties from a given object.
JavaScript object containing initialization data for the series.
legendItemLength(): number
Returns number of series items in the legend.
measureLegendItem(engine: IRenderEngine, index: number): Size
Measures height and width of the legend item.
The rendering engine to use.
Index of legend item(for series with multiple legend items).
onRendered(engine: IRenderEngine): void
Raises the rendered event.
The IRenderEngine object used to render the series.
onRendering(engine: IRenderEngine, index: number, count: number): boolean
Raises the rendering event.
The IRenderEngine object used to render the series.
The index of the series to render.
Total number of the series to render.
Contains Angular 2 components for the wijmo.gauge module.
wijmo.angular2.gauge is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjGauge from 'wijmo/wijmo.angular2.gauge';
@Component({
directives: [wjGauge.WjLinearGauge],
template: '<wj-linear-gauge [(value)]="amount" [isReadOnly]="false"></wj-linear-gauge>',
selector: 'my-cmp',
})
export class MyCmp {
amount = 0;
}Angular 2 component for the BulletGraph control.
Use the wj-bullet-graph component to add BulletGraph controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjBulletGraph component is derived from the BulletGraph control and inherits all its properties, events and methods.
The wj-bullet-graph component may contain a WjRange child component.
constructor(element: any, options?): BulletGraph
Initializes a new instance of the BulletGraph class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a reference value considered bad for the measure.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the direction in which the gauge is filled.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Gets or sets a reference value considered good for the measure.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets a value that indicates whether the gauge displays a shadow effect.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Angular 2 component for the LinearGauge control.
Use the wj-linear-gauge component to add LinearGauge controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjLinearGauge component is derived from the LinearGauge control and inherits all its properties, events and methods.
The wj-linear-gauge component may contain a WjRange child component.
constructor(element: any, options?): LinearGauge
Initializes a new instance of the LinearGauge class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the direction in which the gauge is filled.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets a value that indicates whether the gauge displays a shadow effect.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Angular 2 component for the RadialGauge control.
Use the wj-radial-gauge component to add RadialGauge controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjRadialGauge component is derived from the RadialGauge control and inherits all its properties, events and methods.
The wj-radial-gauge component may contain a WjRange child component.
constructor(element: any, options?): RadialGauge
Initializes a new instance of the RadialGauge class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets a value that indicates whether the gauge automatically scales to fill the host element.
Gets or sets the template used to instantiate Gauge controls.
Gets or sets the Range used to represent the gauge's overall geometry and appearance.
Gets or sets the format string used to display gauge values as text.
Gets or sets a callback that returns customized strings used to display gauge values.
Use this property if you want to customize the strings shown on the gauge in cases where the format property is not enough.
If provided, the callback should be a function as that takes as parameters the gauge, the part name, the value, and the formatted value. The callback should return the string to be displayed on the gauge.
For example:
// callback to convert values into strings
gauge.getText = function (gauge, part, value, text) {
switch (part) {
case 'value':
if (value <= 10) return 'Empty!';
if (value <= 25) return 'Low...';
if (value <= 95) return 'Good';
return 'Full';
case 'min':
return 'EMPTY';
case 'max':
return 'FULL';
}
return text;
}Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Gets or sets a value that indicates whether the gauge displays a shadow effect.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that indicates whether the gauge animates value changes.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that indicates whether the user can edit the value using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the minimum value that can be displayed on the gauge.
For details about using the min and max properties, please see the Using the min and max properties topic.
Gets or sets the starting point used for painting the range.
By default, this property is set to null, which causes the value range to start at the gauge's minimum value, or zero if the minimum is less than zero.
Gets or sets the Range used to represent the gauge's current value.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that indicates whether the gauge displays the ranges contained in the ranges property.
If this property is set to false, the ranges contained in the ranges property are not displayed in the gauge. Instead, they are used to interpolate the color of the pointer range while animating value changes.
Gets or sets the ShowText values to display as text in the gauge.
Gets or sets a property that determines whether the gauge should display tickmarks at each step value.
The tickmarks can be formatted in CSS using the wj-gauge and wj-ticks class names. For example:
.wj-gauge .wj-ticks {
stroke-width: 2px;
stroke: white;
}Gets or sets the starting angle for the gauge, in degrees.
Angles are measured in degrees, clockwise, starting from the 9 o'clock position.
Gets or sets the amount to add to or subtract from the value property when the user presses the arrow keys or moves the mouse wheel.
Gets or sets the sweeping angle for the gauge, in degrees.
Angles are measured in degrees, clockwise, starting from the 9 o'clock position.
Gets or sets the thickness of the gauge, on a scale between zero and one.
Setting the thickness to one causes the gauge to fill as much of the control area as possible. Smaller values create thinner gauges.
Gets or sets the size of the element that shows the gauge's current value, in pixels.
Gets or sets the spacing between tickmarks.
Set the showTicks property to true if you want the gauge to show tickmarks along its face. By default, the interval between tickmarks is defined by the step property.
Use the tickSpacing property to override the default and use a spacing that is different from the step value. Set the tickSpacing property to null to revert to the default behavior.
Angular (EventEmitter) version of the Wijmo valueChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional valueChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is 'value'.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: number): number
Gets a number that corresponds to the value of the gauge at a given point.
For example:
// hit test a point when the user clicks on the gauge
gauge.hostElement.addEventListener('click', function (e) {
var ht = gauge.hitTest(e.pageX, e.pageY);
if (ht != null) {
console.log('you clicked the gauge at value ' + ht.toString());
}
});The point to investigate, in window coordinates, or a MouseEvent object, or the x coordinate of the point.
The Y coordinate of the point (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onValueChanged(e?: EventArgs): void
Raises the valueChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Indicates whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Angular 2 component for the Range control.
The wj-range component must be contained in one of the following components: WjLinearGauge , WjBulletGraph or WjRadialGauge.
Use the wj-range component to add Range controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjRange component is derived from the Range control and inherits all its properties, events and methods.
constructor(name?: string): Range
Initializes a new instance of the Range class.
The name of the range.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets the thickness of this range as a percentage of the parent gauge's thickness.
Gets or sets a name of a property that this component is assigned to. Default value is 'ranges'.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
onPropertyChanged(e: PropertyChangedEventArgs): void
Raises the propertyChanged event.
PropertyChangedEventArgs that contains the property name, old, and new values.
Occurs when the value of a property in this Range changes.
Contains Angular 2 components for the wijmo.olap module.
wijmo.angular2.olap is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjOlap from 'wijmo/wijmo.angular2.olap';
@Component({
directives: [wjOlap.WjPivotGrid],
template: '<wj-pivot-grid [itemsSource]="data"></wj-pivot-grid>',
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the PivotChart control.
Use the wj-pivot-chart component to add PivotChart controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjPivotChart component is derived from the PivotChart control and inherits all its properties, events and methods.
constructor(element: any, options?): PivotChart
Initializes a new instance of the PivotChart class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets a reference to the PivotEngine that owns this PivotChart.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets the PivotEngine or PivotPanel that provides data for this PivotChart.
Gets or sets a value that determines whether and where the legend appears in relation to the plot area.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the maximum number of points to be shown in each series.
Gets or sets the maximum number of data series to be shown in the chart.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets or sets a value that determines whether the chart should group axis annotations for grouped data.
Gets or sets a value that determines whether the chart should include a legend.
Gets or sets a value that determines whether the chart should include a title.
Gets or sets a value that determines whether the chart should include only totals.
Gets or sets a value that determines whether and how the series objects are stacked.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Angular 2 component for the PivotGrid control.
Use the wj-pivot-grid component to add PivotGrid controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjPivotGrid component is derived from the PivotGrid control and inherits all its properties, events and methods.
constructor(element: any, options?): PivotGrid
Initializes a new instance of the PivotGrid class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Gets the HTMLInputElement that represents the cell editor currently active.
Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.
The new row template will not be displayed if the isReadOnly property is set to true.
Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.
Selected rows will not be deleted if the isReadOnly property is set to true.
Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.
Gets or sets which parts of the grid provide cell merging.
Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.
If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.
Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.
Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.
Gets or sets a value that determines whether the grid should handle clipboard shortcuts.
The clipboard shortcuts are as follows:
Only visible rows and columns are included in clipboard operations.
Read-only cells are not affected by paste operations.
Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.
The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).
Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:
var grid = new wijmo.grid.FlexGrid('#theGrid', {
autoGenerateColumns: false, // data items may contain null values
columns: [ // so define columns explicitly
{ binding: 'name', header: 'Name', type: 'String' },
{ binding: 'amount', header: 'Amount', type: 'Number' },
{ binding: 'date', header: 'Date', type: 'Date' },
{ binding: 'active', header: 'Active', type: 'Boolean' }
],
itemsSource: customers
});Angular (EventEmitter) version of the Wijmo autoSizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedRow Wijmo event name.
Gets or sets which cells should be taken into account when auto-sizing a row or column.
This property controls what happens when users double-click the edge of a column header.
By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.
Angular (EventEmitter) version of the Wijmo autoSizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo autoSizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo beginningEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional beginningEdit Wijmo event name.
Gets the GridPanel that contains the bottom left cells.
The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.
Angular (EventEmitter) version of the Wijmo cellEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo cellEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnding Wijmo event name.
Gets or sets the CellFactory that creates and updates cells for this grid.
Gets or sets a value that determines whether the content of header cells should be vertically centered.
Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.
Set this property to a string to specify the name of the property that
contains an item's child items (e.g. 'items').
If items at different levels child items with different names, then
set this property to an array containing the names of the properties
that contain child items et each level
(e.g. [ 'accounts', 'checks', 'earnings' ]).
Gets the client size of the control (control size minus headers and scrollbars).
Gets or sets a value that determines whether the FlexGrid should clone frozen cells and show then in a separate element to improve perceived performance while scrolling.
This property is set to null by default, which causes the grid to select the best setting depending on the browser.
Gets or sets a value that determines whether the grid should allow users to collapse and expand subtotal groups of rows and columns.
Gets the ICollectionView that contains the grid data.
Gets the GridPanel that contains the column header cells.
Gets or sets a JSON string that defines the current column layout.
The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.
The column layout string does not include dataMap properties, because data maps are not serializable.
Gets the bounding rectangle of the control in page coordinates.
Gets or sets the template used to instantiate FlexGrid controls.
Angular (EventEmitter) version of the Wijmo copied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copied Wijmo event name.
Angular (EventEmitter) version of the Wijmo copying event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copying Wijmo event name.
Gets or sets a value that determines whether the grid should provide a custom context menu.
The custom context menu includes commands for changing field settings, removing fields, or showing detail records for the grid cells.
Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.
By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.
Angular (EventEmitter) version of the Wijmo deletedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo deletingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingColumnOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumnOver Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo draggingRowOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowOver Wijmo event name.
Gets the IEditableCollectionView that contains the grid data.
Gets a CellRange that identifies the cell currently being edited.
Gets a reference to the PivotEngine that owns this PivotGrid.
Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.
Gets or sets the number of frozen columns.
Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.
Gets or sets the number of frozen rows.
Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo groupCollapsedChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanging Wijmo event name.
Gets or sets the format string used to create the group header content.
The string may contain any text, plus the following replacement strings:
If a column is bound to the grouping property, the column header is used
to replace the {name} parameter, and the column's format and
data maps are used to calculate the {value} parameter.
If no column is available, the group information is used instead.
You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.
The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)',
which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.
Gets or sets a value that determines whether the row and column headers are visible.
Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.
This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets or sets a value that determines whether the user can modify cell values using the mouse and keyboard.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a formatter function used to customize cells on this grid.
The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.
If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.
For example:
flex.itemFormatter = function(panel, r, c, cell) {
if (panel.cellType == CellType.Cell) {
// draw sparklines in the cell
var col = panel.columns[c];
if (col.name == 'sparklines') {
cell.innerHTML = getSparklike(panel, r, c);
}
}
}
Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:
flex.itemFormatter = function(panel, r, c, cell) {
// reset attributes we are about to customize
var s = cell.style;
s.color = '';
s.backgroundColor = '';
// customize color and backgroundColor attributes for this cell
...
}
If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.
Gets or sets the array or ICollectionView that contains items shown on the grid.
Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.
Gets or sets a validator function to determine whether cells contain valid data.
If specified, the validator function should take two parameters containing the cell's row and column indices, and should return a string containing the error description.
This property is especially useful when dealing with unbound grids, since bound grids can be validated using the getError property instead.
This example shows how you could prevent cells from containing the same data as the cell immediately above it:
// check that the cell above doesn't contain the same value as this one
theGrid.itemValidator = function (row, col) {
if (row > 0) {
var valThis = theGrid.getCellData(row, col, false),
valPrev = theGrid.getCellData(row - 1, col, false);
if (valThis != null && valThis == valPrev) {
return 'This is a duplicate value...'
}
}
return null; // no errors
}Gets or sets the action to perform when the ENTER key is pressed.
The default setting for this property is MoveDown, which causes the control to move the selection to the next row. This is the standard Excel behavior.
Gets or sets the action to perform when the TAB key is pressed.
The default setting for this property is None, which causes the browser to select the next or previous controls on the page when the TAB key is pressed. This is the recommended setting to improve page accessibility.
In previous versions, the default was set to Cycle, which caused the control to move the selection across and down the grid. This is the standard Excel behavior, but is not good for accessibility.
There is also a CycleOut setting that causes the selection to move through the cells (as Cycle), and then on to the next/previous control on the page when the last or first cells are selected.
Angular (EventEmitter) version of the Wijmo loadedRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadedRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo loadingRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadingRows Wijmo event name.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets or sets the MergeManager object responsible for determining how cells should be merged.
Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.
If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.
The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.
Angular (EventEmitter) version of the Wijmo pastedCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastedCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasted Wijmo event name.
Angular (EventEmitter) version of the Wijmo pastingCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastingCell Wijmo event name.
Angular (EventEmitter) version of the Wijmo pasting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasting Wijmo event name.
Angular (EventEmitter) version of the Wijmo prepareCellForEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional prepareCellForEdit Wijmo event name.
Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.
The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.
Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.
Angular (EventEmitter) version of the Wijmo resizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedRow Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo resizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingRow Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo rowAdded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowAdded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnded Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnding Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarted Wijmo event name.
Angular (EventEmitter) version of the Wijmo rowEditStarting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarting Wijmo event name.
Gets or sets the name of the property used to create row header cells.
Row header cells are not visible or selectable. They are meant for use with accessibility tools.
Gets the GridPanel that contains the row header cells.
Gets or sets a Point that represents the value of the grid's scrollbars.
Angular (EventEmitter) version of the Wijmo scrollPositionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional scrollPositionChanged Wijmo event name.
Gets or sets an array containing the data items that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Gets or sets an array containing the rows that are currently selected.
Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.
Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo selectionChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanging Wijmo event name.
Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.
Setting this property to false disables alternate row styles without any changes to the CSS.
Gets or sets a value that determines whether the grid should display column field headers in its top-left panel.
Gets or sets a value that determines whether the grid should show a popup containing the detail records when the user double-clicks a cell.
Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in columns that have the showDropDown property set to true.
The drop-down buttons are shown only on columns that have a dataMap set and are editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.
Cell drop-downs require the wijmo.input module to be loaded.
Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.
The grid detects validation errors using the itemValidator property or the getError property on the grid's itemsSource.
Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.
Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.
Gets or sets a value that determines whether the grid should display row field headers in its top-left panel.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers for row fields.
Unlike regular column headers, row fields are always sorted, either in ascending or descending order. If you set this property to true, sort icons will always be displayed over any row field headers.
Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.
Gets or sets a value that determines whether the grid should display sort indicators in the column headers.
Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.
Angular (EventEmitter) version of the Wijmo sortedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortedColumn Wijmo event name.
Angular (EventEmitter) version of the Wijmo sortingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortingColumn Wijmo event name.
Gets or sets the index of row in the column header panel that shows and changes the current sort.
This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.
Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.
Gets the GridPanel that contains the top left cells (to the left of the column headers).
Gets or sets the indent used to offset row groups of different levels.
Angular (EventEmitter) version of the Wijmo updatedLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingLayout Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.
Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.
The grid detects validation errors by calling the getError method on the grid's itemsSource.
Gets or sets the minimum number of rows required to enable virtualization.
This property is set to zero by default, meaning virtualization is always enabled. This improves binding performance and memory requirements, at the expense of a small performance decrease while scrolling.
If your grid has a small number of rows (about 50 to 100), you may be able to improve scrolling performance by setting this property to a slightly higher value (like 150). This will disable virtualization and will slow down binding, but may improve perceived scroll performance.
Setting this property to values higher than 200 is not recommended. Loading times will become too long; the grid will freeze for a few seconds while creating cells for all rows, and the browser will become slow because of the large number of elements on the page.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
autoSizeColumn(c: number, header?: boolean, extra?: number): void
Resizes a column to fit its content.
Index of the column to resize.
Whether the column index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void
Resizes a range of columns to fit their content.
The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.
Index of the first column to resize (defaults to the first column).
Index of the last column to resize (defaults to the last column).
Whether the column indices refer to regular or header columns.
Extra spacing, in pixels.
autoSizeRow(r: number, header?: boolean, extra?: number): void
Resizes a row to fit its content.
Index of the row to resize.
Whether the row index refers to a regular or a header row.
Extra spacing, in pixels.
autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void
Resizes a range of rows to fit their content.
Index of the first row to resize.
Index of the last row to resize.
Whether the row indices refer to regular or header rows.
Extra spacing, in pixels.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canEditCell(r: number, c: number): void
Gets a value that indicates whether a given cell can be edited.
Index of the row that contains the cell.
Index of the column that contains the cell.
collapseColumnsToLevel(level: number): void
Collapses all columns to a given level.
Maximum column level to show. Zero means show only grand totals; one means show only top-level groups; very high levels expand all columns.
collapseGroupsToLevel(level: number): void
Collapses all the group rows to a given level.
Maximum group level to show.
collapseRowsToLevel(level: number): void
Collapses all rows to a given level.
Maximum row level to show. Zero means show only grand totals; one means show only top-level groups; very high levels expand all rows.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
finishEditing(cancel?: boolean): boolean
Commits any pending edits and exits edit mode.
Whether pending edits should be canceled or committed.
focus(): void
Overridden to set the focus to the grid without scrolling the whole grid into view.
getCellBoundingRect(r: number, c: number, raw?: boolean): Rect
Gets a the bounds of a cell element in viewport coordinates.
This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.
The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to return the rectangle in raw panel coordinates as opposed to viewport coordinates.
getCellData(r: number, c: number, formatted: boolean): any
Gets the value stored in a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index of the column that contains the cell.
Whether to format the value for display.
getClipString(rng?: CellRange): string
Gets the content of a CellRange as a string suitable for copying to the clipboard.
Hidden rows and columns are not included in the clip string.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getDetail(row: number, col: number): any[]
Gets an array containing the records summarized by a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
getDetailView(row: number, col: number): ICollectionView
Gets an ICollectionView containing the records summarized by a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
getKeys(row: number, col: number): any
Gets an object with information about the fields and values being used to summarize a given cell.
For more details, see the @PivotEngine.getKeys method.
Index of the row that contains the cell.
Index of the column that contains the cell.
getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange
getSelectedState(r: number, c: number): SelectedState
Gets a SelectedState value that indicates the selected state of a cell.
Row index of the cell to inspect.
Column index of the cell to inspect.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
hitTest(pt: any, y?: any): HitTestInfo
Gets a HitTestInfo object with information about a given point.
For example:
// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
var ht = flex.hitTest(e.pageX, e.pageY);
console.log('you clicked a cell of type "' +
wijmo.grid.CellType[ht.cellType] + '".');
});Point to investigate, in page coordinates, or a MouseEvent object, or x coordinate of the point.
Y coordinate of the point in page coordinates (if the first parameter is a number).
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
isRangeValid(rng: CellRange): boolean
Checks whether a given CellRange is valid for this grid's row and column collections.
Range to check.
onAutoSizedColumn(e: CellRangeEventArgs): void
Raises the autoSizedColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizedRow(e: CellRangeEventArgs): void
Raises the autoSizedRow event.
CellRangeEventArgs that contains the event data.
onAutoSizingColumn(e: CellRangeEventArgs): boolean
Raises the autoSizingColumn event.
CellRangeEventArgs that contains the event data.
onAutoSizingRow(e: CellRangeEventArgs): boolean
Raises the autoSizingRow event.
CellRangeEventArgs that contains the event data.
onBeginningEdit(e: CellRangeEventArgs): boolean
Raises the beginningEdit event.
CellRangeEventArgs that contains the event data.
onCellEditEnded(e: CellRangeEventArgs): void
Raises the cellEditEnded event.
CellRangeEventArgs that contains the event data.
onCellEditEnding(e: CellEditEndingEventArgs): boolean
Raises the cellEditEnding event.
CellEditEndingEventArgs that contains the event data.
onCopied(e: CellRangeEventArgs): void
Raises the copied event.
CellRangeEventArgs that contains the event data.
onCopying(e: CellRangeEventArgs): boolean
Raises the copying event.
CellRangeEventArgs that contains the event data.
onDeletedRow(e: CellRangeEventArgs): void
Raises the deletedRow event.
CellRangeEventArgs that contains the event data.
onDeletingRow(e: CellRangeEventArgs): boolean
Raises the deletingRow event.
CellRangeEventArgs that contains the event data.
onDraggedColumn(e: CellRangeEventArgs): void
Raises the draggedColumn event.
CellRangeEventArgs that contains the event data.
onDraggedRow(e: CellRangeEventArgs): void
Raises the draggedRow event.
CellRangeEventArgs that contains the event data.
onDraggingColumn(e: CellRangeEventArgs): boolean
Raises the draggingColumn event.
CellRangeEventArgs that contains the event data.
onDraggingColumnOver(e: CellRangeEventArgs): boolean
Raises the draggingColumnOver event.
CellRangeEventArgs that contains the event data.
onDraggingRow(e: CellRangeEventArgs): boolean
Raises the draggingRow event.
CellRangeEventArgs that contains the event data.
onDraggingRowOver(e: CellRangeEventArgs): boolean
Raises the draggingRowOver event.
CellRangeEventArgs that contains the event data.
onFormatItem(e: FormatItemEventArgs): void
Raises the formatItem event.
FormatItemEventArgs that contains the event data.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onGroupCollapsedChanged(e: CellRangeEventArgs): void
Raises the groupCollapsedChanged event.
CellRangeEventArgs that contains the event data.
onGroupCollapsedChanging(e: CellRangeEventArgs): boolean
Raises the groupCollapsedChanging event.
CellRangeEventArgs that contains the event data.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLoadedRows(e?: EventArgs): void
Raises the loadedRows event.
onLoadingRows(e: CancelEventArgs): boolean
Raises the loadingRows event.
CancelEventArgs that contains the event data.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onPasted(e: CellRangeEventArgs): void
Raises the pasted event.
CellRangeEventArgs that contains the event data.
onPastedCell(e: CellRangeEventArgs): void
Raises the pastedCell event.
CellRangeEventArgs that contains the event data.
onPasting(e: CellRangeEventArgs): boolean
Raises the pasting event.
CellRangeEventArgs that contains the event data.
onPastingCell(e: CellRangeEventArgs): boolean
Raises the pastingCell event.
CellRangeEventArgs that contains the event data.
onPrepareCellForEdit(e: CellRangeEventArgs): void
Raises the prepareCellForEdit event.
CellRangeEventArgs that contains the event data.
onResizedColumn(e: CellRangeEventArgs): void
Raises the resizedColumn event.
CellRangeEventArgs that contains the event data.
onResizedRow(e: CellRangeEventArgs): void
Raises the resizedRow event.
CellRangeEventArgs that contains the event data.
onResizingColumn(e: CellRangeEventArgs): boolean
Raises the resizingColumn event.
CellRangeEventArgs that contains the event data.
onResizingRow(e: CellRangeEventArgs): boolean
Raises the resizingRow event.
CellRangeEventArgs that contains the event data.
onRowAdded(e: CellRangeEventArgs): boolean
Raises the rowAdded event.
CellRangeEventArgs that contains the event data.
onRowEditEnded(e: CellRangeEventArgs): void
Raises the rowEditEnded event.
CellRangeEventArgs that contains the event data.
onRowEditEnding(e: CellRangeEventArgs): void
Raises the rowEditEnding event.
CellRangeEventArgs that contains the event data.
onRowEditStarted(e: CellRangeEventArgs): void
Raises the rowEditStarted event.
CellRangeEventArgs that contains the event data.
onRowEditStarting(e: CellRangeEventArgs): void
Raises the rowEditStarting event.
CellRangeEventArgs that contains the event data.
onScrollPositionChanged(e?: EventArgs): void
Raises the scrollPositionChanged event.
onSelectionChanged(e: CellRangeEventArgs): void
Raises the selectionChanged event.
CellRangeEventArgs that contains the event data.
onSelectionChanging(e: CellRangeEventArgs): boolean
Raises the selectionChanging event.
CellRangeEventArgs that contains the event data.
onSortedColumn(e: CellRangeEventArgs): void
Raises the sortedColumn event.
CellRangeEventArgs that contains the event data.
onSortingColumn(e: CellRangeEventArgs): boolean
Raises the sortingColumn event.
CellRangeEventArgs that contains the event data.
onUpdatedLayout(e?: EventArgs): void
Raises the updatedLayout event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingLayout(e: CancelEventArgs): boolean
Raises the updatingLayout event.
CancelEventArgs that contains the event data.
onUpdatingView(e: CancelEventArgs): boolean
Raises the updatingView event.
CancelEventArgs that contains the event data.
refresh(fullUpdate?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void
Refreshes the grid display.
Whether to update the grid layout and content, or just the content.
Whether to recycle existing elements.
Whether to keep existing elements and update their state.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
scrollIntoView(r: number, c: number): boolean
Scrolls the grid to bring a specific cell into view.
Index of the row to scroll into view.
Index of the column to scroll into view.
select(rng: any, show?: any): void
Selects a cell range and optionally scrolls it into view.
Range to select.
Whether to scroll the new selection into view.
setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean
Sets the value of a cell in the scrollable area of the grid.
Index of the row that contains the cell.
Index, name, or binding of the column that contains the cell.
Value to store in the cell.
Whether to change the value automatically to match the column's data type.
Whether to invalidate the grid to show the change.
setClipString(text: string, rng?: CellRange): void
Parses a string into rows and columns and applies the content to a given range.
Hidden rows and columns are skipped.
Tab and newline delimited text to parse into the grid.
CellRange to copy. If omitted, the current selection is used.
showDetail(row: number, col: number): void
Shows a dialog containing details for a given grid cell.
Index of the row that contains the cell.
Index of the column that contains the cell.
startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean
Starts editing a given cell.
Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.
Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.
Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.
While editing, the user can toggle between full and quick modes by pressing the F2 key.
Whether to stay in edit mode when the user presses the cursor keys. Defaults to true.
Index of the row to be edited. Defaults to the currently selected row.
Index of the column to be edited. Defaults to the currently selected column.
Whether to give the editor the focus when editing starts. Defaults to true.
toggleDropDownList(): void
Toggles the drop-down list-box associated with the currently selected cell.
This method can be used to show the drop-down list automatically when the cell enters edit mode, or when the user presses certain keys.
For example, this code causes the grid to show the drop-down list whenever the grid enters edit mode:
// show the drop-down list when the grid enters edit mode
theGrid.beginningEdit = function () {
theGrid.toggleDropDownList();
}
This code causes the grid to show the drop-down list when the grid enters edit mode after the user presses the space bar:
// show the drop-down list when the user presses the space bar
theGrid.hostElement.addEventListener('keydown', function (e) {
if (e.keyCode == 32) {
e.preventDefault();
theGrid.toggleDropDownList();
}
}, true);Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.
Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.
Occurs before a cell enters edit mode.
Occurs when a cell edit has been committed or canceled.
Occurs when a cell edit is ending.
You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.
function cellEditEnding (sender, e) {
// get old and new values
var flex = sender,
oldVal = flex.getCellData(e.row, e.col),
newVal = flex.activeEditor.value;
// cancel edits if newVal doesn't contain 'a'
e.cancel = newVal.indexOf('a') < 0;
}
Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.
If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.
Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).
Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).
The event handler may cancel the row deletion.
Occurs when the user finishes dragging a column.
Occurs when the user finishes dragging a row.
Occurs when the user starts dragging a column.
Occurs as the user drags a column to a new position.
The handler may cancel the event to prevent users from dropping columns at certain positions. For example:
// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
theColumn = s.columns[e.col].binding;
});
// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
if (theColumn == 'sales' && e.col == 0) {
e.cancel = true;
}
});Occurs when the user starts dragging a row.
Occurs as the user drags a row to a new position.
Occurs when an element representing a cell has been created.
This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.
For example, this code removes the 'wj-wrap' class from cells in group rows:
flex.formatItem.addHandler(function (s, e) {
if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
wijmo.removeClass(e.cell, 'wj-wrap');
}
});Occurs after a group has been expanded or collapsed.
Occurs when a group is about to be expanded or collapsed.
Occurs after the grid has been bound to a new items source.
Occurs after the grid rows have been bound to items in the data source.
Occurs before the grid rows are bound to items in the data source.
Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).
Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).
The event handler may cancel the copy operation.
Occurs when an editor cell is created and before it becomes active.
Occurs when the user finishes resizing a column.
Occurs when the user finishes resizing rows.
Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).
The event handler may customize the content of the new item or cancel the new item creation.
Occurs when a row edit has been committed or canceled.
Occurs when a row edit is ending, before the changes are committed or canceled.
This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:
// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
var item = s.collectionView.currentEditItem;
itemData = {};
s.columns.forEach(function (col) {
if (col.binding.indexOf('.') > -1) { // deep binding
var binding = new wijmo.Binding(col.binding);
itemData[col.binding] = binding.getValue(item);
}
})
});
// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
if (e.cancel) { // edits were canceled by the user
var item = s.collectionView.currentEditItem;
for (var k in itemData) {
var binding = new wijmo.Binding(k);
binding.setValue(item, itemData[k]);
}
}
itemData = {};
});Occurs after a row enters edit mode.
Occurs before a row enters edit mode.
Occurs after the control has scrolled.
Occurs before selection changes.
Occurs after the user applies a sort by clicking on a column header.
Occurs before the user applies a sort by clicking on a column header.
Occurs after the grid has updated its internal layout.
Occurs when the grid finishes creating/updating the elements that make up the current view.
The grid updates the view in response to several actions, including:
Occurs before the grid updates its internal layout.
Occurs when the grid starts creating/updating the elements that make up the current view.
Angular 2 component for the PivotPanel control.
Use the wj-pivot-panel component to add PivotPanel controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjPivotPanel component is derived from the PivotPanel control and inherits all its properties, events and methods.
constructor(element: any, options?): PivotPanel
Initializes a new instance of the PivotPanel class.
The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
The JavaScript object containing initialization data for the control.
Gets or sets a value that determines whether the engine should populate the fields collection automatically based on the itemsSource.
Gets the ICollectionView that contains the raw data.
Gets the list of fields that define the columns in the output table.
Gets or sets the template used to instantiate PivotPanel controls.
Gets or sets the PivotEngine being controlled by this PivotPanel.
Gets the list of fields available for building views.
Gets the list of fields that define filters applied while generating the output table.
Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets a value that determines whether a pivot view is currently defined.
A pivot view is defined if the valueFields list is not empty and either the rowFields or columnFields lists are not empty.
Gets or sets the array or ICollectionView that contains the raw data.
Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.
Gets the ICollectionView containing the output pivot view.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Gets the list of fields that define the rows in the output table.
Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.
Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.
Gets the list of fields that define the values shown in the output table.
Gets or sets the current pivot view definition as a JSON string.
This property is typically used to persist the current view as an application setting.
For example, the code below implements two functions that save and load view definitions using local storage:
// save/load views
function saveView() {
localStorage.viewDefinition = pivotPanel.viewDefinition;
}
function loadView() {
pivotPanel.viewDefinition = localStorage.viewDefinition;
}Angular (EventEmitter) version of the Wijmo viewDefinitionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional viewDefinitionChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onItemsSourceChanged(e?: EventArgs): void
Raises the itemsSourceChanged event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onUpdatedView(e?: EventArgs): void
Raises the updatedView event.
onUpdatingView(e: ProgressEventArgs): void
Raises the updatingView event.
ProgressEventArgs that provides the event data.
onViewDefinitionChanged(e?: EventArgs): void
Raises the viewDefinitionChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
Occurs after the value of the itemsSource property changes.
Occurs after the engine has finished updating the pivotView list.
Occurs when the engine starts updating the pivotView list.
Occurs after the view definition changes.
Contains Angular 2 components for the wijmo.viewer module.
wijmo.angular2.viewer is an external TypeScript module that can be imported to your code using its ambient module name. For example:
import * as wjViewer from 'wijmo/wijmo.angular2.viewer';
@Component({
directives: [wjViewer.WjReportViewer, wjViewer.WjPdfViewer],
template: `
<wj-report-viewer [reportName]="sales" [serviceUrl]="'webserviceApi'">
</wj-report-viewer;`,
selector: 'my-cmp',
})
export class MyCmp {
data: any[];
}Angular 2 component for the PdfViewer control.
Use the wj-pdf-viewer component to add PdfViewer controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjPdfViewer component is derived from the PdfViewer control and inherits all its properties, events and methods.
constructor(element: any, options?: any): PdfViewer
Initializes a new instance of the PdfViewer class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate the viewer controls.
Gets or sets the full path to the document on the server.
The path starts with the key of a provider which is registered at server for locating specified document.
Gets or sets a value indicating whether the viewer is under full screen mode.
Angular (EventEmitter) version of the Wijmo fullScreenChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional fullScreenChanged Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value indicating the mouse behavior.
The default is SelectTool which means clicking and dragging the mouse will select the text.
Angular (EventEmitter) version of the Wijmo mouseModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional mouseModeChanged Wijmo event name.
Gets the index of the page which is currently displayed in the view panel.
Angular (EventEmitter) version of the Wijmo pageIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pageIndexChanged Wijmo event name.
Angular (EventEmitter) version of the Wijmo queryLoadingData event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional queryLoadingData Wijmo event name.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo selectMouseModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectMouseModeChanged Wijmo event name.
Gets or sets the address of C1 Web API service.
For example, "http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report".
Gets or sets the threshold to switch between mobile and PC template.
Default value is 767px. If width of control is smaller than thresholdWidth, mobile template will be applied. If width of control is equal or greater than thresholdWidth, PC template will be applied. If thresholdWidth is set to 0, then only PC template is applied and if it's set to a large number e.g. 9999, then only mobile template is applied.
Gets or sets a value indicating how to show the document pages.
Angular (EventEmitter) version of the Wijmo viewModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional viewModeChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
Gets or sets a value indicating the current zoom factor to show the document pages.
Angular (EventEmitter) version of the Wijmo zoomFactorChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional zoomFactorChanged Wijmo event name.
Gets or sets a value indicating the current zoom mode to show the document pages.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
moveToPage(index: number): IPromise
Moves to the page at the specified index.
Index (0-base) of the page to move to.
onFullScreenChanged(e?: EventArgs): void
Raises the fullScreenChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onMouseModeChanged(e?: EventArgs): void
Raises the mouseModeChanged event.
onPageIndexChanged(e?: EventArgs): void
Raises the pageIndexChanged event.
onQueryLoadingData(e: QueryLoadingDataEventArgs): void
Raises the queryLoadingData event.
The QueryLoadingDataEventArgs object that contains the loading data.
onSelectMouseModeChanged(e?: EventArgs): void
Deprecated: use onMouseModeChanged instead.
onViewModeChanged(e?: EventArgs): void
Raises the viewModeChanged event.
onZoomFactorChanged(e?: EventArgs): void
Raises the zoomFactorChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
reload(): void
Reloads the document.
This is useful for force reloading and rerendering the document.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
showPageSetupDialog(): void
Shows the page setup dialog.
zoomToView(): void
Scales the current page to show the whole page in view panel.
zoomToViewWidth(): void
Scales the current page to fit the width of the view panel.
Occurs after the full screen mode is changed.
Occurs after the mouse mode is changed.
Occurs after the page index is changed.
Occurs when querying the request data sent to the service before loading the document.
Deprecated: use mouseModeChanged instead.
Occurs after the zoom factor is changed.
Angular 2 component for the ReportViewer control.
Use the wj-report-viewer component to add ReportViewer controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.
The WjReportViewer component is derived from the ReportViewer control and inherits all its properties, events and methods.
constructor(element: any, options?: any): ReportViewer
Initializes a new instance of the ReportViewer class.
The DOM element that will host the control, or a selector for the host element (e.g. '#theCtrl').
JavaScript object containing initialization data for the control.
Allows you to override the global WjOptions.asyncBindings setting for this specific component. See the WjOptions.asyncBindings property description for details.
Gets or sets the template used to instantiate the viewer controls.
Gets or sets the full path to the document on the server.
The path starts with the key of a provider which is registered at server for locating specified document.
Gets or sets a value indicating whether the viewer is under full screen mode.
Angular (EventEmitter) version of the Wijmo fullScreenChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional fullScreenChanged Wijmo event name.
This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.
Gets or sets a value that determines whether the control is disabled.
Disabled controls cannot get mouse or keyboard events.
Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.
Gets a value that indicates whether the control is currently handling a touch event.
Gets a value that indicates whether the control is currently being updated.
Gets or sets a value indicating the mouse behavior.
The default is SelectTool which means clicking and dragging the mouse will select the text.
Angular (EventEmitter) version of the Wijmo mouseModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional mouseModeChanged Wijmo event name.
Gets the index of the page which is currently displayed in the view panel.
Angular (EventEmitter) version of the Wijmo pageIndexChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pageIndexChanged Wijmo event name.
Gets or sets a value indicating whether the content should be represented as a set of fixed sized pages.
The default value is null which means using paginated mode for a FlexReport and non-paginaged mode for an SSRS report.
Angular (EventEmitter) version of the Wijmo queryLoadingData event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional queryLoadingData Wijmo event name.
Gets or sets the report name.
For FlexReport, sets it with the report name defined in the FlexReport definition file. For SSRS report, leave it as empty string. The SSRS report path is specified by the filePath property.
Gets a value indicating whether the control is hosted in an element with right-to-left layout.
Angular (EventEmitter) version of the Wijmo selectMouseModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectMouseModeChanged Wijmo event name.
Gets or sets the address of C1 Web API service.
For example, "http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report".
Gets or sets the threshold to switch between mobile and PC template.
Default value is 767px. If width of control is smaller than thresholdWidth, mobile template will be applied. If width of control is equal or greater than thresholdWidth, PC template will be applied. If thresholdWidth is set to 0, then only PC template is applied and if it's set to a large number e.g. 9999, then only mobile template is applied.
Gets or sets a value indicating how to show the document pages.
Angular (EventEmitter) version of the Wijmo viewModeChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional viewModeChanged Wijmo event name.
Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.
Gets or sets a value indicating the current zoom factor to show the document pages.
Angular (EventEmitter) version of the Wijmo zoomFactorChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional zoomFactorChanged Wijmo event name.
Gets or sets a value indicating the current zoom mode to show the document pages.
addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void
Adds an event listener to an element owned by this Control.
The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener methods).
Failing to remove event listeners may cause memory leaks.
Target element for the event.
String that specifies the event.
Function to execute when the event occurs.
Whether the listener is capturing.
applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement
Applies the template to a new instance of a control, and returns the root element.
This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.
For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');Names of classes to add to the control's host element.
An HTML string that defines the control template.
A dictionary of part variables and their names.
Name of the part to be named after the host element. This determines how the control submits data when used in forms.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
containsFocus(): boolean
Checks whether this control contains the focused element.
created(): void
If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed.
dispose(): void
Disposes of the control by removing its association with the host element.
The dispose method automatically removes any event listeners added with the addEventListener method.
Calling the dispose method is important in applications that create and remove controls dynamically. Failing to dispose of the controls may cause memory leaks.
disposeAll(e?: HTMLElement): void
Disposes of all Wijmo controls contained in an HTML element.
Container element.
endUpdate(): void
Resumes notifications suspended by calls to beginUpdate.
getControl(element: any): Control
Gets the control that is hosted in a given DOM element.
The DOM element that is hosting the control, or a selector for the host element (e.g. '#theCtrl').
getReportNames(serviceUrl: string, reportFilePath: string): IPromise
Gets the report names defined in the specified FlexReport definition file.
The address of C1 Web API service.
The full path to the FlexReport definition file.
getReports(serviceUrl: string, path: string, data?: any): IPromise
Gets the catalog items in the specified folder path.
You can get all items under the folder path by passing the data parameter as: 1) A true value. 2) An object which has the "recursive" property with true value.
The address of C1 Web API service.
The folder path. The path to the FlexReport definition file will be treated as a folder path.
The request data sent to the report service, or a boolean value indicates whether getting all items under the path.
getTemplate(): string
Gets the HTML template used to create instances of the control.
This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.
initialize(options: any): void
Initializes the control by copying the properties from a given object.
This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.
For example:
grid.initialize({
itemsSource: myList,
autoGenerateColumns: false,
columns: [
{ binding: 'id', header: 'Code', width: 130 },
{ binding: 'name', header: 'Name', width: 60 }
]
});
// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;
// etc.
The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.
Object that contains the initialization data.
invalidate(fullUpdate?: boolean): void
Invalidates the control causing an asynchronous refresh.
Whether to update the control layout as well as the content.
invalidateAll(e?: HTMLElement): void
Invalidates all Wijmo controls contained in an HTML element.
Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.
If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
moveToPage(index: number): IPromise
Moves to the page at the specified index.
Index (0-base) of the page to move to.
onFullScreenChanged(e?: EventArgs): void
Raises the fullScreenChanged event.
onGotFocus(e?: EventArgs): void
Raises the gotFocus event.
onLostFocus(e?: EventArgs): void
Raises the lostFocus event.
onMouseModeChanged(e?: EventArgs): void
Raises the mouseModeChanged event.
onPageIndexChanged(e?: EventArgs): void
Raises the pageIndexChanged event.
onQueryLoadingData(e: QueryLoadingDataEventArgs): void
Raises the queryLoadingData event.
The QueryLoadingDataEventArgs object that contains the loading data.
onSelectMouseModeChanged(e?: EventArgs): void
Deprecated: use onMouseModeChanged instead.
onViewModeChanged(e?: EventArgs): void
Raises the viewModeChanged event.
onZoomFactorChanged(e?: EventArgs): void
Raises the zoomFactorChanged event.
refresh(fullUpdate?: boolean): void
Refreshes the control.
Whether to update the control layout as well as the content.
refreshAll(e?: HTMLElement): void
Refreshes all Wijmo controls contained in an HTML element.
This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.
Container element. If set to null, all Wijmo controls on the page will be invalidated.
reload(): void
Reloads the document.
This is useful for force reloading and rerendering the document.
removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number
Removes one or more event listeners attached to elements owned by this Control.
Target element for the event. If null, removes listeners attached to all targets.
String that specifies the event. If null, removes listeners attached to all events.
Handler to remove. If null, removes all handlers.
Whether the listener is capturing. If null, removes capturing and non-capturing listeners.
showPageSetupDialog(): void
Shows the page setup dialog.
zoomToView(): void
Scales the current page to show the whole page in view panel.
zoomToViewWidth(): void
Scales the current page to fit the width of the view panel.
Occurs after the full screen mode is changed.
Occurs after the mouse mode is changed.
Occurs after the page index is changed.
Occurs when querying the request data sent to the service before loading the document.
Deprecated: use mouseModeChanged instead.
Occurs after the zoom factor is changed.
Wijmo interop module for React.
This module provides React components that encapsulate Wijmo controls.
To use it, your application must include references to the React and ReactDOM libraries, as well as the regular Wijmo CSS and js files.
To add Wijmo controls to React components, include the appropriate tags in your JSX (or TSX) files. For example, the code below adds an InputNumber control to a React component:
<label htmlFor="inputnumber">Here's an InputNumber control:</label>
<Wj.InputNumber
id="inputNumber"
format="c2"
min={ 0 } max={ 10 } step={ .5 }
value={ this.state.value }
valueChanged={ this.valueChanged }/>
The example illustrates the following important points:
To illustrate this last point, the component that contains the markup given above would typically implement a "valueChanged" event handler as follows:
valueChanged: function(s, e) {
this.setState({ value, s.value });
}
The event handler calls React's setState method to update the component state, automatically triggering a UI update. Notice that the method does not write directly into the "state" object, which should be treated as immutable in React applications.
All Wijmo React components include an "initialized" event that is raised after the control has been added to the page and initialized. You can use this event to perform additional initialization in addition to setting properties in markup. For example:
<Wj.FlexGrid
initialized={ function(s,e) {
// assign a custom MergeManager to the grid
s.mergeManager = new CustomMergeManager(s);
}}
/>React component that encapsulates the AutoComplete control.
React component that encapsulates the BulletGraph control.
The example below shows how to instantiate and initialize a BulletGraph control in JSX:
<Wj.BulletGraph
min={ 0 } max={ 1000 } step={ 50 } isReadOnly={ false }
value={ this.state.view.currentItem.sales }
valueChanged={ this.salesChanged }
format="c0" thumbSize={ 20 } showRanges={ false }
face={{ thickness:0.5 }}
pointer={{ thickness:0.5 }}
ranges={[
{ min: 0, max: 333, color: 'red' },
{ min: 333, max: 666, color: 'gold' },
{ min: 666, max: 1000, color: 'green' }
]} />
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it sets the value and valueChanged properties to create a two-way binding for the gauge's value.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
React component that encapsulates the Calendar control.
React component that encapsulates the ColorPicker control.
React component that encapsulates the ComboBox control.
Base class for all Wijmo components for React.
React component that encapsulates the FinancialChart control.
React component that encapsulates the FlexChart control.
The example below shows how to instantiate and initialize a FlexChart control in JSX:
<Wj.FlexChart
itemsSource={ this.state.data }
bindingX="name"
header={ this.state.header }
footer={ this.state.footer }
axisX={{ title: this.state.titleX }}
axisY={{ title: this.state.titleY }}
legend={{ position: this.state.legendPosition }}
series={[
{ name: 'Sales', binding: 'sales' },
{ name: 'Expenses', binding: 'expenses' },
{ name: 'Downloads', binding: 'downloads', chartType: 'LineSymbols' }
]} />
The code sets the itemsSource property to a collection that contains the data to chart and the bindingX property to specify the name of the data property to use for the chart's X values.
It sets the header and footer properties to specify the chart titles, and customizes the chart's axes and legend.
Finally, it sets the series property to an array that specifies the data items that the chart should display.
React component that encapsulates the FlexGrid control. The example below shows how to instantiate and initialize a FlexGrid control in JSX:
<Wj.FlexGrid
autoGenerateColumns={ false }
columns={[
{ binding: 'name', header: 'Name' },
{ binding: 'sales', header: 'Sales', format: 'c0' },
{ binding: 'expenses', header: 'Expenses', format: 'c0' },
{ binding: 'active', header: 'Active' },
{ binding: 'date', header: 'Date' }
]}
itemsSource={ this.state.data } />
The code sets the autoGenerateColumns property to false, then sets the columns property, and finally sets the itemsSource property. This order is important, it prevents the grid from automatically generating the columns.
React component that encapsulates the FlexPie control.
React component that encapsulates the FlexRadar control.
React component that encapsulates the FlexSheet control.
React component that encapsulates the GroupPanel control.
React component that encapsulates the InputColor control.
React component that encapsulates the InputDate control.
React component that encapsulates the InputDateTime control.
React component that encapsulates the InputMask control.
React component that encapsulates the InputNumber control.
React component that encapsulates the InputTime control.
React component that encapsulates the LinearGauge control.
The example below shows how to instantiate and initialize a LinearGauge control in JSX:
<Wj.LinearGauge
min={ 0 } max={ 1000 } step={ 50 } isReadOnly={ false }
value={ this.state.view.currentItem.sales }
valueChanged={ this.salesChanged }
format="c0" thumbSize={ 20 } showRanges={ false }
face={{ thickness:0.5 }}
pointer={{ thickness:0.5 }}
ranges={[
{ min: 0, max: 333, color: 'red' },
{ min: 333, max: 666, color: 'gold' },
{ min: 666, max: 1000, color: 'green' }
]} />
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it sets the value and valueChanged properties to create a two-way binding for the gauge's value.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
React component that encapsulates the ListBox control.
React component that encapsulates the Menu control.
React component that encapsulates the MultiAutoComplete control.
React component that encapsulates the MultiRow control.
React component that encapsulates the MultiSelect control.
React component that encapsulates the PdfViewer control.
React component that encapsulates the PivotChart control.
React component that encapsulates the PivotGrid control.
React component that encapsulates the PivotPanel control.
React component that encapsulates the Popup control.
React component that encapsulates the RadialGauge control.
The example below shows how to instantiate and initialize a RadialGauge control in JSX:
<Wj.RadialGauge
min={ 0 } max={ 1000 } step={ 50 } isReadOnly={ false }
value={ this.state.view.currentItem.sales }
valueChanged={ this.salesChanged }
format="c0" thumbSize={ 20 } showRanges={ false }
face={{ thickness:0.5 }}
pointer={{ thickness:0.5 }}
ranges={[
{ min: 0, max: 333, color: 'red' },
{ min: 333, max: 666, color: 'gold' },
{ min: 666, max: 1000, color: 'green' }
]} />
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it sets the value and valueChanged properties to create a two-way binding for the gauge's value.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
React component that encapsulates the ReportViewer control.
React component that encapsulates the Sunburst control.
React component that encapsulates the TreeMap control.
React component that encapsulates the TreeView control.
Wijmo interop module for Vue.
This module provides Vue components that encapsulate Wijmo controls.
To use it, your application must include references to the Vue framework, as well as the regular Wijmo CSS and js files.
To add Wijmo controls to Vue pages, include the appropriate tags in your HTML files. For example, the code below adds an InputNumber control to a Vue page:
<wj-input-number format="c2" placeholder="Sales" :value.sync="view.currentItem.sales" :value-changed="refreshView" :min="0" :max="10000" :step="100" :is-required="false"> </wj-input-number>
The example illustrates the following important points:
:min="0").:value-changed="refreshView")..sync suffix after attribute names creates two-way
bindings (e.g. :value.sync="view.currentItem.sales").All Wijmo Vue components include an "initialized" event that is raised after the control has been added to the page and initialized. You can use this event to perform additional initialization in addition to setting properties in markup. For example:
<wj-flex-grid :initialized="initGrid"> </wj-flex-grid>
// Vue application
var app = new Vue({
el: '#app',
methods: {
initGrid: function(s, e) {
// assign a custom MergeManager to the grid
s.mergeManager = new CustomMergeManager(s);
}
}
});
All Wijmo Vue components include a "control" pseudo-property that allows you to use the control's properties in the markup. For example:
<wj-list-box style="height:150px;width:250px;"
:items-source="countries"
control="listBox">
</wj-list-box>
<p>
selectedIndex: {{ listBox.selectedIndex }}</p>
<p>
selectedValue: {{ listBox.selectedValue }}</p>
The markup sets the controller's listBox property to the instance of the ListBox control, so it can be used in markup.
It is important that the listBox property be defined in data object of the containing Vue context, or the component properties will not be updated properly. For example:
// Vue application
var app = new Vue({
el: '#app',
data: {
listBox: null // will receive a reference to the ListBox control
}
});Vue component that encapsulates the FlexChart control.
The example below shows how to instantiate and initialize a FlexChart control using Vue markup:
<wj-flex-chart
:items-source="data"
binding-x="country"
:header="props.header"
:footer="props.footer">
<wj-flex-chart-legend :position="props.legendPosition">
</wj-flex-chart-legend>
<wj-flex-chart-axis wj-property="axisX" :title="props.titleX">
</wj-flex-chart-axis>
<wj-flex-chart-axis wj-property="axisY" :title="props.titleY">
</wj-flex-chart-axis>
<wj-flex-chart-series name="Sales" binding="sales">
</wj-flex-chart-series>
<wj-flex-chart-series name="Expenses" binding="expenses">
</wj-flex-chart-series>
<wj-flex-chart-series name="Downloads" binding="downloads">
</wj-flex-chart-series>
</wj-flex-chart>
The code sets the itemsSource property to a collection that contains the chart data and the bindingX property to the data property that contains the chart X values. It also sets the chart's header and footer properties to define titles to show above and below the chart.
The wj-flex-chart-legend and wj-flex-chart-axis components are used to customize the chart's legend and axes.
Finally, three wj-flex-chart-series components are used to specify the data properties to be shown on the chart.
Vue component that encapsulates the FlexGrid control.
The example below shows how to instantiate and initialize a FlexGrid control using Vue markup:
<wj-flex-grid :items-source="data"> <wj-flex-grid-column binding="name" header="Name"> </wj-flex-grid-column> <wj-flex-grid-column binding="sales" header="Sales" format="c0"> </wj-flex-grid-column> <wj-flex-grid-column binding="expenses" header="Expenses" format="c0"> </wj-flex-grid-column> <wj-flex-grid-column binding="active" header="Active"> </wj-flex-grid-column> <wj-flex-grid-column binding="date" header="Date"> </wj-flex-grid-column> </wj-flex-grid>
The code sets the itemsSource property to a collection that contains the grid data, then specifies the columns to display using wj-flex-grid-column components.
Vue component that represents a FlexGridFilter in a FlexGrid control.
The example below shows how to instantiate and initialize a FlexGrid control with a filter using Vue markup:
<wj-flex-grid :items-source="data"> <wj-flex-grid-filter></wj-flex-grid-filter> </wj-flex-grid>
Vue filter that applies globalized formatting to dates and numbers.
For example, the code below uses the wj-format filter to format a number as a currency value and a date as a short date using the current Wijmo culture:
<p>value: {{ theAmount | wj-format 'c' }}</p>
<p>date: {{ theDate | wj-format 'd' }}</p>Vue component that includes a given HTML fragment into the document.
The wj-include component takes a src attribute that specifies a file to load and include into the document. For example:
<wj-popup control="modalDialog" :modal="true" :hide-trigger="None"> <wj-include src="includes/dialog.htm"></wj-include> </wj-popup>
Vue component that encapsulates the LinearGauge control.
The example below shows how to instantiate and initialize a LinearGauge control using Vue markup:
<wj-linear-gauge
:min="0" :max="1000" :step="50" :is-read-only="false"
format="c0" :thumb-size="20"
:show-ranges="false"
:value.sync="sales">
<wj-range wj-property="face" :thickness="0.5">
</wj-range>
<wj-range wj-property="pointer" :thickness="0.5">
</wj-range>
<wj-range :min="0" :max="333" color="red">
</wj-range>
<wj-range :min="333" :max="666" color="gold">
</wj-range>
<wj-range :min="666" :max="1000" color="green">
</wj-range>
</wj-linear-gauge>
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it binds the gauge's value property to a sales variable in the controller.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
Vue component that encapsulates the RadialGauge control.
The example below shows how to instantiate and initialize a RadialGauge control using Vue markup:
<wj-radial-gauge
:min="0" :max="1000" :step="50" :is-read-only="false"
format="c0" :thumb-size="12" :show-text="Value"
:show-ranges="false"
:value.sync="sales">
<wj-range wj-property="face" :thickness="0.5">
</wj-range>
<wj-range wj-property="pointer" :thickness="0.5">
</wj-range>
<wj-range :min="0" :max="333" color="red">
</wj-range>
<wj-range :min="333" :max="666" color="gold">
</wj-range>
<wj-range :min="666" :max="1000" color="green">
</wj-range>
</wj-radial-gauge>
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it binds the gauge's value property to a sales variable in the controller.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
Wijmo interop module for Vue 2.
This module provides Vue 2 components that encapsulate Wijmo controls.
To use it, your application must include references to the Vue 2 framework (RC6 or later), as well as the regular Wijmo CSS and js files.
To add Wijmo controls to Vue pages, include the appropriate tags in your HTML files. For example, the code below adds an InputNumber control to a Vue page:
<wj-input-number format="c2" placeholder="Sales" :value="sales" :value-changed="salesChanged" :min="0" :max="10000" :step="100" :is-required="false"> </wj-input-number>
// Wijmo event handler
// update "sales" value to match the InputNumber value
function salesChanged(sender, eventArgs) {
this.sales = sender.value;
}
The example illustrates the following important points:
:min="0").:value-changed="salesChanged").All Wijmo Vue components include an "initialized" event that is raised after the control has been added to the page and initialized. You can use this event to perform additional initialization in addition to setting properties in markup. For example:
<wj-flex-grid :initialized="initGrid"> </wj-flex-grid>
// Vue application
var app = new Vue({
el: '#app',
methods: {
initGrid: function(s, e) {
// assign a custom MergeManager to the grid
s.mergeManager = new CustomMergeManager(s);
}
}
});Vue component that encapsulates the FlexChart control.
The example below shows how to instantiate and initialize a FlexChart control using Vue markup:
<wj-flex-chart
:items-source="data"
binding-x="country"
:header="props.header"
:footer="props.footer">
<wj-flex-chart-legend :position="props.legendPosition">
</wj-flex-chart-legend>
<wj-flex-chart-axis wj-property="axisX" :title="props.titleX">
</wj-flex-chart-axis>
<wj-flex-chart-axis wj-property="axisY" :title="props.titleY">
</wj-flex-chart-axis>
<wj-flex-chart-series name="Sales" binding="sales">
</wj-flex-chart-series>
<wj-flex-chart-series name="Expenses" binding="expenses">
</wj-flex-chart-series>
<wj-flex-chart-series name="Downloads" binding="downloads">
</wj-flex-chart-series>
</wj-flex-chart>
The code sets the itemsSource property to a collection that contains the chart data and the bindingX property to the data property that contains the chart X values. It also sets the chart's header and footer properties to define titles to show above and below the chart.
The wj-flex-chart-legend and wj-flex-chart-axis components are used to customize the chart's legend and axes.
Finally, three wj-flex-chart-series components are used to specify the data properties to be shown on the chart.
Vue component that represents a Axis in one of the following components: WjFlexChart , WjFlexChartSeries , WjFinancialChart or WjFinancialChartSeries.
Vue component that represents a Legend in one of the following components: WjFlexChart , WjFlexPie , wijmo.vue2.WjFinancialChart , WjFlexRadar or WjSunburst.
Vue component that encapsulates the FlexGrid control. The example below shows how to instantiate and initialize a FlexGrid control using Vue markup:
<wj-flex-grid :items-source="data"> <wj-flex-grid-column binding="name" header="Name"> </wj-flex-grid-column> <wj-flex-grid-column binding="sales" header="Sales" format="c0"> </wj-flex-grid-column> <wj-flex-grid-column binding="expenses" header="Expenses" format="c0"> </wj-flex-grid-column> <wj-flex-grid-column binding="active" header="Active"> </wj-flex-grid-column> <wj-flex-grid-column binding="date" header="Date"> </wj-flex-grid-column> </wj-flex-grid>
The code sets the itemsSource property to a collection that contains the grid data, then specifies the columns to display using wj-flex-grid-column components.
Vue component that represents a FlexGridFilter in a WjFlexGrid.
The example below shows how to instantiate and initialize a FlexGridFilter control with a filter using Vue markup:
<wj-flex-grid :items-source="data"> <wj-flex-grid-filter></wj-flex-grid-filter> </wj-flex-grid>
Vue filter that applies globalized formatting to dates and numbers.
For example, the code below uses the wj-format filter to format a number as a currency value and a date as a short date using the current Wijmo culture:
<p>value: {{ theAmount | wj-format('c') }}</p>
<p>date: {{ theDate | wj-format('d') }}</p>Vue component that encapsulates the GroupPanel control.
The example below shows how to instantiate and connect a GroupPanel and a FlexGrid in Vue:
<wj-group-panel id="thePanel" placeholder="Drag columns here to create Groups"> </wj-group-panel> <wj-flex-grid id="theGrid" :items-source="data"> </wj-flex-grid>
var app = new Vue({
el: '#app',
// connect group panel and grid
mounted: function () {
var panel = wijmo.Control.getControl(document.getElementById('thePanel'));
var grid = wijmo.Control.getControl(document.getElementById('theGrid'));
panel.grid = grid;
}
});Vue component that includes a given HTML fragment into the document.
The wj-include component takes a src attribute that specifies a file to load and include into the document. For example:
<wj-popup control="modalDialog" :modal="true" :hide-trigger="None"> <wj-include src="includes/dialog.htm"></wj-include> </wj-popup>
Vue component that encapsulates the LinearGauge control.
The example below shows how to instantiate and initialize a LinearGauge control using Vue markup:
<wj-linear-gauge
:min="0" :max="1000" :step="50" :is-read-only="false"
format="c0" :thumb-size="20"
:show-ranges="false"
:value="sales"
:value-changed="salesChanged">
<wj-range wj-property="face" :thickness="0.5">
</wj-range>
<wj-range wj-property="pointer" :thickness="0.5">
</wj-range>
<wj-range :min="0" :max="333" color="red">
</wj-range>
<wj-range :min="333" :max="666" color="gold">
</wj-range>
<wj-range :min="666" :max="1000" color="green">
</wj-range>
</wj-linear-gauge>
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it binds the gauge's value property to a sales variable in the controller.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
Vue component that encapsulates the RadialGauge control.
The example below shows how to instantiate and initialize a RadialGauge control using Vue markup:
<wj-radial-gauge
:min="0" :max="1000" :step="50" :is-read-only="false"
format="c0" :thumb-size="12" :show-text="Value"
:show-ranges="false"
:value="sales"
:value-changed="salesChanged">
<wj-range wj-property="face" :thickness="0.5">
</wj-range>
<wj-range wj-property="pointer" :thickness="0.5">
</wj-range>
<wj-range :min="0" :max="333" color="red">
</wj-range>
<wj-range :min="333" :max="666" color="gold">
</wj-range>
<wj-range :min="666" :max="1000" color="green">
</wj-range>
</wj-radial-gauge>
The code min, max, step, and isReadOnly properties to define the range of the gauge and to allow users to edit its value. Next, it binds the gauge's value property to a sales variable in the controller.
Then it sets the format, thumbSize, and showRanges properties to define the appearance of the gauge. Finally, the markup sets the thickness of the face and pointer ranges, and extra ranges that will control the color of the value range depending on the gauge's current value.
Vue component that represents a Range in one of the following components: WjLinearGauge , WjBulletGraph or WjRadialGauge.
Contains utilities used by all controls and modules, as well as the Control and Event classes.