Hi, I am developing chart in VS 2010. In Web.config : <handlers> <remove name="OPTIONSVerbHandler" /> <remove name="WebServiceHandlerFactory-Integrated" /> <remove name="svc-Integrated" /> <remove name="WebDAV"
/> <remove name="ChartImageHandler" /> <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler,
System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" /> <add name="OwssvrHandler" scriptProcessor="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\owssvr.dll"
path="/_vti_bin/owssvr.dll" verb="*" modules="IsapiModule" preCondition="integratedMode" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd"
preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptResource" preCondition="integratedMode"
verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="JSONHandlerFactory"
path="*.json" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" preCondition="integratedMode"
/> <add name="ReportViewerWebPart" verb="*" path="Reserved.ReportViewerWebPart.axd" type="Microsoft.ReportingServices.SharePoint.UI.WebParts.WebPartHttpHandler, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> <add name="ReportViewerWebControl" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms,
Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </handlers> In ASPX Code behind: try { Chart chrt = new Chart(); chrt.Visible = true; chrt.Series.Add("DailyConsumption"); chrt.Legends.Add("TestLegend");
string query = string.Format("select * from Consumption"); chrt.DataSource = sqlObj.GetTable(query); chrt.Series["DailyConsumption"].XValueMember = "Devices"; chrt.Series["DailyConsumption"].YValueMembers = "DailyConsumption";
chrt.Legends["TestLegend"].Enabled = true; // chrt.Legends["TestLegend"].Alignment = StringAlignment.Far; chrt.Legends["TestLegend"].Docking = Docking.Bottom; chrt.ChartAreas.Add("TestArea"); chrt.Series["DailyConsumption"].ChartArea
= "TestArea"; //chrt.ChartAreas["TestArea"].Area3DStyle.Enable3D = true; chrt.ChartAreas["TestArea"].AxisY.TitleAlignment = StringAlignment.Center; chrt.ChartAreas["TestArea"].AxisX.LabelStyle.Angle = -90; chrt.ChartAreas["TestArea"].AxisX.LabelStyle.Font
= chrt.ChartAreas["TestArea"].AxisY.LabelStyle.Font = new Font("Arial", 9, GraphicsUnit.Pixel); chrt.ChartAreas["TestArea"].AxisX.LabelStyle.ForeColor = chrt.ChartAreas["TestArea"].AxisY.LabelStyle.ForeColor = Color.DarkBlue;
//chrt.ChartAreas["TestArea"].AxisX.TitleAlignment = StringAlignment.Near; chrt.ChartAreas["TestArea"].AxisX.TextOrientation = TextOrientation.Horizontal; chrt.Series["DailyConsumption"].Color = System.Drawing.Color.MediumSeaGreen;
chrt.Series["DailyConsumption"].BorderColor = System.Drawing.Color.Yellow; chrt.Series["DailyConsumption"].MarkerColor = System.Drawing.Color.Firebrick; chrt.Series["DailyConsumption"].ChartType = SeriesChartType.Line; chrt.ChartAreas["TestArea"].AxisX.Title
= "Devices"; chrt.ChartAreas["TestArea"].AxisY.Title = "DailyConsumption"; chrt.DataBind(); this.Controls.Add(chrt); } I am getting error: No http handler was found for request type 'POST' Need Help Guhananth.S
↧