Sign in to follow this  
Hari

Drill Down Chart In Gwt/gxt

Recommended Posts

Hi,

I am new to FusionCharts. I am trying to create fusion charts with GXT.

 

I am able to create a basic pie chart with GXT. The problem is coming when I am trying to link each datapoint to a particular URL. I have gone through the documentaion of FusionCharts.v3 and followed the similar approach as it was done for HTML.

 

Following is the code used to generate a drill down chart. But when I click on the data point it gives 404 not found error.

 

 

public void onModuleLoad() {

Viewport viewport = new Viewport();

 

final PieChart chart = new PieChart();

chart.setHeight(450);

chart.setWidth(600);

chart.updateChartXML("<graph caption=\"Yearly sales\" xAxisName=\"Year\" yAxisName=\"Sales\">"

+ "<set name=\"2004\" value=\"37800\" link=\"newgraph-xml-2004-quarterly\" />"

+ "<set name=\"2005\" value=\"21900\" link=\"newgraph-xml-2005-quarterly\" />"

+ "<set name=\"2006\" value=\"32900\" link=\"newgraph-xml-2006-quarterly\" />"

+ "<set name=\"2007\" value=\"39800\" link=\"newgraph-xml-2007-quarterly\" />"

+ "<linkeddata id=\"2004-quarterly\">"

+ "<graph caption=\"Quarterly Sales Summary\" subcaption=\"For the year 2004\""

+ "xAxisName=\"Quarter\" yAxisName=\"Sales\">"

+ "<set name=\"Q1\" value=\"11700\" />"

+ "<set name=\"Q2\" value=\"8600\" />"

+ "<set name=\"Q3\" value=\"6900\" />"

+ "<set name=\"Q4\" value=\"10600\" />"

+ "</graph>"

+ "</linkeddata>"

+ "<linkeddata id=\"2005-quarterly\">"

+ "<graph caption=\"Quarterly Sales Summary\" subcaption=\"For the year 2005\""

+ "xAxisName=\"Quarter\" yAxisName=\"Sales\">"

+ "<set name=\"Q1\" value=\"5500\" />"

+ "<set name=\"Q2\" value=\"7100\" />"

+ "<set name=\"Q3\" value=\"3900\" />"

+ "<set name=\"Q4\" value=\"5400\" />"

+ "</graph>"

+ "</linkeddata>"

+ "<linkeddata id=\"2006-quarterly\">"

+ "<graph caption=\"Quarterly Sales Summary\" subcaption=\"For the year 2006\""

+ "xAxisName=\"Quarter\" yAxisName=\"Sales\">"

+ "<set name=\"Q1\" value=\"6700\" />"

+ "<set name=\"Q2\" value=\"9200\" />"

+ "<set name=\"Q3\" value=\"10800\" />"

+ "<set name=\"Q4\" value=\"6200\" />"

+ "</graph>"

+ "</linkeddata>"

+ "<linkeddata id=\"2007-quarterly\">"

+ "<graph caption=\"Quarterly Sales Summary\" subcaption=\"For the year 2007\""

+ "xAxisName=\"Quarter\" yAxisName=\"Sales\">"

+ "<set name=\"Q1\" value=\"8900\" />"

+ "<set name=\"Q2\" value=\"6600\" />"

+ "<set name=\"Q3\" value=\"11200\" />"

+ "<set name=\"Q4\" value=\"13100\" />"

+ "</graph>"

+ "</linkeddata>" + "</graph>");

 

viewport.add(chart);

 

RootPanel.get().add(viewport);

}

 

 

 

 

 

 

 

 

Error I am getting:

 

 

HTTP ERROR: 404

NOT_FOUND RequestURI=/newgraph-xml-2004-quarterly

 

Powered by Jetty://

 

 

 

Please suggest me how to make a linked chart in GWT.

Share this post


Link to post
Share on other sites

Thanks for the reply sanjukta,

 

But the linked chart was working fine with the trial version when the chart was rendered in html. I copied the data from the xml file and given that as an argument to 'updateChartXML'.

 

I do not know what went wrong. I do not even know If I can make it work using GXT. :)

Share this post


Link to post
Share on other sites

Hi,

 

FusionCharts v3.2 Evaluation version is the trial version of the commercial product. FusionCharts Free is a completely different product with an open source.

 

FusionCharts Free does not support Linked charts. In case you wish to use Linked charts, please try downloading the FusionCharts v3.2 Evaluation pack.

 

You can use Linked charts with GWT but you would need to have FusionCharts v3.2 or above to support it.

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this