2

I use D3 DynamicDataDisplay for my chart needs but when I try to setup Legend description for LineGraph element it gives me error:

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

Ok, but how to set this up? I tried that:

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

It gives the error I wrote. I also tried this:

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

Problem is that there is nothing I can put instead of ??. How to deal with it? The library is really great but I stucked on this one.

Joe
  • 2,551
  • 6
  • 38
  • 60

2 Answers2

3

Funny, sometimes writing question on SO results in finding the answer very quickly by myself :]

It seems second code is ok, you just have to add:

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

I have no idea why I haven't noticed it before.

Joe
  • 2,551
  • 6
  • 38
  • 60
1
    <d3:ChartPlotter>
        <d3:LineGraph Stroke="Green" x:Name="line">
            <d3:ViewportElement2D.Description >
                <d3:PenDescription DescriptionString="Test"/>
            </d3:ViewportElement2D.Description>
        </d3:LineGraph>
    </d3:ChartPlotter>