{"id":2184,"date":"2026-07-14T15:14:19","date_gmt":"2026-07-14T07:14:19","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2184"},"modified":"2026-03-28T09:44:13","modified_gmt":"2026-03-28T09:44:13","slug":"how-to-use-applicationshowcharttipvalues-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationshowcharttipvalues-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.ShowChartTipValues in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the Excel object model, the <strong>Application.ShowChartTipValues<\/strong> property is a member of the top-level Application object. This property controls whether chart tip values (also known as data labels or tooltips) are displayed when you hover the mouse pointer over a data point in a chart within Excel. When enabled, users can see the exact numeric value of a data point directly on the chart, enhancing data visualization and analysis. This setting applies globally to all open workbooks in the Excel instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In xlwings, you can access and manipulate this property through the <code>api<\/code> property of the App object, which provides a direct gateway to the underlying Excel Application object via the COM interface. The xlwings API call follows the pattern: <code>app.api.ShowChartTipValues<\/code>, where <code>app<\/code> is an instance of <code>xlwings.App<\/code>. This property is a Boolean value, meaning it can be set to <code>True<\/code> to enable chart tip values or <code>False<\/code> to disable them. You can also retrieve its current state to check if the feature is active.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The syntax for using ShowChartTipValues in xlwings is straightforward:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To get the current setting: <code>current_setting = app.api.ShowChartTipValues<\/code><\/li>\n\n\n\n<li>To set the setting: <code>app.api.ShowChartTipValues = True<\/code> or <code>app.api.ShowChartTipValues = False<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">There are no parameters for this property, as it is a simple Boolean attribute. However, it&#8217;s important to note that changes made to this property affect the entire Excel application session. This means that all charts across all open workbooks will adhere to this setting until it is changed again or Excel is closed. It&#8217;s a useful feature for presentations or reports where you might want to temporarily hide or show data values for clarity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a practical xlwings API code example that demonstrates how to use the ShowChartTipValues property:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\n# Connect to the active Excel instance or start a new one\napp = xw.apps.active if xw.apps.active else xw.App()\n\n# Get the current state of ShowChartTipValues\ncurrent_state = app.api.ShowChartTipValues\nprint(f\"Current ShowChartTipValues setting: {current_state}\")\n\n# Disable chart tip values\napp.api.ShowChartTipValues = False\nprint(\"Chart tip values have been disabled.\")\n\n# Perform some chart-related operations, e.g., open a workbook with a chart\nwb = app.books.open('example.xlsx')\nchart = wb.sheets&#91;0].charts&#91;0] # Assuming the first chart on the first sheet\n# At this point, hovering over chart data points will not show values\n\n# Re-enable chart tip values\napp.api.ShowChartTipValues = True\nprint(\"Chart tip values have been re-enabled.\")\n\n# Close the workbook without saving\nwb.close()\n\n# Optionally, reset to the original state if needed\napp.api.ShowChartTipValues = current_state\n\n# Quit the Excel application if it was started by this script\nif not xw.apps.active:\napp.quit()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Excel object model, the **Application.ShowChartTipValues** property is a member of the top-le&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2184","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/comments?post=2184"}],"version-history":[{"count":1,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2184\/revisions"}],"predecessor-version":[{"id":3340,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2184\/revisions\/3340"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}