I am trying to use ASP.NET chart controls for a website that is localized in multiple languages. However, we had problems with charts when we recently added Chinese localization - all the labels show the squares on which we actually want to use Chinese characters, as shown in my example below (note, I donβt know Chinese, so this may say anything)
default.aspx (without code):
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ChineseChart._Default" %> <%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Chart runat="server" Height="270px" Palette="None" PaletteCustomColors="0, 192, 96; 0, 96, 48"> <legends> <asp:Legend Alignment="Center" Docking="Bottom" Name="Legend1" BorderColor="Black"> </asp:Legend> </legends> <titles> <asp:Title Name="Title1" Text="ζηη€ΊδΎεΎθ‘¨"> </asp:Title> </titles> <series><asp:Series Name="ε―" ChartType="Pie" Legend="Legend1"> <points> <asp:DataPoint AxisLabel="ι
ε§" MapAreaAttributes="" ToolTip="" Url="" YValues="65" /> <asp:DataPoint AxisLabel="ε―" MapAreaAttributes="" ToolTip="" Url="" YValues="24" /> </points> </asp:Series> </series> <chartareas><asp:ChartArea Name="ChartArea1"></asp:ChartArea></chartareas> </asp:Chart> </div> </form> </body> </html>
Generated Chart:

(source: simonrice.com )
For me, this indicates a character encoding problem, but I cannot find anything in the chart object to change the encoding of the control.
Is there any way I can solve this problem?
Update: we also have this site in Greek and Hebrew, and none of these languages ββcauses us any problems on the charts.
source share