<?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: Making graph more responsive to screen size? in G Web Development Software</title>
    <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252454#M342</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/318139"&gt;@yura_beno&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I must be too tired but I can't find the Flexible Resize option, was it moved from the Layout section?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yura_beno_0-1661844421112.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/2e896a767e5cf6fa80ad20aacefe83277d4d63f6/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303734333769314134373338304233364334323243312f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="yura_beno_0-1661844421112.png" alt="yura_beno_0-1661844421112.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In order to configure flexible layout settings for a control it needs to be in a flexible layout container, i.e. either the whole panel itself must be configured for flexible layout or one of the tab frames in a tab control. The&amp;nbsp;&lt;A href="https://www.ni.com/docs/en-US/bundle/g-web-development-2022-q3/page/designing-flex-ui.html" target="_self"&gt;Designing a Responsive User Interface&lt;/A&gt; topic describes how to configure flexible layout for a panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 15:16:42 GMT</pubDate>
    <dc:creator>MilanR</dc:creator>
    <dc:date>2022-08-30T15:16:42Z</dc:date>
    <item>
      <title>Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4197757#M162</link>
      <description>&lt;P&gt;I'm using a Cartesian graph to display data, and it's the primary focal point of the web page.&amp;nbsp; (I.e., the data on the graph is the most important thing to the user.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to make it more responsive to changes in screen size--e.g., look good on a computer, where the web page is likely to be larger in width than height, and on a phone, there the web page is likely to be larger in height than width.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a "Flexible resize" setting on the graph with options for "Do not resize", "Resize width", and "Resize width and height".&amp;nbsp; I was hoping the third one would do what I want, but it always seems to resize width and height proportionally.&amp;nbsp; I could see that I sometimes want this, but in my case, I want them to be resized independently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some screenshots showing what it looks like if I optimize for a desktop computer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-12-10 at 3.10.21 PM.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/a18dce2ab9b9971dc07b9ef8b1a5c44b060f2539/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393539353069384536383337374138303746303645432f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="Screen Shot 2021-12-10 at 3.10.21 PM.png" alt="Screen Shot 2021-12-10 at 3.10.21 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And here's what it looks like on my phone in portrait orientation.&amp;nbsp; I'd like to be able to use more of the vertical space.&lt;/P&gt;
&lt;P&gt;While we're on the subject, I'd like the border around the plot area to be smaller, too.&amp;nbsp; I might as well ask for that while I'm here. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-12-10 15.15.46.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/a523197c7759ae52b1317a805bcf424221e6ae26/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393539353269313144323442314343454446414543332f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="2021-12-10 15.15.46.png" alt="2021-12-10 15.15.46.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; Is there some other setting that will get me what I want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I wanted to write the code, could I use property nodes of the graph to resize it myself programmatically?&amp;nbsp; Can I query the size of the window?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4197757#M162</guid>
      <dc:creator>bhpowell</dc:creator>
      <dc:date>2021-12-10T21:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4199151#M171</link>
      <description>&lt;P&gt;Does leveraging the &lt;FONT face="courier new,courier"&gt;Minimum width&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Minimum height&lt;/FONT&gt; settings get close to the behavior you are looking for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="minwidth.PNG" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/25d86b31d3f6f1c43b2c65f2b3c4ea26dccb1642/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393632343169363946363938384630334444423746372f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="minwidth.PNG" alt="minwidth.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When used with &lt;FONT face="courier new,courier"&gt;Flexible resize: Resize height and width&lt;/FONT&gt;&amp;nbsp;the control scales down proportionally until the minimum is hit and it will continue to scale down the other axis as needed. You can control the vertical space that is kept by setting the &lt;FONT face="courier new,courier"&gt;Minimum height&lt;/FONT&gt; as desired:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="minwidth.gif" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/8213a7fd8a5956416aad8d67568cc5e0b5e6b462/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393632343269393331394133353339413944364244352f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="minwidth.gif" alt="minwidth.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I'd like the border around the plot area to be smaller&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I was able to shrink the padding in the control by adding styles like the following to the HTML Source editor and with some light testing it seems to work okay. The graph padding is not a property exposed in the editor so modify the padding with care and make sure to test that it does not interfere with features you are relying on. As with any style change to NI controls make sure to test it during version upgrades and be prepared to adjust it as needed. The standard disclaimer for editing a built-in style is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;If you modify the CSS to customize the appearance of controls, these modifications may not persist from release to release. If you modify the CSS from NI defaults, plan to test your code each time you upgrade to a new version of the G Web Development Software and make manual updates to your CSS styles if necessary.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;Style to set the padding on graphs and charts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;style&amp;gt;
  ni-cartesian-graph, ni-chart {
    padding: 5px;
  }
&amp;lt;/style&amp;gt;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before and after shrinking the padding:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paddingbefore.PNG" style="width: 401px;"&gt;&lt;img src="https://ip1.i.lithium.com/703476cc60ec5adec151237ed6937e1f0fa1bd92/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393632343369434432383033444533384237373733352f696d6167652d64696d656e73696f6e732f343031783231323f763d7632" width="401" height="212" role="button" title="paddingbefore.PNG" alt="paddingbefore.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paddingafter.PNG" style="width: 401px;"&gt;&lt;img src="https://ip1.i.lithium.com/4a6a6de1e49545938d7e2a5c5eda898cc007dc03/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32393632343469383145304535313236323033423243392f696d6167652d64696d656e73696f6e732f343031783231363f763d7632" width="401" height="216" role="button" title="paddingafter.PNG" alt="paddingafter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;could I use property nodes of the graph to resize it myself programmatically?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In flexible layout mode the browser is responsible for layout and sizing of controls based on the layout configuration made in the editor. Attempting to set the size of a control in a flexible container via a property node results in the following runtime error:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Size cannot be used for controls contained in a flex container.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 02:26:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4199151#M171</guid>
      <dc:creator>MilanR</dc:creator>
      <dc:date>2021-12-17T02:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4199307#M173</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;I think the minimum width/height will work well enough.&amp;nbsp; I'll need to experiment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question about the HTML source editor.&amp;nbsp; I haven't used it, or even read about it, so the answer might be in the documentation.&amp;nbsp; But while I have you here, are these assumptions correct?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The changes I make (such as the padding on the ni-cartesian-graph style) are persisted with my source code.&lt;/LI&gt;
&lt;LI&gt;The danger of them not working in the future is from NI changing something about the graph--for example, if you renamed ni-cartesian-graph to ni-xy-graph.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 16:20:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4199307#M173</guid>
      <dc:creator>bhpowell</dc:creator>
      <dc:date>2021-12-17T16:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4203356#M187</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;The changes I make (such as the padding on the ni-cartesian-graph style) are persisted with my source code.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Yes as long as you don't mess around with the auto generated code sections (they are marked with comments). I personally use the HTML editor to add custom CSS styles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The danger of them not working in the future is from NI changing something about the graph--for example, if you renamed ni-cartesian-graph to ni-xy-graph.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, there is a paragraph in the documentation that explicitly warns about this. After an update of the G Web Development Software you should check your projects thoroughly if they still behave and look like before.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 07:57:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4203356#M187</guid>
      <dc:creator>Jens_S</dc:creator>
      <dc:date>2022-01-12T07:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252367#M341</link>
      <description>&lt;P&gt;I must be too tired but I can't find the Flexible Resize option, was it moved from the Layout section?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yura_beno_0-1661844421112.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/2e896a767e5cf6fa80ad20aacefe83277d4d63f6/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303734333769314134373338304233364334323243312f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="yura_beno_0-1661844421112.png" alt="yura_beno_0-1661844421112.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the same topic, any idea why resizing Tank works as expected, but resizing Slider doesn't?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yura_beno_1-1661844519862.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/5ba2cee5e6a9519cc2c5cc449786c546a199e89d/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303734333869323042364144363442434441314646452f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="yura_beno_1-1661844519862.png" alt="yura_beno_1-1661844519862.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 07:29:11 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252367#M341</guid>
      <dc:creator>yura_beno</dc:creator>
      <dc:date>2022-08-30T07:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252454#M342</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/318139"&gt;@yura_beno&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I must be too tired but I can't find the Flexible Resize option, was it moved from the Layout section?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yura_beno_0-1661844421112.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/2e896a767e5cf6fa80ad20aacefe83277d4d63f6/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303734333769314134373338304233364334323243312f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="yura_beno_0-1661844421112.png" alt="yura_beno_0-1661844421112.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In order to configure flexible layout settings for a control it needs to be in a flexible layout container, i.e. either the whole panel itself must be configured for flexible layout or one of the tab frames in a tab control. The&amp;nbsp;&lt;A href="https://www.ni.com/docs/en-US/bundle/g-web-development-2022-q3/page/designing-flex-ui.html" target="_self"&gt;Designing a Responsive User Interface&lt;/A&gt; topic describes how to configure flexible layout for a panel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 15:16:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252454#M342</guid>
      <dc:creator>MilanR</dc:creator>
      <dc:date>2022-08-30T15:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252638#M344</link>
      <description>&lt;P&gt;Thank you so much, that worked! While I have your attention, how do I scale text and numbers (graph axe labels) that seem to stay the same size&amp;nbsp;&lt;A href="http://bionichaos.com/IEEG_2.html" target="_blank"&gt;http://bionichaos.com/IEEG_2.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yura_beno_0-1661950359676.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/e0729b85c9fc35096867ad46b329670c145bc608/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303734383069323536334445454446313132314242442f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="yura_beno_0-1661950359676.png" alt="yura_beno_0-1661950359676.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also, the resolution of the chart trace seem to be very low, especially at certain window size. Can it be improved? I'm testing in Edge mostly and Chrome a bit..&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 12:55:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252638#M344</guid>
      <dc:creator>yura_beno</dc:creator>
      <dc:date>2022-08-31T12:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Making graph more responsive to screen size?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252653#M345</link>
      <description>&lt;P&gt;Resizing text for different resolutions and scaling is done by the browser. There is most likely a way to do it with CSS but I don't really understand why you want to do this by yourself.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What I do is to make sure that the elements on my webpage are sized and located "properly" so zooming in and out in the browser (using resizeable panel) does not mess around to much with the elements. Zooming in and out in a browser windows is something very natural and does work very well for 95% of my use cases.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 13:31:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Making-graph-more-responsive-to-screen-size/m-p/4252653#M345</guid>
      <dc:creator>Jens_S</dc:creator>
      <dc:date>2022-08-31T13:31:54Z</dc:date>
    </item>
  </channel>
</rss>

