Configure chart to support plug-in PDF Print E-mail
Written by minhna   
Tuesday, 28 October 2008 11:19
There are no translations available.

NOTE:

  • This feature only available in pro version.
  • I'm working on sample data

1. Install and publish plug-ins

In the downloaded package, there are two plug-ins named plugin_yos_count_ip and plugin_yos_ipview

The plugin_yos_count_ip is a system plug-in. It's mission is counting visitors, store value to database.

You don't need to care about it. Just install and publish.

Other plugin is plugin_yos_ipview (plug-in name: yos amchart count viewIP plugin). It is a yos_chart plug-in. It's used to generate data which used by charts. Just install then publish it.

2. Configure charts

Go to yos amchart component, in amcharts tab.

There are two charts now support plug-in: one is amcolumn.tar.gz (amColumn type) and other is linechartcountip.tar.gz (amLine type).

We will edit the linechartcountip.tar.gz charts (ID = 2):

yos-amchart/using-plugin-2-editing-chart.png

You need to select Plugin in Plugin_ID select box.

Save your configurations.

3. Create a module to display this chart

Go to Joomla Module manager, find a module with type is mod_yos_amchart then make a copy of it. You also can create a new module by click on "new" button, then select module type YOS amChart.

Remember to enter amChart's ID: 2

yos-amchart/using-plugin-3-new-module.png

4. Results

Go to front-end and see the module, it will look like this:

yos-amchart/using-plugin-4-result.png

Oh!, you see some problems with the chart, the name on the top of chart is "Historical Crude oil prices" and there are two line data (with the same value): "nominal" and "Inflation adjusted" and the unit of visitor counter is $ Cry

Don't worry, go to the next step, I will show you how to edit the data and setting file.

5. Edit data and setting file

Go to yos amchart back-end, in amCharts tab, find and edit the chart with id = 2.

You have a editor which allow you edit setting, data, addon files.

TIP: If highlight feature has problem, you can disable it by click on the button looks like a brush at editor toolbar

5.1. This time we will edit the setting file:

yos-amchart/using-plugin-5-edit-setting-file.png

We will kill the $ unit at front of every value:

Find this line (205):

Then remove the $ character.

and this line (337 and 356):

Then remove the $ character.

You also see the value like 6.00 (2 digits after decimal) and you want it be 6

Change the line 18 from 2 to 0

Then click apply button, at front-end now you will see, no $ character.

Now we change the title which appears at the top of chart:

Oh, I found it in line 305, just change it to everything you want, I will change it to "visitors counter"

Click apply button, now the title changed.

Finally, we remove a graph and change the label:

You will see the at line 350. Just remove all this graph.

Now we have just one graph: at line 316. This graph has title: Nominal. We will change it to Visitors.

Click apply button.

Now the chart looks like this:

yos-amchart/using-plugin-6-save-setting-file.png

5.2. Edit data file

Select the data file, now you can see in the tag, there are two graphs with id = 1 and id = 2. Remove the graph with id = 2. We also remove all data

All done, now click Save button.

6. Results

Now your visitors counter looks like this:

yos-amchart/using-plugin-7-result.png

Today, your visitor counter has just one value. Don't worry, after 3 days, it will have 4 values and so on.


Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! MySpace! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Wednesday, 04 March 2009 17:03
 
Recent Articles:
More Articles: