Menu

Getting Exception while adding Angular Gauge Chart to Flow Panel

KARTIKEYAN
2019-02-04
2019-02-05
  • KARTIKEYAN

    KARTIKEYAN - 2019-02-04

    I am trying to add a 'Chart' (HighCharts-Angular Gauge) to a Flow Panel. While adding I getting the below exception

    com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @org.moxieapps.gwt.highcharts.client.BaseChart::nativeRenderChart(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;ZZLcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)([string: 'Chart', JavaScript object(15907), bool: false, bool: false, JavaScript object(15932), JavaScript object(15933), JavaScript object(15934), JavaScript object(15924), JavaScript object(15928), JavaScript object(15923), JavaScript object(15926), JavaScript object(15927), JavaScript object(15930), JavaScript object(15931)]):
    b is undefined at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.logical.shared.SelectionEvent.fire(SelectionEvent.java:43) at com.google.gwt.user.client.ui.SuggestBox.fireSuggestionEvent(SuggestBox.java:1166) at com.google.gwt.user.client.ui.SuggestBox.setNewSelection(SuggestBox.java:1190) at com.google.gwt.user.client.ui.SuggestBox.access$7(SuggestBox.java:1185) at com.google.gwt.user.client.ui.SuggestBox$2.onSuggestionSelected(SuggestBox.java:683) at

    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @org.moxieapps.gwt.highcharts.client.BaseChart::nativeRenderChart(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;ZZLcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)([string: 'Chart', JavaScript object(15907), bool: false, bool: false, JavaScript object(15932), JavaScript object(15933), JavaScript object(15934), JavaScript object(15924), JavaScript object(15928), JavaScript object(15923), JavaScript object(15926), JavaScript object(15927), JavaScript object(15930), JavaScript object(15931)]): b is undefined at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at
    .
    .
    I have added imports like highcharts.js , highcharts-more.js and exporting.js in my GWT.html

    But still it is giving an exception.
    I have searched for this exception and no one has answered.
    People get exception stating 'HighCharts' is undefined,
    But I am getting as
    'b is undefined'

    When I debugged it,
    In the BaseChart class provided by highcharts I found the b, which is boolean

    This is the line where it is causing the exception in BaseChart class,

    chart = nativeRenderChart(
    getChartTypeName(),
    createNativeOptions(),
    toolTip != null && toolTip.getToolTipFormatter() != null,
    legend != null && legend.getLabelsFormatter() != null,
    chartEventHandlers.getJavaScriptObject(),
    seriesEventHandlers.getJavaScriptObject(),
    pointEventHandlers.getJavaScriptObject(),
    xAxisEventHandlers.getJavaScriptObject(),
    yAxisEventHandlers.getJavaScriptObject(),
    xAxisLabelFormatters.getJavaScriptObject(),
    yAxisLabelFormatters.getJavaScriptObject(),
    yAxisStackLabelFormatters.getJavaScriptObject(),
    plotOptionsLabelFormatters.getJavaScriptObject(),
    seriesLabelFormatters.getJavaScriptObject()
    );

    Took a javascript from http://jsfiddle.net/highcharts/EjRLw/

    and added the following Pane, YAxis (tick postion,width,color) GaugePlotOptions(color,linewidth,stacking), Series(Points), ToolTip(ValueSuffix)

    I am setting Everything. I verified all 14 objects set to 'nativeRenderChart' method are not null.
    Still getting same exception!!!! No clue at all :( !!! Please help me..

    Please help!!!

     

    Last edit: KARTIKEYAN 2019-02-04
  • KARTIKEYAN

    KARTIKEYAN - 2019-02-05

    I have resolved this. The issue was with the below code,

    GaugePlotOptions plotOptions = new GaugePlotOptions();
    // plotOptions.setStacking( Stacking.NORMAL ); <<--- CULPRIT
    Set 'Stacking' in 'GaugePlotOptions' was causing the exception. Once it is removed Chart appeared in the panel.

     

Log in to post a comment.