POST
|
I was wondering if anyone has used dojox charting in their web map. I made a test map using the popup and mediainfos type:"linechart", however I need more control over the chart. I need to label the x-axis and invert y-axis in the chart. So after a lot of searching on google I believe that I need to use dojox charts. Something like this - http://dojotoolkit.org/reference-guide/1.10/dojox/charting.html require(["dojox/charting/Chart", "dojox/charting/axis2d/Default", "dojox/charting/plot2d/Lines", "dojo/ready"], function(Chart, Default, Lines, ready){ ready(function(){ var chart1 = new Chart("simplechart"); chart1.addPlot("default", {type: Lines}); chart1.addAxis("x"); chart1.addAxis("y", {vertical: true}); chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render(); }); }); I would like to place a chart like this example in a popup - http://dojotoolkit.org/documentation/tutorials/1.8/charting/demo/monthly-sales.php I would be very grateful if someone could show an example or give some guidance. Thank you Gray link to test map - HPWD Observation Map This is my current code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Simple Map</title> <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css"> <style> html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } body { background-color: #FFF; overflow: hidden; font-family: "Trebuchet MS"; } </style> <script src="http://js.arcgis.com/3.10/"></script> <script> var map; require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/dijit/Popup", "esri/dijit/PopupTemplate", "dojo/domReady!"], function(Map, Tiled, FeatureLayer, Popup, PopupTemplate) { map = new Map("map", { basemap: "topo", center: [-102.040536, 34.188206], // longitude, latitude zoom: 13 }); var tiled = new Tiled("http://gis.hpwd.com/arcgisweb/rest/services/obswells2014v2/MapServer"); map.addLayer(tiled); var template = new PopupTemplate({ title: "HPWD Water Levels", description: "Observation Well Number: {StateWellN}", fieldInfos: [{ //define field infos so we can specify an alias fieldName: "DTW_2004", label: "2004" },{ fieldName: "DTW_2005", label: "2005" },{ fieldName: "DTW_2006", label: "2006" },{ fieldName: "DTW_2007", label: "2007" },{ fieldName: "DTW_2008", label: "2009" },{ fieldName: "DTW_2009", label: "2009" },{ fieldName: "DTW_2010", label: "2010" },{ fieldName: "DTW_2011", label: "2011" },{ fieldName: "DTW_2012", label: "2012" },{ fieldName: "DTW_2013", label: "2013" },{ fieldName: "DTW_2014", label: "2014" }], mediaInfos:[{ //define the bar chart caption: "", type:"linechart", value:{ fields:["DTW_2004","DTW_2005","DTW_2006","DTW_2007","DTW_2008","DTW_2009","DTW_2010","DTW_2011","DTW_2012","DTW_2013","DTW_2014"] } }] }); var featureLayer = new FeatureLayer("http://gis.hpwd.com/arcgisweb/rest/services/obswells2014v2/MapServer/1",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], infoTemplate: template }); map.addLayer(featureLayer); }); </script> </head> <body> <div id="map"></div> </body> </html>
... View more
07-21-2014
06:41 PM
|
0
|
0
|
2698
|
POST
|
JSkinn3, could you please explain how to remove the renderer rings and draw a new set when the map is clicked a second time. I have tried a few different things, but i think this is what I should use - map.removeLayer(graphicsLayer);. This however returns an error (graphicsLayer is not defined). Thanks, Gray
... View more
03-31-2014
11:44 AM
|
0
|
0
|
572
|
POST
|
JSkinn3, Thank you it works great. I still have a lot to learn. Gray
... View more
03-25-2014
05:36 AM
|
0
|
0
|
572
|
POST
|
Hello, i need a little help. I created a web map that uses the buffer tool with 7 different rings. I want to change the color of each ring. Does anyone know how to do this? Thanks, Gray <script> dojo.require("esri.map"); dojo.require("esri.tasks.geometry"); var map = null; var gsvc = null; function initialize() { gsvc = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); map.on("click", doBuffer);} function doBuffer(evt) { map.graphics.clear(); var params = new esri.tasks.BufferParameters(); params.geometries = [ evt.mapPoint ]; //buffer in linear units such as meters, km, miles etc. params.distances = [ 100, 200, 300, 350, 400, 500, 540 ]; params.unit = esri.tasks.GeometryService.UNIT_YARDS; params.outSpatialReference = map.spatialReference; gsvc.buffer(params, showBuffer); } function showBuffer(geometries) { var symbol = new esri.symbol.SimpleFillSymbol( esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol( esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0,0.85]), 2 ), new dojo.Color([0,0,0,0.06]) ); dojo.forEach(geometries, function(geometry) { var graphic = new esri.Graphic(geometry,symbol); map.graphics.add(graphic); }); } dojo.ready(initialize); </script> [ATTACH=CONFIG]32460[/ATTACH]
... View more
03-24-2014
06:43 PM
|
0
|
5
|
1072
|
POST
|
When i add ortho in ArcPad 10 it is grayscale. The ortho is a four band color jp2 file. Is there anyway to display it in color? Thanks
... View more
10-27-2010
07:04 PM
|
0
|
0
|
2001
|
Online Status |
Offline
|
Date Last Visited |
04-18-2023
07:12 AM
|