<?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 Alter chart color expression at run time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150915#M28850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exellent Johannes, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2009 17:07:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-03T17:07:49Z</dc:date>
    <item>
      <title>Alter chart color expression at run time</title>
      <link>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150913#M28848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a chart which I want to be able to change the color dynamically, I spotted the following piece of code in the API&lt;/P&gt;&lt;P&gt;set Graph = ActiveDocument.Sheets("Main").CreateBarChart&lt;BR /&gt;Graph.AddDimension "ProductType"&lt;BR /&gt;Graph.AddExpression "sum(Amount)"&lt;BR /&gt;Graph.AddBkgColorExpression "if(sum(Amount)&amp;gt;10,green(),red())",0&lt;/P&gt;&lt;P&gt;but it doesnt actually alter the background expression, can anyone advise how to get it to change the actual background color expression.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 15:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150913#M28848</guid>
      <dc:creator />
      <dc:date>2009-08-03T15:58:01Z</dc:date>
    </item>
    <item>
      <title>Alter chart color expression at run time</title>
      <link>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150914#M28849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heya,&lt;/P&gt;&lt;P&gt;If you want to change the expression on a dimension or expression you can do something along the lines of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;B&gt;sub AnyOldMacroName&lt;BR /&gt;set chart = ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;set cp = chart.GetProperties&lt;BR /&gt;set dims = cp.Dimensions&lt;BR /&gt;set bce = dims(0).AttributeExpressions.BkgColorExp&lt;BR /&gt;bce.Definition.v = "if(Sum(Sales)&amp;gt;1000, LightGreen(), LightRed())"&lt;BR /&gt;chart.SetProperties cp&lt;BR /&gt;end sub&lt;/B&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;//Johannes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 16:20:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150914#M28849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-03T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Alter chart color expression at run time</title>
      <link>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150915#M28850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exellent Johannes, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 17:07:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150915#M28850</guid>
      <dc:creator />
      <dc:date>2009-08-03T17:07:49Z</dc:date>
    </item>
    <item>
      <title>Alter chart color expression at run time</title>
      <link>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150916#M28851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to mention is there anywhere that you can actually get a list of each of the different properties.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 17:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alter-chart-color-expression-at-run-time/m-p/150916#M28851</guid>
      <dc:creator />
      <dc:date>2009-08-03T17:08:27Z</dc:date>
    </item>
  </channel>
</rss>

