Jun 22, 2017, 7:31 AM
[CLOSED] Production issue, error when parsing chart
Hello
In this example :
So, what happened?
In this example :
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
protected void DataSet1(object sender, DirectEventArgs e)
{
this.chartTop10Country.GetStore().DataSource = this.DS1;
this.chartTop10Country.GetStore().DataBind();
this.chartTop10Country.Call("refreshLegendStore");
}
protected void DataSet2(object sender, DirectEventArgs e)
{
this.chartTop10Country.GetStore().DataSource = this.DS2;
this.chartTop10Country.GetStore().DataBind();
this.chartTop10Country.Call("refreshLegendStore");
}
private object[] DS1
{
get
{
return new object[]
{
new object[] { "A", 71.72 },
new object[] { "B", 29.01 },
new object[] { "C", 83.81 },
new object[] { "D", 52.55 }
};
}
}
private object[] DS2
{
get
{
return new object[]
{
new object[] { "E", 30 },
new object[] { "F", 45 },
new object[] { "G", 25 },
new object[] { "H", 10 }
};
}
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<h1>Refresh legend sample</h1>
<ext:Panel
runat="server"
Title="Area Chart"
Width="800"
Height="600"
Layout="FitLayout">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:ToolbarFill runat="server" />
<ext:Button
runat="server"
Text="Dataset 1"
Icon="ArrowRefresh"
OnDirectClick="DataSet1" />
<ext:Button
runat="server"
Text="DataSet 2"
Icon="ArrowRefresh"
OnDirectClick="DataSet2" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:PolarChart
ID="chartTop10Country"
runat="server"
Shadow="true"
InsetPadding="60"
InnerPadding="20">
<LegendSpriteConfig runat="server" />
<Store>
<ext:Store
runat="server"
AutoDataBind="true">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Country" />
<ext:ModelField Name="Created" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Interactions>
<ext:ItemHighlightInteraction />
<ext:RotateInteraction />
</Interactions>
<Series>
<ext:Pie3DSeries
AngleField="Created"
ShowInLegend="true"
Colors="#00FFFF,#2BFFD4,#55FFAA,#80FF7F"
Donut="30">
<Label Field="Country" Display="Rotate" FontSize="18" FontFamily="Arial" />
</ext:Pie3DSeries>
</Series>
</ext:PolarChart>
</Items>
</ext:Panel>
</form>
</body>
</html>
It works well in development environment, but whan I put it in production , I get this error message :
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.String[]' from its string representation '#00FFFF,#2BFFD4,#55FFAA,#80FF7F' for the 'Colors' property.
Source Error:
Line 115: </Interactions>
Line 116: <Series>
Line 117: <ext:Pie3DSeries
Line 118: AngleField="Created"
Line 119: ShowInLegend="true"
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type 'System.String[]' from its string representation '#00FFFF,#2BFFD4,#55FFAA,#80FF7F' for the 'Colors' property.
Source Error:
Line 115: </Interactions>
Line 116: <Series>
Line 117: <ext:Pie3DSeries
Line 118: AngleField="Created"
Line 119: ShowInLegend="true"
Last edited by fabricio.murta; Jun 27, 2017 at 3:09 PM.