After trying half a day I've given up on this scatter chart with dynamic data:
only the title shows up - no message in developer console.
If I omit the calls to setXAxisMetric or setYAxisMetric
it still gives a error in the developer console like "_gwt$exception:this.metricFacet is null at isc_FacetChart_getYAxisMetric()"
What is wrong here? I just mimicked the showcase scatter chart sample
with my data: occuretime should be x-axis, responsetime2 on y-axis.
(The dynamic data part worked well before with ChartType.LINE !)
I'm using SmartClient v10.0p_2015-04-01/EVAL Deployment (expires 2015.05.31_06.33.21),
Firefox 36.0.4 for ubuntu,
Eclipse 4.4 Luna.
Here's my source:
------------ BuiltInDS.java: ------------
chart = new FacetChart();
chart.setHeight( 600 );
chart.setTitle("Ping History5");
chart.setChartType(ChartType.SCATTER );
Facet metric = new Facet();
metric.setValues(new FacetValue("responsetime2"), new FacetValue("occuretime"));
metric.setInlinedValues(true);
chart.setFacets( metric );
chart.setValueProperty("responsetime2");
chart.setXAxisMetric("occuretime"); //otherwise: _gwt$exception: this.metricFacet is null
chart.setYAxisMetric("responsetime2");//otherwise: _gwt$exception:this.metricFacet is null
SC.logWarn("getXAxisMetric="+chart.getXAxisMetric() );
SC.logWarn("getYAxisMetric="+chart.getYAxisMetric() );
Criteria c = new Criteria("r_node", "1002");
DataSource ds = DataSource.get( "pinghists" );
ds.fetchData(c, new DSCallback() {
public void execute(DSResponse response, Object rawData, DSRequest request) {
chart.setData(response.getData());
}
});
chart.draw();
------------ BuiltInDS.gwt.xml: ------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to="builtinds">
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.smartgwtee.tools.Tools"/>
<inherits name="com.smartgwtee.SmartGwtEENoScript"/>
<inherits name="com.smartgwt.Charts"/>
<inherits name="com.smartgwt.Drawing"/>
<add-linker name="xsiframe" />
<entry-point class='com.smartgwt.sample.client.BuiltInDS'/>
</module>
------------- pinghists.ds.xml: ------------
<DataSource
ID="pinghists"
serverType="sql"
tableName="pings_history"
testFileName="pinghists.data.xml"
>
<fields>
<field name="id" title="Ping_h ID" type="integer" primaryKey="true" required="true"/>
<field name="r_node" title="Node ID" type="integer"/>
<field name="ping_id" title="Ping ID" type="integer" detail="true"/>
<field name="occuretime" title="ping'ed at" type="datetime"/>
<field name="responsetime1" title="Response time1" type="float" />
<field name="responsetime2" title="Response time2" type="float" />
<field name="responsetime3" title="Response time3" type="float" />
</fields>
</DataSource>
-------------------
only the title shows up - no message in developer console.
If I omit the calls to setXAxisMetric or setYAxisMetric
it still gives a error in the developer console like "_gwt$exception:this.metricFacet is null at isc_FacetChart_getYAxisMetric()"
What is wrong here? I just mimicked the showcase scatter chart sample
with my data: occuretime should be x-axis, responsetime2 on y-axis.
(The dynamic data part worked well before with ChartType.LINE !)
I'm using SmartClient v10.0p_2015-04-01/EVAL Deployment (expires 2015.05.31_06.33.21),
Firefox 36.0.4 for ubuntu,
Eclipse 4.4 Luna.
Here's my source:
------------ BuiltInDS.java: ------------
chart = new FacetChart();
chart.setHeight( 600 );
chart.setTitle("Ping History5");
chart.setChartType(ChartType.SCATTER );
Facet metric = new Facet();
metric.setValues(new FacetValue("responsetime2"), new FacetValue("occuretime"));
metric.setInlinedValues(true);
chart.setFacets( metric );
chart.setValueProperty("responsetime2");
chart.setXAxisMetric("occuretime"); //otherwise: _gwt$exception: this.metricFacet is null
chart.setYAxisMetric("responsetime2");//otherwise: _gwt$exception:this.metricFacet is null
SC.logWarn("getXAxisMetric="+chart.getXAxisMetric() );
SC.logWarn("getYAxisMetric="+chart.getYAxisMetric() );
Criteria c = new Criteria("r_node", "1002");
DataSource ds = DataSource.get( "pinghists" );
ds.fetchData(c, new DSCallback() {
public void execute(DSResponse response, Object rawData, DSRequest request) {
chart.setData(response.getData());
}
});
chart.draw();
------------ BuiltInDS.gwt.xml: ------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to="builtinds">
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.smartgwtee.tools.Tools"/>
<inherits name="com.smartgwtee.SmartGwtEENoScript"/>
<inherits name="com.smartgwt.Charts"/>
<inherits name="com.smartgwt.Drawing"/>
<add-linker name="xsiframe" />
<entry-point class='com.smartgwt.sample.client.BuiltInDS'/>
</module>
------------- pinghists.ds.xml: ------------
<DataSource
ID="pinghists"
serverType="sql"
tableName="pings_history"
testFileName="pinghists.data.xml"
>
<fields>
<field name="id" title="Ping_h ID" type="integer" primaryKey="true" required="true"/>
<field name="r_node" title="Node ID" type="integer"/>
<field name="ping_id" title="Ping ID" type="integer" detail="true"/>
<field name="occuretime" title="ping'ed at" type="datetime"/>
<field name="responsetime1" title="Response time1" type="float" />
<field name="responsetime2" title="Response time2" type="float" />
<field name="responsetime3" title="Response time3" type="float" />
</fields>
</DataSource>
-------------------