Archive for the ‘JavaScript’ Category

AnyChart 5.1.2 - JavaScript Data Manipulation

Friday, February 13th, 2009

javascript anychart ria flash On 13th of February AnyChart is proud to release version 5.1.2 of AnyChart Flash Charting Component with JavaScript Data Manipulation Methods.

Please download the latest trial version from AnyChart Download Section.

AnyChart is based on XML data input, but if you’d like to create Data Streaming or fully Client Size interactive applications you can use Java Script data manipulation options. These methods allows you to add, remove or change the data points and data series in a single chart or in the chart that is a part of a dashboard. Also, you can higlight a point or a series, or select/deselect a point. Along with AJAX related functions you can create application that will give users the great option of run-time chart data editing.

Also, the special Dataplot Attributes can be used to update chart titles, footers and other texts on the chart.

Read more about JavaScript Data Manipulation in AnyChart Users Guide >>

Here is a bunch of samples that give  you an overview of new features:

anychart oracle apex

Oracle APEX Users can now use an updated AnyChart 5.1 Engine in their APEX Applications - 5.1.2 release features new integration kit. Please refer to Apex Evangelists: AnyChart 5 integration kit for APEX for more.

Using AnyChart with JSON and JavaScript

Friday, June 6th, 2008

Until now AnyChart was able to get data only in XML format. However it’s not always convenient and requires at least knowledge of XML.

Now we make the life of AnyChart users easier and add the ability of handy Flash chart implementation in JavaScript. Now AnyChart.js has a new method - setJSData, that allows you to set parameters and data to the chart as a JavaScript object.

You can view a simple example here:
http://anychart.com/tips_and_tricks/xml-and-js/js-sample.html

How to create an object with settings and data:An object with settings and data has the same structure as AnyChart XML. XML nodes and attributes are properties. Nodes, that can be repeated (for example, <point />) are arrays.

For example:

var chartData = {
charts: {
chart: {
chart_settings: {
title: { text: “Chart Title” } },
data: {
series: [
point: [{name: “pt1″, y: 12}, {name: “pt2″, y: 23}]
]
}
}
}
}

Or:

var chartData = {}
chartData.charts = {};
chartData.charts.chart = {};
chartData.charts.chart.chart_settings = {};
chartData.charts.chart.chart_settings.title = {};
chartData.charts.chart.chart_settings.title.text = “Chart Title”;
chartData.charts.chart.data = {};
chartData.charts.chart.data.series = [];

var seriesObj = {};
seriesObj.point = [];
seriesObj.point.push({name: “Pt1″, y: 12});
seriesObj.point.push({name: “Pt1″, y: 23});

chartData.charts.chart.data.series.push(seriesObj);

Object’s structure is equivalent to XML structure. The description of XML you can find here:
http://anychart.com/products/anychart/docs/xmlReference/index.html

Setting chart description object to AnyChart is done using setJSData method.

Also we’ve created several examples of using setJSData, including JSON example:

1. An example of object-creation using JavaScript:http://anychart.com/tips_and_tricks/xml-and-js/js-sample.html

2. An example of JSON-creation forming:http://anychart.com/tips_and_tricks/xml-and-js/json-sample.html

3. An example of JSON-data loading from the text file using AJAX:
http://anychart.com/tips_and_tricks/xml-and-js/json-ajax-sample.html