Posts tagged as:

javascript

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

Analytics jQuery Plugin 2.0 Supports Full Tracking API

Project Updates
Google Analytics jQuery Plugin

Updated Google Analytics jQuery plugin to version 2.0 and it now is the only jQuery plugin that supports full tracking API of Google. Apart from enhanced loading of ga.js file, there is a lot more that users can now do with this plugin.

August 24, 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

Optimizing JavaScript (part 1)

Technical Publications

In my years of experience in programming, I have observed that certain performance ‘tweaks’ work best for certain languages. This is mostly due to the nature of the interpreter ((Interpreters are programs that execute codes one line at a time. See: Interpreter  in Wikipedia))/compiler ((a program that decodes instructions written in a higher order language. See: Compiler in Wikipedia)) involved in executing a particular piece of code.

April 25, 2009 7 comments