[Users] Ext.js Chart not displaying data from a shapefile...why???

Pierre Giraud pierre.giraud at camptocamp.com
Wed Oct 27 17:54:59 CEST 2010


What if you change the type of store fields ? Or maybe don't set any.

On Tue, Oct 26, 2010 at 5:44 PM, Robert Buckley
<robertdbuckley at yahoo.com> wrote:
> Hi...
>
> With the following code I can display an ext.js chart. The y-axis is obviously
> reading the store because the max value is correct. However no bars are shown.
>
> Could anyone point out my error as to why the data isn´t displayed?
>
> thanks,
>
> Robert Buckley
>
>
>
> //**************************************************
> // the shapefile layer which contains the data
> //**************************************************
>
> var layer_wea = new OpenLayers.Layer.Vector("Windenergieanlagen", {
>        styleMap: new OpenLayers.StyleMap({
>            "default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
>                graphicName: "circle",
>                fillColor: "#FFD400",
>                strokeColor: "#55FF7F",
>                strokeWidth: 2,
>                graphicOpacity: 0.2,
>                graphicOpacity: 0.2,
>                pointRadius: 4
>            }, OpenLayers.Feature.Vector.style["default"])),
>            "select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
>                graphicName: "circle",
>                fillColor: "#55FF7F",
>                strokeColor: "red",
>                strokeWidth: 2,
>                graphicOpacity: 1,
>                pointRadius: 9
>            }, OpenLayers.Feature.Vector.style["select"]))
>        }),
>        strategies: [new OpenLayers.Strategy.Fixed()],
>        protocol: new OpenLayers.Protocol.WFS({
>            url: "/geoserver/ows",
>            version: "1.1.0",
>            featureType: "WEA_wgs84",
>            featureNS: "http://www.zgb.de/",
>            srsName: "EPSG:900913"
>        })
>    });
>
> //**************************************************
> // the store created from the shapefile layer
> //**************************************************
>
>    var wea_store = new GeoExt.data.FeatureStore({
>        fields: [{
>            name: "Bez",
>            type: "string"
>        }, {
>            name: "Standort",
>            type: "string"
>        }, {
>            name: "Betreiber",
>            type: "string"
>        }, {
>            header: "mw_Inner",
>            type: "int",
>            width: 35
>        }],
>        layer: layer_wea
>    });
>
>
> //*******************************************************************
> //The chart which for some reason doesn´t display the data
> //*******************************************************************
>
>
> var wea_chart=  new Ext.Panel({
>        height: 400,
>        renderTo: 'wea_chart',
>        title: 'Column Chart with Reload - Hits per Month',
>        forceFit: true,
>        items: {
>            xtype: 'columnchart',
>            store: wea_store,
>            yField: 'mw_Inner',
>        url: '../ext/resources/charts.swf',
>            xField: 'Standort',
>            xAxis: new Ext.chart.CategoryAxis({
>                title: 'Standort'
>            }),
>            yAxis: new Ext.chart.NumericAxis({
>                title: 'mw_inner'
>            }),
>            extraStyle: {
>               xAxis: {
>                    labelRotation: -90
>                }
>            }
>        }
>    });
>
>
> };
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>



-- 
Pierre GIRAUD
Géomaticien, Analyste

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list