kurtomerfaruk / wicked-charts

Automatically exported from code.google.com/p/wicked-charts
0 stars 0 forks source link

Issues getting chart to Display with JSF #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am having problems getting a chart to display when run through JSF. It is 
always set as a 0px X 0px element when I go through the debug. I have tried 
setting Height and Width manually through ChartOptions in the Java code or in 
the html (just creates an empty space). No errors with missing jars or 
dependencies, just no chart shown! This is the index.xhtml content:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:wc="http://googlecode.com/wickedcharts">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script src="http://code.highcharts.com/stock/highstock.js"></script>
    <script src="http://code.highcharts.com/stock/modules/exporting.js"></script>

    <body>
        <wc:chart id="chart1" options="#{QuickChart.options}" theme="#{QuickChart.theme}"/>
    </body>
        <div id="container" style="width:100%; height:400px;"></div>
... the Javascript chart function is here, but not relevant....

The bean info:

@ManagedBean(name="QuickChart")
@SessionScoped
public class QuickChart{
    Options options;
    private Theme theme = null;

    public QuickChart() {
     options = new Options();

     ChartOptions cOptions = new ChartOptions();
     cOptions.setType(SeriesType.LINE);
     cOptions.setHeight(400);
     cOptions.setWidth(400);

     options.setChartOptions(cOptions);
... the rest is copied from the "Getting Started" options page.

Running on Windows 7 with Chrome browser.  
Deployed through Netbeans 7.3.1 with Glassfish and JSF 2.1.

Libraries:
Java EE Web 6 
jackson-annotations-2.0.5
jackson-core-2.0.5
jackson-databind-2.0.5
wicked-charts-highcharts-1.5.0
wicked-charts-jsf21-1.5.0

Original issue reported on code.google.com by keith.pr...@gmail.com on 12 Sep 2013 at 7:47

GoogleCodeExporter commented 9 years ago
Found one additional piece of data that makes me suspect it might be a related 
issue to #23. 

In the Chrome Developers Console tab, this error shows up:
Uncaught Highcharts error #13: www.highcharts.com/errors/13

Which is:
Highcharts Error #13

Rendering div not found

This error occurs if the chart.renderTo option is misconfugured so that 
Highcharts is unable to find the HTML element to render the chart in.  
*****

I assume the element is supposed to be "chart1" in my code, but is not being 
reference correctly in the JSF wrapper?

Original comment by keith.pr...@gmail.com on 12 Sep 2013 at 8:15

GoogleCodeExporter commented 9 years ago
moved issue to github at https://github.com/thombergs/wicked-charts/issues/19

Original comment by tom.homb...@gmail.com on 21 Apr 2014 at 11:57