Shield UI Bar Chart があり、グラフ自体に表示されていないデータから値を取得したいと考えています。この例では、"strTest" のデータ値にアクセスできるようにしたいと考えています。
var dataHours = new List<HoursType>()
{
//This month
new HoursType() { Billable = Math.Round(billThisMonth / totalThisMonth * 100, 2), NonBillable = Math.Round(nonBillThisMonth / totalThisMonth * 100, 2), strTest = nonBillThisMonth},
//Last month
new HoursType() { Billable = Math.Round(billLastMonth / totalLastMonth * 100, 2), NonBillable = Math.Round(nonBillLastMonth / totalLastMonth * 100, 2), strTest = nonBillLastMonth},
//YTD
new HoursType() { Billable = Math.Round(billYTD / totalYTD * 100, 2), NonBillable = Math.Round(nonBillYTD / totalYTD * 100, 2), strTest = nonBillYTD}
};
chtBillableNonBillable.DataSource = dataHours;
chtBillableNonBillable.DataBind();
これがaspフロントエンドです。「CustomPointText」属性で point.strTest を使用しようとしましたが、データが取得されません。
<shield:ShieldChart ID="chtBillableNonBillable" Width="100%" Height="400px" runat="server" CssClass="chart">
<PrimaryHeader Text="Billable/Non-Billable Hours"></PrimaryHeader>
<TooltipSettings CustomPointText="{point.strTest} / {point.y}" >
</TooltipSettings>
<ExportOptions AllowExportToImage="true" AllowPrint="true" />
<Axes>
<shield:ChartAxisX CategoricalValues="Current Month, Last Month, YTD"></shield:ChartAxisX>
<shield:ChartAxisY>
<Title Text="% of Hours"></Title>
</shield:ChartAxisY>
</Axes>
<DataSeries>
<shield:ChartBarSeries DataFieldY="Billable" CollectionAlias="Billable Hours" >
</shield:ChartBarSeries>
<shield:ChartBarSeries DataFieldY="NonBillable" CollectionAlias="Non-Billable Hours">
</shield:ChartBarSeries>
</DataSeries>
</shield:ShieldChart>
どんな助けでも大歓迎です。ありがとうございました!