From the category archives:

Technical Publications

Executing jQuery Within FusionCharts Link Attribute

FusionCharts

FusionCharts Flash charting suite has an amazing integration with JavaScript. It allows charts to be created using JavaScript, raises appropriate JavaScript events, allows charts to be updated using its simple JavaScript API and a lot more. There is a blog post on FusionCharts blog, describing the same.

February 14, 2010 3 comments

Chart Type Aliases for FusionCharts DOM

FusionCharts
Thumbnail image for Chart Type Aliases for FusionCharts DOM

FusionCharts DOM ((FusionCharts DOM is a JavaScript framework that helps you include FusionCharts in your web applications in a very elegant and easy way. Instead of writing standard Javascript codes or OBJECT/EMBED tags to embed charts, you can use FusionCharts DOM to create a chart by just including tags in your HTML code. Configuration of the charts is as simple as providing attributes to this HTML element.)) uses an alias, instead of SWF file names, for every chart type. This is done to address certain issues in order to improve usability:

December 9, 2009 0 comments

JavaScript Optimization – Destructive Vs Indexed Array Iteration

Technical Publications

In number of JavaScript applications, developers are found to use destructive array iteration for the sake of readability and simplicity of codes. However, usage of the same is not always conducive towards the performance of the code.

November 22, 2009 2 comments

Convert FusionCharts Data-XML To JavaScript Array

FusionCharts
Thumbnail image for Convert FusionCharts Data-XML To JavaScript Array

This is a snippet of JavaScript that would allow you to easily retrieve all “set” values from a FusionCharts data-XML in form of an Array.

One can use it to perform various mathematical or visual operations by retrieving the data-XML from FusionCharts object using the getXMLData() method and then passing on the same to this function.

November 14, 2009 0 comments

String Reversing Algorithm Performance In JavaScript

Technical Publications

Wherever performance is the key factor, choosing the right algorithm, (in a very unbiased fashion,) is a very crucial factor. And generally for reversing string in JavaScript applications, I endorse this petite string reversal algorithm using Array.reverse() method.

September 24, 2009 0 comments

Fast Algorithm To Find Unique Items in JavaScript Array

Technical Publications
Thumbnail image for Fast Algorithm To Find Unique Items in JavaScript Array

When I had the requirement to remove duplicate items from a very large array, I found out that the classic method to be not optimized as it took a pretty long time than desired. So, I devised this new algorithm that can sort a large array in a fraction of the original time.

September 6, 2009 31 comments

Generating Pareto Chart Data for FusionCharts

FusionCharts
Thumbnail image for Generating Pareto Chart Data for FusionCharts

As soon as I read about Pareto Charts on FusionCharts blog and how it uses cumulative percentage on a dual-y axes graph to allow users to summarize data into segments, I realized that a simple script to generate the FusionCharts XML would help users generate such graphs.

For those who do not know what is FusionCharts, it is simply something that can convert your boring tables of data into sexy animated charts.

August 26, 2009 2 comments

Regular Expression To Validate CSS Length and Position Values

Technical Publications

In CSS, length and position of various elements are provided as decimal numbers. Width, height, margin, padding, border-thickness, etc are some example CSS attributes where we need to specify a length.

A valid CSS length value follows a set rule:

July 29, 2009 0 comments

How To Design a Good API

Technical Publications

If you have not have already read the characteristics of a good API, you may do so in “Why To Design a Good API.”

As discussed in the above-mentioned article, API is almost permanent and once distributed, should not be modified. You have got one chance to make it right.…

July 28, 2009 0 comments

Load jQuery Plugins Only When Required (Runtime)

Technical Publications

I have often observed that websites that are template-driven (like blogs, cms, etc), tend to load all the required scripts and css in every page. One such example would be WordPress blogs with plugins for various types of content processing (overlay, tooltip, animation, etc.) Every page of such a WordPress driven site loads the relevant plugin stylesheets and javascripts, even though it might not be required for that particular page.

Here is a jQuery code I wrote in order to load prettyPhoto jQuery plugin (prettyPhoto homepage) only when required. This process can also be applied to other plugins by analyzing the plugin triggers from within the rest of the page content.

July 16, 2009 2 comments