Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Creating Charts
    [Expand]Chart Elements
    [Expand]End-User Interaction
     Supported Browsers
     Adding a Web Chart
     Handling Client-side Scripts
     Medium Trust Support
     Web Farm and Web Gardens Support
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Handling Client-side Scripts

This document describes the specifics of client-side scripting with the ASP.NET Chart Control. It demonstrates an easy way to access the available client-side events, and gives a general overview of nuances that are characteristic for ASP.NET platform.

The WebChartControl supports the AJAX technology, allowing you to implement end-user interaction using callbacks, rather than standard postbacks (when the whole page is refreshed in reaction to any change made in a web page). Callbacks provide targeted round trips to server, allowing you to reduce the traffic, and increase the performance of your web application. With the Web Chart Control, implementation of client-side scripts is made as easy as possible.

To quickly handle a client-side event, click the smart tag of your WebChartControl, and in its actions list, choose the Client Side Events... link. Or, in the Properties window, expand the WebChartControl.ClientSideEvents property, and click the ellipsis button for the required event.

In the invoked WebChartControl Designer, write a JavaScript code (or names of a JavaScript handle functions) in the required events.

The ChartClientSideEvents class contains the list of available client-side events.

In these event handlers, a chart's client-side equivalent (represented by an ASPxClientWebChart object) is accessed by calling the ASPxClientWebChartControl.GetChart method. Then, you can get access to its main elements (diagram, panes, axes, and so on), and their properties. For the complete list of client-side equivalents of chart elements, refer to DevExpress.XtraCharts.Web.Scripts.

Note that the following properties may affect the performance of your web application, so you should use them carefully.

Expanded See Also

Is this topic helpful?​​​​​​​