Вы можете построить диаграмму с данными списка SharePoint в веб-части, например:
<asp:Chart ID="Chart1" runat="server" Width="500">
<series>
<asp:Series
Name="Population"
XValueMember="Year"
YValueMembers="Population"
IsVisibleInLegend="true">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea
Name="ChartArea1"
Area3DStyle-Enable3D="true">
<AxisX LineColor="DarkGreen">
<MajorGrid LineColor="LightGray" />
</AxisX>
<AxisY LineColor="DarkGreen">
<MajorGrid LineColor="LightGray" />
</AxisY>
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend></asp:Legend>
</Legends>
</asp:Chart>
Код:
try
{
var table = new DataTable();
table.Columns.Add("Year", typeof(int));
table.Columns.Add("Population", typeof(long));
table.Columns.Add("Lbl");
using (SPSite site = new SPSite(YourSiteUrl))
{
using (SPWeb web = site.OpenWeb())
{
SPList _bugetlist = web.Lists["YearTotal"];
foreach (SPListItem _item1 in _bugetlist.Items)
{
var row = table.NewRow();
row["Year"] = Convert.ToInt16(_item1["Year"]);
row["Population"] = Convert.ToInt16(_item1["Population"]);
table.Rows.Add(row);
}
}
}
Chart1.ChartAreas["ChartArea1"].AxisY.Title = "Population";
Chart1.ChartAreas["ChartArea1"].AxisX.Title = "Years";
Chart1.DataSource = table;
Chart1.DataBind();
Справка:
Как создать пользовательскую диаграмму с данными из списка SharePoint