SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0
0

Hello.

The graph is automatically stretched in width. How to do the same in height?

Video

Version
1.0.1267
  • You must to post comments
0
0

Hi Roman

SciChart.js fills the div that you specify in your application when you run this code:

  // Html or TSX/JSX 
  <div id="some_unique_div_id"></div>


  // Javascript code
  const {sciChartSurface, wasmContext} = await SciChartSurface.create("some_unique_div_id");

The SciChartSurface always expands to fill the div, so all you need to do is to have some CSS or JavaScript to expand the div to fit available space.

Take a look at these StackOverflow questions:

Let me know if this helps,

Best regards,
Andrew

  • You must to post comments
0
0

enter image description here

enter image description here

enter image description here

Images
  • You must to post comments
0
0

Hi Roman

Update: Fixed in build 1.1.1346 or greater

This issue is fixed in build 1.1.1346 or greater which will be published soon. To get the SciChartSurface to fit full width / height of an application, you need the following markup.

<body style="margin: 0;">
    <div style="height: 100vh;">   
         <div id="scichart-root" style="width: 100%; height: 100%;"></div>
    </div>
 </body>

This results in a SciChartSurface stretching to fit the browser window.

Demo application code found here:

Best regards,
Andrew

enter image description here

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.