tags:

views:

12

answers:

1

the current theme is connected with

dojo.require("dojox.charting.themes.PlotKit.green");

I created my theme, saved it in the same folder and tried to add to page:

dojo.require("mytheme");

But it's not connecting this way.

A: 

If you created your own module, the easiest thing to do is to place it in the folder, which is a peer of dojo:

dojo/...
dijit/...
dojox/...
my/... <- your file goes there

For example, it is called "mytheme". In this case it should go into my/mytheme.js file. In order to use it just require it and set on your chart:

dojo.require("my.mytheme");
...
chart.setTheme(my.mytheme);

Don't forget to put dojo.provide("my.mytheme"); at the top of your theme file, and define my.mytheme object (your theme).

Alternatively include it inline like I did in http://lazutkin.com/download/hicharts.html (look for myTheme). Or you can include the snippet using a regular <script> tag.

Do not forget to set your new theme explicitly on a chart: chart.setTheme(your_theme_object).

Eugene Lazutkin
it works. thank you for your help.
xplanner-plus
now my theme is working. but transition effect on mouse over is broken. it's because Array consists of fractional numbers. Any ideas how to fix?
xplanner-plus
Theme doesn't affect transitions, which are event handlers using matrix transformations, and an array of fractional numbers should work just fine as data values. Look for problems anywhere else. If this problem still persists, please file a bug with Dojo and attach the minimalistic example demonstrating the problem.
Eugene Lazutkin