Microsoft Chart 控件将文件名中的 \n 转换为换行符
我在 Windows 窗体应用程序 vb.net 2008 中使用 Microsoft 图表控件 (system.windows.forms.datavisualization.charting.chart)。我使用饼图中 x 值的文件夹路径。图表控件将 c:\newfolder
之类的名称转换为 c:[newline]ewfolder
。我尝试添加斜杠,使其成为 c:\\newfolder
,但这只会将其更改为 c:\[newline]ewfolder
。这种行为有解决方法吗?
一些代码:
Chart1.Titles.Clear() : Chart1.Titles.Add("Largest Folders in " & txPath.Text)
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie
Chart1.Series(0)("PieLabelStyle") = "Inside"
Chart1.Series(0).YValueType = DataVisualization.Charting.ChartValueType.Double
Chart1.Series(0).XValueType = DataVisualization.Charting.ChartValueType.String
For i = 0 To 9
xVal(i) = Format(value(i) / 1000000, "#,0") & " mb " & fPath(i)
yVal(i) = value(i)
Next i
I am using a Microsoft Chart control (system.windows.forms.datavisualization.charting.chart) in a Windows forms application, vb.net 2008. I use folder paths for the x values in a pie chart. Chart control converts a name like c:\newfolder
into c:[newline]ewfolder
. I tried adding a slash, making it c:\\newfolder
, but this only changes it to c:\[newline]ewfolder
. Is there a workaround for this behavior?
some code:
Chart1.Titles.Clear() : Chart1.Titles.Add("Largest Folders in " & txPath.Text)
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie
Chart1.Series(0)("PieLabelStyle") = "Inside"
Chart1.Series(0).YValueType = DataVisualization.Charting.ChartValueType.Double
Chart1.Series(0).XValueType = DataVisualization.Charting.ChartValueType.String
For i = 0 To 9
xVal(i) = Format(value(i) / 1000000, "#,0") & " mb " & fPath(i)
yVal(i) = value(i)
Next i
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这可行
,或者
也许替换为“/”甚至可以通过复制粘贴与 Windows 资源管理器集成。
Maybe this works
or
Maybe replacing with "/" will even integration with Windows Explorer via copy paste possible.