web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Charts in pages using ...
Power Pages
Answered

Charts in pages using table forms not displaying

(1) ShareShare
ReportReport
Posted on by 28

I have setup a chart via a subgrid in a table form:

 

smd246_0-1677736031056.png

 

However, when I display the form via a page, the page will display a table rather than the chart. 

 

smd246_1-1677736141406.png

 

I have been unable to display a chart in a power pages page via a table form. Any suggestions on what I can check?

 

Or should I give up on this feature and use PowerBI?


 

 

Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @smd246 ,

    You cannot enable charts for the subgrid on the form. You can do it only via liquid - see documentation here. You can also find some custom Code Components for chartings for datasets as they are now supported on the Power Pages as well.

  • smd246 Profile Picture
    28 on at

    Thank you @OOlashyn . I wonder why Microsoft even has a "Show chart only" option if you can't use it. It's a pity because with the "Show related records" option it would be a real nice feature.

     

    But I appreciate you letting me know.

    Digging into the liquid/fetchxml now. 

  • Fubar Profile Picture
    17 Super User 2026 Season 1 on at

    @smd246 wrote:

    I wonder why Microsoft even has a "Show chart only" option if you can't use it.

     


    The Portal/Power Pages makes use of Dataverse's Table Forms, and it is a Dataverse Form setting for Model Driven Apps (the setting existed before Model Driven Apps was a concept), but the Portal does not support that setting.

  • Verified answer
    smd246 Profile Picture
    28 on at

    For my case, I needed to filter the table result, in a similar way to the "Show related records" options.

    To do this I manually imported highcharts:
     

    <script src="https://code.highcharts.com/highcharts.js"></script>
    <script src="https://code.highcharts.com/modules/data.js"></script>
    <script src="https://code.highcharts.com/modules/exporting.js"></script>
    <script src="https://code.highcharts.com/modules/accessibility.js"></script>

     

    Then used the request "id" param, which would come from my list view/edit link to filter on my portfolio field using liquid and fetchxml:

    {% assign portfolioId = request.params['id'] | escape %}
    {% fetchxml portfolioData %}
    <fetch mapping="logical" distinct="true" aggregate="true">
    	<entity name="portfoliodata">
    		<attribute name="assetclass" alias="assetclass" groupby="true"/>
    		<attribute name="value" alias="weight" aggregate="sum" />
    		<filter>
    			<condition attribute="portfolio" operator="eq" value="{{ portfolioId }}" />
    		</filter>
    	</entity>
    </fetch>
    {% endfetchxml %}

     

    With the data in place I could build my dashboard within my power pages page by adding the following to the html/javascript code.


    <div data-component-theme="portalThemeColor7" class="row sectionBlockLayout text-left" style="display: flex; flex-wrap: wrap; margin: 0px; min-height: auto; padding: 8px;">
     <div class="container" style="padding: 0px; display: flex; flex-wrap: wrap;">
     <div class="col-md-6 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 300px; color:#000000;">
     <table id="tblPortfolioData" style="margin-right: 50px">
     <tr>
     <th max-width="50px">Asset Class</th>
     <th style="text-align: right">Weight</th>
     </tr>
     </table>
     </div>
     <div class="col-md-6 columnBlockLayout" style="flex-grow: 1; display: flex; flex-direction: column; min-width: 300px;">
     <figure class="highcharts-figure">
     <div id="container"></div>
     </figure>
     <script>
     var values = [
     {% for item in portfolioData.results.entities %}
     {
     name: '{{ item.assetclass }}',
     y: {{ item.weight }}
     },
     {% endfor %}
     ]
    
     var table = document.getElementById('tblPortfolioData');
     $.each(values, function (key, val) {
     var row = table.insertRow();
     var cellAssetClass = row.insertCell(0);
     cellAssetClass.innerHTML = val.name;
    
     var cellWeight = row.insertCell(1);
     cellWeight.innerHTML = (val.y * 100.0).toFixed(2) + '%';
     cellWeight.style.textAlign = 'right';
     }); 
    
     Highcharts.chart('container', {
     chart: {
     plotBackgroundColor: null,
     plotBorderWidth: null,
     plotShadow: false,
     type: 'pie'
     },
     title: {
     text: null
     },
     tooltip: {
     pointFormat: '{point.percentage:.1f}%'
     }, 
     series: [{
     name: 'Weight',
     colorByPoint: true,
     data: values
     }]
     }); 
     </script>
     </div>
     </div>
    </div>

    It not quite as simple as a no-code based solution, but at least now I have good control over chart formatting, etc.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 47 Super User 2026 Season 1

#2
Mohsin Ali Profile Picture

Mohsin Ali 25

#3
SP2019admin Profile Picture

SP2019admin 20

Last 30 days Overall leaderboard