Updating balloon (tool-tip) text on the fly

Type tutorial

Sometimes you might need to add some more information to the balloon of the graph in real time, depending on the value or some other thing. AmGraph has a property, called balloonFunction which can be used for that purpose. You should create some function (method) which will receive GraphDataItem and a reference to graph itself […]

Beginners: Console is your friend

Type tutorial

If by chance it happened that working with amCharts is also beginning of your programming career, we have a very valuable suggestion for you: View console of your browser Console is a place where all the errors are listed. To access console of Chrome: Use the keyboard shortcut Command – Option – J (Mac) or Control -Shift -J (Windows/Linux). […]

Compiling and minifying JavaScript file from sources

Type tutorial

In case you have OEM/SaaS license of amCharts, you have access to uncompiled sources – they are available in sources folder. These uncompiled sources have long, self explanatory variable names and comments, which are not available in compiled version. Each class is a separate file – this helps quickly find the place you need. If […]

Showing only one balloon for all graphs

Type tutorial

In case you have a lot of graphs in one chart, and use ChartCursor with value balloons enabled, showing a separate balloon for each graph might not work. So you have two options: #1 Show only one balloon, of the most close graph to the mouse cursor. This can be done by setting chartCursor.oneBalloonOnly = true; #2 […]

Using events

Type tutorial

I guess most of you are familiar with events model, but in case not, I will try to explain it in as simple way as I can. The chart fires (dispatches) events. Some of them are dispatched without any user interaction, for example, when chart is rendered for the first time, chart fires init event. Other […]

Working with themes

Type tutorial

Version 3.3.0 of our charting packages and version 3.8.0 of our mapping package supports themes. This means that instead of setting every property for each graph or axis or any other object, you can set new defaults in a theme file. This will make devs’ life a lot easier! Take a quick look at this sample. No colors are […]

Creating Sparkline / Micro Charts

Type tutorial

Despite what you may have heard, JavaScript Charts from amCharts CAN be used to create inline sparkline or microcharts. This article will walk you through the steps needed to minify your charts. Let’s take some simple column chart as an example: The code for the above chart is here. Now let’s say I want to […]

Live-editing Chart Data

Type tutorial

Sometimes we get the questions that go along like this “How do I hook up HTML controls to live chart data?”. While technically it’s beyond what charts do, we’re feeling generous, so let’s build a nice chart data editor. Shall we? NOTE: If you don’t feel like parsing so many letters, you can jump right […]

Time series chart – the great advantages of parsing dates

Type tutorial

Chart which parses dates vs the one which doesn’t I might be wrong, but I make a guess that at least 50% of all serial charts have date/time on they category axis – they show how some value changed over a time. That’s why, when choosing a charting library, one of the main thing you […]