<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to read theme values. in custom visuals in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-read-theme-values-in-custom-visuals/m-p/2475703#M4482</link>
    <description>&lt;P&gt;After some more research, I have the impression that there is no way to initialize a chart with values from the theme.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Color values are not passed to the constructor.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Colors could be set the first time the update method runs, however, the colors would then be set and a change on the theme wouldn't have any impact on the chart&lt;/LI&gt;&lt;LI&gt;The reset to default settings would not have the same result as creating the chart&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;It seems that the concept of themes isn't integrated into PBI custom visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could confirm my theory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Apr 2022 17:42:09 GMT</pubDate>
    <dc:creator>superspandl</dc:creator>
    <dc:date>2022-04-25T17:42:09Z</dc:date>
    <item>
      <title>How to read theme values. in custom visuals</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-read-theme-values-in-custom-visuals/m-p/2470071#M4473</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get the values from a theme within a custom visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the color settings with the `ColorHelper`, but how can I get values about font family, size, and colors?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I look into this sample theme:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/gonz4lex/7097bc0a7c6b40a7067a065965ad6414" target="_blank"&gt;https://gist.github.com/gonz4lex/7097bc0a7c6b40a7067a065965ad6414&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or&lt;BR /&gt;&lt;A href="https://github.com/mattrudy/PowerBI-ThemeTemplates/blob/master/GlobalLevelTemplate.json" target="_blank"&gt;https://github.com/mattrudy/PowerBI-ThemeTemplates/blob/master/GlobalLevelTemplate.json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Multiple values could be defaults for custom visuals (color, font family, alignment for labels and titles, even background color, transparency, or border radius).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two questions:&lt;/P&gt;&lt;P&gt;1. Is there a way to get them with the API?&lt;/P&gt;&lt;P&gt;2. Are all these properties also present in the default theme?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;ralph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 22:26:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-read-theme-values-in-custom-visuals/m-p/2470071#M4473</guid>
      <dc:creator>superspandl</dc:creator>
      <dc:date>2022-04-21T22:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to read theme values. in custom visuals</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-read-theme-values-in-custom-visuals/m-p/2475703#M4482</link>
      <description>&lt;P&gt;After some more research, I have the impression that there is no way to initialize a chart with values from the theme.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Color values are not passed to the constructor.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Colors could be set the first time the update method runs, however, the colors would then be set and a change on the theme wouldn't have any impact on the chart&lt;/LI&gt;&lt;LI&gt;The reset to default settings would not have the same result as creating the chart&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;It seems that the concept of themes isn't integrated into PBI custom visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could confirm my theory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 17:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-read-theme-values-in-custom-visuals/m-p/2475703#M4482</guid>
      <dc:creator>superspandl</dc:creator>
      <dc:date>2022-04-25T17:42:09Z</dc:date>
    </item>
  </channel>
</rss>

