我想知道为什么#XVAL显示索引(从0到3,因为那里有4个项目)而不是ex:"< 0.50%"等等。这将帮助我改变所需的输出,即"< 0.50%"
我也尝试过#AXISLABEL而且它没有用。
以下是代码片段:
Private Sub LoadGraphicChart()
Try
C1Chart2.ChartGroups(0).ChartData.SeriesList.Clear()
' Data
Dim items As String() = New String() {"< 0.50%", "0.50% - 1.00%", "1.00% - 2.00%", "> 2.00%"}
Dim unitHData As Double() = New Double() {7 / 100, 0, 0, 1 / 100}
'first try, populating the series
Dim unitH As C1.Win.C1Chart.ChartDataSeriesCollection = C1Chart2.ChartGroups(0).ChartData.SeriesList
'unitH.Clear()
Dim series As ChartDataSeries = unitH.AddNewSeries
series.Label = "Unit Holder"
series.LineStyle.Color = Color.MediumPurple
series.X.CopyDataIn(items)
series.Y.CopyDataIn(unitHData)
'tooltip
C1Chart2.ToolTip.Enabled = True
For Each ds As ChartDataSeries In unitH
ds.TooltipText = "Series = {#TEXT}" + ControlChars.Cr + ControlChars.Lf + "X = {#XVAL}" + ControlChars.Cr + ControlChars.Lf + "Y = {#YVAL:0.00%}"
Next ds
End Try
End Sub
这就是工具提示目前的样子: