<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Silverlight pie chart sizing in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340767#M8788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used your third suggestion and modified the animation to match.&amp;nbsp; It worked perfectly!&amp;nbsp; I really appreciate all of your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jun 2011 23:49:32 GMT</pubDate>
    <dc:creator>JoeWhite</dc:creator>
    <dc:date>2011-06-08T23:49:32Z</dc:date>
    <item>
      <title>Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340762#M8783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm relatively new to Silverlight and I'm trying to adapt the pie chart sample.&amp;nbsp; Basically what I want is to be able to bind the scale of the chart to a dependency property in the .cs file.&amp;nbsp; Unfortunately, I'm unable to get access to either the RenderTransform or the ScaleTransform.&amp;nbsp; I've tried a couple of different ways to get access to it, including using IValueConverter and TemplateBinding.&amp;nbsp; Obviously there is something I'm missing, but I don't know what it is.&amp;nbsp; A few pointers would be very helpful, if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe White&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 19:12:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340762#M8783</guid>
      <dc:creator>JoeWhite</dc:creator>
      <dc:date>2011-06-04T19:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340763#M8784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm relatively new to Silverlight and I'm trying to adapt the pie chart sample. Basically what I want is to be able to bind the scale of the chart to a dependency property in the .cs file. Unfortunately, I'm unable to get access to either the RenderTransform or the ScaleTransform.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A scale transform is already defined on the pie marker symbol (for the visualstate manager):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Canvas.RenderTransform&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:blue;"&gt; &amp;lt;&lt;SPAN style="color:#a31515;"&gt;ScaleTransform&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleX&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"0.6"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleY&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"0.6"&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Canvas.RenderTransform&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:black;"&gt;If you add a 'Scale' dependency property in PieMarkerSymbol.cs, then you can use it in XAML this way:&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Canvas.RenderTransform&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:#0000ff;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;ScaleTransform&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleX&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"{Binding Symbol.Scale}"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleY&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"{Binding Symbol.Scale}"&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;&lt;SPAN style="color:blue;"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Canvas.RenderTransform&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN style="color:black;"&gt;Note : don't forget to adapt or remove the visualstatemanager as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340763#M8784</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T16:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340764#M8785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; I've tried adding the bindings to the dependency property in the .cs file, but it wouldn't bind.&amp;nbsp; I must have missed the changes to the visualStateManager.&amp;nbsp; I'll give that a try and let you know. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 01:02:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340764#M8785</guid>
      <dc:creator>JoeWhite</dc:creator>
      <dc:date>2011-06-07T01:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340765#M8786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, Domonique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oviously I'm still screwing this up.&amp;nbsp; I've disabled the animations on hover, just to make sure they don't interefere, and setting a binding for a ScaleFactor dependency property in the class. When I do this, it acts like the binding can't be found, and each symbol is being scaled to 1.0.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scale code is below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphic graphic = new Graphic()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int importValue = random.Next(1000000000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;double scaleFactor = (double)importValue / 1000000000; //median value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphic.Attributes["IMPORT"] = importValue;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphic.Attributes["EXPORT"] = random.Next(1000000000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pieChartMarkerSymbol.ScaleFactor = scaleFactor;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphic.Symbol = pieChartMarkerSymbol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graphicsLayer.Graphics.Add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One additional question:&amp;nbsp; Does this set the scale on all of the PieChartMarkerSymbols in a given Layer?&amp;nbsp; If so, that's not exactly what I'm looking for.&amp;nbsp; I would like to set a different scale for each PieChartMarkerSymbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any case, thanks for the replies.&amp;nbsp; If you have any other pointers, I'd really appreciate them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 23:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340765#M8786</guid>
      <dc:creator>JoeWhite</dc:creator>
      <dc:date>2011-06-07T23:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340766#M8787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;pieChartMarkerSymbol.ScaleFactor = scaleFactor;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is coming pieChartMarkerSymbol from?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If it's an unique instance, that can't work because all graphics are sharing the same symbol and so the same scaleFactor (the last one you initialized).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a few options to avoid this issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - create a symbol by graphic (not recommended for performances)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - create a few symbols with various scales and use them in a classBreakRenderer that you affect to your layer &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - store the scale in an attribute of your graphics (e.g. graphic.Attributes["SCALE"] = scaleFactor;) and change your symbol in order to bind to this attribute (e.g. &lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;ScaleTransform&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleX&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"{Binding Attributes[SCALE]}"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; ScaleY&lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;"&gt;="{Binding Attributes[SCALE]}" /&amp;gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:black;"&gt;Note : In the latest case you don't need anymore the ScaleFactor dependency property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:#0000ff;"&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 00:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340766#M8787</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-06-08T00:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Silverlight pie chart sizing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340767#M8788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dominique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used your third suggestion and modified the animation to match.&amp;nbsp; It worked perfectly!&amp;nbsp; I really appreciate all of your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 23:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/silverlight-pie-chart-sizing/m-p/340767#M8788</guid>
      <dc:creator>JoeWhite</dc:creator>
      <dc:date>2011-06-08T23:49:32Z</dc:date>
    </item>
  </channel>
</rss>

