2014-02-20 44 views
2

我用D3 DynamicDataDisplay我图的需求,但是当我尝试设置图例说明了LineGraph元素,它给我的错误:设置说明财产XAML - ParseException的

The TypeConverter for "Description" does not support converting from string 

好,但是如何设置呢? 我试过:

<d3:LineGraph DataSource="{Binding Path=AvgWaitingTimes}" Stroke="Blue" 
       Description="Some description"/> 

它给我写的错误。 我也试过这样:

<d3:LineGraph DataSource="{Binding Path=AvgConnectedTimes}" Stroke="Green"> 
    <d3:ViewportElement2D.Description> 
     ?? 
    </d3:ViewportElement2D.Description> 
</d3:LineGraph> 

问题是,有什么我可以把不是??。如何处理它? 这个图书馆真的很棒,但是我对这个图书馆很满意。

回答

3

滑稽,有时写在SO结果问题在我自己很快找到了答案:]

看来第二个代码行,你只需要添加:

<d3:PenDescription DescriptionString="Description is great!"/> 

我不知道为什么我以前没有注意到它。

1
<d3:ChartPlotter> 
     <d3:LineGraph Stroke="Green" x:Name="line"> 
      <d3:ViewportElement2D.Description > 
       <d3:PenDescription DescriptionString="Test"/> 
      </d3:ViewportElement2D.Description> 
     </d3:LineGraph> 
    </d3:ChartPlotter>