Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Telerik雷达图持续加载_Telerik_Radchart - Fatal编程技术网

Telerik雷达图持续加载

Telerik雷达图持续加载,telerik,radchart,Telerik,Radchart,我有一个问题,我的RadChart在本地完全加载,但在我部署之后,它只会继续加载,但不会运行。我没有进入实际的图表屏幕 我在整个过程之后放了一个messagebox,这个messagebox就会出现,所以我确信代码已经结束了。我只是不知道为什么屏幕没有完成加载 有什么想法吗 代码: 如果您看不到页面中显示的图表图像,请检查是否在Web.Config中注册了正确版本的HTTP处理程序,或者在设计时通过智能标记添加HTTP处理程序 需要手动注册RadControls“HttpHandlers”,或使

我有一个问题,我的RadChart在本地完全加载,但在我部署之后,它只会继续加载,但不会运行。我没有进入实际的图表屏幕

我在整个过程之后放了一个messagebox,这个messagebox就会出现,所以我确信代码已经结束了。我只是不知道为什么屏幕没有完成加载

有什么想法吗

代码:


如果您看不到页面中显示的
图表图像
请检查
是否在
Web.Config
中注册了正确版本的HTTP处理程序
,或者在设计时通过智能标记添加
HTTP处理程序

需要
手动注册RadControls“HttpHandlers”
,或使用
IIS管理功能。
手动注册的方法如下:
(在web.config文件中)


…
…  

是的,它必须同时在和处理程序下注册。
protected void btnSearch_OnClick(object sender, ImageClickEventArgs e) {

            try
            {

                RadChartPOByFactory.Chart.Series.RemoveSeries();

                RadChartPOByFactory.ClientSettings.ScrollMode = Telerik.Web.UI.ChartClientScrollMode.Both;

                RadChartPOByFactory.DataManager.ValuesXColumn = "FactoryID";
                RadChartPOByFactory.DataManager.ValuesYColumns = new String[] { "Value" };
                RadChartPOByFactory.DataGroupColumn = "Year";
                RadChartPOByFactory.PlotArea.XAxis.DataLabelsColumn = "Factory";
                RadChartPOByFactory.Legend.Appearance.GroupNameFormat = "#VALUE";

                RadChartPOByFactory.PlotArea.YAxis.Appearance.CustomFormat = "$#,##0,,.00M;;K";

                var poReportRawData = from r in report.GetPOHeader_POByFactory_Report(ddlYearFrom.SelectedValue, ddlYearTo.SelectedValue) 
                                      select new { 
                                          Year = r.Year.ToString(), 
                                          Factory = r.Factory, 
                                          Value = r.AmountWithDiscount.Value };

                var factoryRawIDs = (from f in poReportRawData select f.Factory).Distinct();
                List<ListItem> factoryIDs = new List<ListItem>();
                int i = 1;
                foreach (string s in factoryRawIDs.ToList())
                {
                    factoryIDs.Add(new ListItem(s, i.ToString()));
                    i++;
                }

                var poReportData = from po in poReportRawData.ToList() 
                                   select new { 
                                       Year = po.Year, 
                                       FactoryID = factoryIDs.Where(f => f.Text == po.Factory).FirstOrDefault().Value, 
                                       Value = po.Value, 
                                       Factory = po.Factory };

                RadChartPOByFactory.DataSource = poReportData.ToList();
                RadChartPOByFactory.DataBind();

                foreach (ChartSeries cs in RadChartPOByFactory.Series)
                {   
                    cs.DefaultLabelValue = "$#Y{#,##0,}K (#%{#0.###%})";

                    cs.Appearance.LabelAppearance.LabelLocation = StyleSeriesItemLabel.ItemLabelLocation.Inside;
                    cs.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Center;
                    cs.Appearance.LabelAppearance.RotationAngle = 0;

                }

                RadChartPOByFactory.Visible = true;
            }
            catch(ExceptionHandler ex)
            {
                WriteJSHandledException(ex);
            }

        }
protected void RadChartPOByFactory_OnBeforeLayout(object sender, System.EventArgs e) {

            foreach (Telerik.Charting.LabelItem RadChartLegendLabelItem in RadChartPOByFactory.Legend.Items.OrderBy(a=>a.Name)) {
                //Remove the top-most item (which then decrements the item count of the legend) 
                RadChartPOByFactory.Legend.Items.RemoveAt(0);
                //Insert the new (reversed) legend item at the end of the list 
                RadChartPOByFactory.Legend.Items.Insert(RadChartPOByFactory.Legend.Items.Count, RadChartLegendLabelItem);
            }


            foreach (Telerik.Charting.ChartSeries RadChartSerie in RadChartPOByFactory.Chart.Series.OrderBy(a => a.Name)) {

                RadChartSerie.Items.OrderBy(a => a.Parent.Name);

                //Remove the top-most item (which then decrements the item count of the legend) 
                RadChartPOByFactory.Chart.Series.RemoveAt(0);
                //Insert the new (reversed) legend item at the end of the list 
                RadChartPOByFactory.Chart.Series.Insert(RadChartPOByFactory.Chart.Series.Count, RadChartSerie);

            }

            foreach (Telerik.Charting.ChartSeries RadChartSerie in RadChartPOByFactory.Chart.Series.OrderBy(a => a.Name)) {

                foreach (ChartSeriesItem RadChartSerieItem in RadChartSerie.Items.OrderBy(b => b.Name)) {
                    //Remove the top-most item (which then decrements the item count of the legend) 
                    RadChartSerie.Items.RemoveAt(0);
                    //Insert the new (reversed) legend item at the end of the list 

                    string tmpTextBlock = RadChartSerieItem.Label.TextBlock.Text;
                    string[] toMillion = tmpTextBlock.Split(' ');

                    string tmpValue = toMillion[0].Substring(1, toMillion[0].Length - 2);
                    decimal tmpInt = decimal.Parse(tmpValue);

                    if (tmpInt >= 1000) {
                        RadChartSerieItem.Label.TextBlock.Text = tmpInt.ToString("$#,##0,.00M") + " " + toMillion[1];
                    }

                    RadChartSerie.Items.Insert(RadChartSerie.Items.Count, RadChartSerieItem);
                }

            }             
        }
<system.web>
…
<httpHandlers>
…  
    <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false" />
 …
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
 …
</handlers>
</system.webServer>