SharePoint 2010 Chart Web part 第三方组件 很好用 支持count sum 等

I’m in the process of writing a Charting WebPart for SharePoint 2010, specifically aimed at the standard version, which does not come with such a feature. Of course, it’s still usable within an enterprise environment if you were to find it useful.

Chart WebParts

To download the solution and installation script, follow this link.

The zip contains a solution (wsp) file and a PowerShell script for installation. Before running the script, edit it and change the SolutionFolder variable (line 6) to the location of the extracted wsp file.

Install Script

Once installed, enable the Site Collection Feature SharePoint Stu Chart WebPart.

Feature

Then add the SharePoint Stu Chart WebPart WebPart (within the Custom category) to your page.

Add WebPart

The WebPart works by processing values within the list it’s configured against and displaying either the sum, total or actual item values in a graph. The graphical component of the WebPart utilises the Visifire Silverlight control.

To configure the WebPart, start by bringing up the WebPart editor pane. At the top of the pane you’ll notice a section titled Select Chart Source, this is where you configure the source for the chart, as hinted at by the section title :)

Edit Chart Source

The first drop down is for selecting the source list.

Next, we have a list of views to use for reading the data.

The third drop down list contains a list of available and valid fields for the chart axis; i.e the primary x axis, the content of which will be displayed as the label in the chart.

The last section within this configuration group is where you can specify how the columns are calculated. Leaving the checkbox unchecked allows you to select a value field from the last drop down list to use to when displaying the chart columns. For example, if the source list has three items with a field called total, the value of this field would be used for the rendered columns.

Ticking the checkbox, changes the configuration options slightly.

Calculation Configuration

Now, instead of selecting a column to read the value of, you are required to select one of two options – count or sum. If you select count, the number of distinct fields for the primary x axis are used for the value. If, on the other hand, you select sum, you will need to select a value field to use when calculating the sum total for each column in the chart.

Configure for sum

That pretty much covers the source configuration. The final part of the configuration is for how the chart is displayed. This configuration is contained with the section titledOptions.

Options Section

Within this section you can configure the following:

    • Type of chart – area, column, line, pie or stacked bar
    • Label for the y axis
    • Label for the x axis
    • Height of the chart, in pixels. Minimum is 100, anything below will be ignored
    • Width of the chart, also in pixels. Minimum is 200
    • If the chart should be rendered in 3D
    • If the chart should be animated
    • If a grid should be shown behind the chart columns
    • The colour of the columns – aqua, blue, gray, green, orange, red or violet
    • The cache timeout in minutes for the chart, specifying 0 disables caching

转载于:https://www.cnblogs.com/ahghy/archive/2012/08/09/2630429.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值