1
A
回答
0
我希望我不晚到晚會,因爲這個問題到現在已經有一個月了,但是我猜,遲到總比沒有晚。
如果您知道類別的指數,您可以使用此代碼:
// Replace ActiveChart with your specific chart.
// The index of the ChartGroup is always 1,
// unless you have multiple chart groups in your chart.
var chartGroup = (ChartGroup)_application.ActiveChart.ChartGroups(1);
var category = (ChartCategory)chartGroup.FullCategoryCollection(Index: 2);
category.IsFiltered = true;
如果你只知道這個名字,你需要遍歷類別:
// If you want to skip the already hidden categories,
// you can use .CategoryCollection() instead of .FullCategoryCollection() two times.
var categories = (CategoryCollection)chartGroup.FullCategoryCollection();
for (int i = 1; i <= categories.Count; i++)
{
var category = (ChartCategory)chartGroup.FullCategoryCollection(i);
if (category.Name == "W2 - 13/01/17")
category.IsFiltered = true;
}
相關問題
- 1. 無法設置範圍類的隱藏屬性c#excel interop
- 2. 在excel中隱藏圖表VBA
- 3. 用C#Interop隱藏MS-Project中的列
- 4. 如何隱藏功能圖片出現在類別列表中?
- 5. 隱藏Magento中的某些類別?
- 6. 在Woocommerce中隱藏宏類別中的子類別產品
- 7. 表中隱藏類型
- 8. 在Wordpress中隱藏ONE類別名稱
- 9. 設置系列圖表(Interop Excel)
- 10. 如何隱藏類別視圖(MAGENTO)中的基準價格?
- 11. Excel Interop:分組列
- 12. Excel - 如何隱藏圖表數據條中的值
- 13. Excel Interop:應用程序和應用程序類的區別
- 14. 隱藏Excel表格上的某些列
- 15. excel表格的隱藏部分
- 16. 在excel中隱藏列
- 17. 可能從類別視圖中隱藏MediaWiki命名空間?
- 18. 隱藏woocommerce類別小部件的子類別
- 19. 隱藏/取消隱藏圖表/框的VBA代碼
- 20. .net Excel Interop
- 21. c#Excel Interop _Workbooks.Open
- 22. Excel Interop錯誤
- 23. 在VBA中未識別爲Excel圖表的Excel圖表
- 24. 隱藏/取消隱藏excel中的單元格組按鈕
- 25. 如何隱藏和顯示高分類中的類別
- 26. 隱藏子類別冠軍WooCommerce
- 27. WooCommerce 3.x - 隱藏產品類別
- 28. 下拉菜單不隱藏子類別
- 29. XAML無法識別類代碼隱藏
- 30. WordPress隱藏類別特定html