RADHTMLChart和堆积柱系列代码背后的人口

时间:2015-04-27 12:14:12

标签: asp.net vb.net charts telerik reporting

我有一个问题,我一直在苦苦挣扎很长时间,

我创建了一个报表应用程序,其中包含表示来自DB的对象的类,在这种情况下,它们是项目和资源 我希望图表能够将每个项目预览为一个系列,并将每个项目的资源预览为堆叠视图中的系列项目,每个资源的Y值作为此特定项目上每个资源所消耗的房屋

Projects And Resources

我已经尽了一切努力让它运转起来,阅读所有关于此的Telerik文档并且它不起作用 现在我让他们显示,因为他们之前没有正确显示,但RADHTMLChart的图例只显示系列名称,我希望列中的每个项目显示资源的名称,甚至是显示名称的图例资源不是项目名称,请注意我确实隐藏了图例,因为它基本上显示项目名称而不是资源名称

下面填充它的代码:

Dim Projects As New List(Of Project)
    Projects = GetProjects()
    For Each nProject As Project In Projects
        Dim npChartSeries As New ColumnSeries
        npChartSeries.Stacked = True
        'npChartSeries.StackType = HtmlChart.Enums.HtmlChartStackType.Normal
        ' npChartSeries.GroupName = nProject.Name

        Dim npAxisItem As New AxisItem
        npAxisItem.LabelText = nProject.Name
        If nProject.Resources IsNot Nothing Then
            For Each nEmp As Employee In nProject.Resources

                Dim npSeriesItem As New SeriesItem
                npSeriesItem.Name = nEmp.Username

                npSeriesItem.YValue = nEmp.TotalTimesheets
                npChartSeries.Items.Add(npSeriesItem)
            Next
        End If

        RadHtmlChart2.PlotArea.XAxis.Items.Add(npAxisItem)
        RadHtmlChart2.PlotArea.Series.Add(npChartSeries)

    Next

使用ASP.Net图表我能够实现我想要的,但在这里它完全不起作用,非常感谢您的帮助,谢谢

0 个答案:

没有答案