<?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 Creating a multline x axis in a bar chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-multline-x-axis-in-a-bar-chart/m-p/1419150#M33617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am creating a chart to show survey results.&amp;nbsp; Each question on the survey is varying in in length from 50-200 characters.&amp;nbsp; When I create the chart many of the questions are too long to display.&amp;nbsp; So I have created a method to split the lines dynamically.&amp;nbsp; Below is my code followed by the problem I'm facing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(len(QuestionTXT) &amp;lt; 50, //if the length is more than 50...&lt;/P&gt;&lt;P&gt;left(QuestionTXT,round(len(QuestionTXT)/2)) &lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp;&lt;/P&gt;&lt;P&gt;right(QuestionTXT, round(len(QuestionTXT)/2)), //then split it into two lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(QuestionTXT,round(len(QuestionTXT)/3)-1) &lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp; &lt;/P&gt;&lt;P&gt;mid(QuestionTXT,round(len(QuestionTXT)/3),round(len(QuestionTXT)/3))&lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp;&lt;/P&gt;&lt;P&gt;right(QuestionTXT, round(len(QuestionTXT)/3))) //otherwise split it into three lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working but with some burps.&amp;nbsp; I think because of the rounding function its giving some mixed results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One two line question looks like this:&lt;/P&gt;&lt;P&gt;"I can use R to&lt;BR /&gt;o work with the data"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full question is "I can use R to work with the data"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another prints out:&lt;/P&gt;&lt;P&gt;"I can effectively&lt;BR /&gt;profile a dataset to un&lt;BR /&gt;rstand its limitations"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that one the full question is ""I can effectively profile a dataset to understand its limitations" (notice its missing "de")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd love some tips to tighten this up and make it more humanely readable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2017 19:49:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-26T19:49:40Z</dc:date>
    <item>
      <title>Creating a multline x axis in a bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-multline-x-axis-in-a-bar-chart/m-p/1419150#M33617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am creating a chart to show survey results.&amp;nbsp; Each question on the survey is varying in in length from 50-200 characters.&amp;nbsp; When I create the chart many of the questions are too long to display.&amp;nbsp; So I have created a method to split the lines dynamically.&amp;nbsp; Below is my code followed by the problem I'm facing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(len(QuestionTXT) &amp;lt; 50, //if the length is more than 50...&lt;/P&gt;&lt;P&gt;left(QuestionTXT,round(len(QuestionTXT)/2)) &lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp;&lt;/P&gt;&lt;P&gt;right(QuestionTXT, round(len(QuestionTXT)/2)), //then split it into two lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(QuestionTXT,round(len(QuestionTXT)/3)-1) &lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp; &lt;/P&gt;&lt;P&gt;mid(QuestionTXT,round(len(QuestionTXT)/3),round(len(QuestionTXT)/3))&lt;/P&gt;&lt;P&gt;&amp;amp; chr(13) &amp;amp;&lt;/P&gt;&lt;P&gt;right(QuestionTXT, round(len(QuestionTXT)/3))) //otherwise split it into three lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working but with some burps.&amp;nbsp; I think because of the rounding function its giving some mixed results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One two line question looks like this:&lt;/P&gt;&lt;P&gt;"I can use R to&lt;BR /&gt;o work with the data"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full question is "I can use R to work with the data"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another prints out:&lt;/P&gt;&lt;P&gt;"I can effectively&lt;BR /&gt;profile a dataset to un&lt;BR /&gt;rstand its limitations"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that one the full question is ""I can effectively profile a dataset to understand its limitations" (notice its missing "de")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd love some tips to tighten this up and make it more humanely readable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 19:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-multline-x-axis-in-a-bar-chart/m-p/1419150#M33617</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-26T19:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a multline x axis in a bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-multline-x-axis-in-a-bar-chart/m-p/1419151#M33618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using Chr(10) instead of Chr(10). It's cleaner I believe. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Round is the issue I believe. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 20:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-multline-x-axis-in-a-bar-chart/m-p/1419151#M33618</guid>
      <dc:creator>vkish16161</dc:creator>
      <dc:date>2017-09-26T20:20:19Z</dc:date>
    </item>
  </channel>
</rss>

