Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
word wrap in chart legend
posted

Hi

I would like to ask whether it is possible to implement word wrap in chart legend, or the title of the series go to the next line when the title length exceeds width of the legend.

The idea is not to have the scrollbar appears in the chart legend. (my chart legend has its orientation set to Horizontal)

Thanks
tungngie

Parents
No Data
Reply
  • 26458
    Offline posted

    You can try creating a LegendItemTemplate in your series and using a TextBlock with a restricted width and word wrap enabled.

    <igChart:ColumnSeries.LegendItemTemplate>
     <DataTemplate>
      <TextBlock Text="{Binding Series.Title}" TextWrapping="Wrap" Width="100">
      </TextBlock>
     </DataTemplate>
    </igChart:ColumnSeries.LegendItemTemplate> 

Children