簡體   English   中英

圖表的多種y軸背景色

[英]Multiple y-axis background colors for chart

如何為看起來像這樣的圖表創建背景?

在此處輸入圖片說明

在與狀態相對應的某些%級別上具有不同的背景顏色。 我在ChartArea看到的只是BackColorBackSecondaryColorBackGradientStyle ,它們不會這樣做。 該圖像取自SSRS報告,我正在嘗試使用C#和Microsoft圖表庫重新創建它。 我很確定SSRS使用相同的庫,因此應該可以-我只是不知道如何。

您可以使用StripLine實現此StripLine

// Create the stripline for 'gold status'
StripLine sline = new StripLine();
sline.IntervalOffset = 0.6;
sline.StripWidth = 0.25;
sline.Text = "Gold Status";
sline.Interval = 0.0; // this ensures it will not repeat like normal strip lines
sline.BackColor = Color.Yellow;
myChart.AxisY.StripLines.Add(sline);

對您的帶狀線重復此過程。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM