SL for AGS API V1.2 Visifirev2.3.6 地图中创建 图表

string str = "<ControlTemplate xmlns=\"http://schemas.microsoft.com/client/2007\">"
  + "<Canvas >"
         + "<vc:Chart xmlns:vc=\"clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts\" " //需要和前台页面代码引用部分相同
  +      "Width=\"500\" Height=\"446\" Theme=\"Theme3\"  Watermark=\"False\">"
  + "<vc:Chart.Series><vc:DataSeries RenderAs=\"Column\" >"
  +      "<vc:DataSeries.DataPoints>"
  +          "<vc:DataPoint YValue=\"28\"/>"
  +          "<vc:DataPoint YValue=\"50\"/>"
  +          "<vc:DataPoint YValue=\"35\"/>"
  +          "<vc:DataPoint YValue=\"24\"/>"
  +          "<vc:DataPoint YValue=\"48\"/>"
  +      "</vc:DataSeries.DataPoints>"
  +  "</vc:DataSeries></vc:Chart.Series>"                        
  + "</vc:Chart>"
  + "</Canvas>"
  + "</ControlTemplate>";var template = (ControlTemplate)XamlReader.Load(str);
var ms = new MarkerSymbol();
ms.ControlTemplate = template;
ms.OffsetX = -1;
ms.OffsetY = 146;
var graphic = new Graphic
{
Geometry = graphicPoint.Geometry,
Symbol =ms
};

posted @ 2010-07-16 21:17  明琎  阅读(212)  评论(2)    收藏  举报