jQWidgets Forums
jQuery UI Widgets › Forums › Angular › PivotGrid
Tagged: angular pivot grid, pivot grid
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 7 years, 6 months ago.
-
AuthorPivotGrid Posts
-
Upon additional testing, I found a number of API settings not available on the Angular version of PivotGrid (i.e., theme, width etc.).
Not sure if these are planned or not available with this release level.
Thanks,
GaryHi Gary,
The pivot grid width and height are set through CSS Style settings as the Chart.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/Hello, Peter,
I might not have been clear about width setting. I wanted to put on the dataField and adjust for the chart. Please see the below.
When execute I get an adjustment for only the second width. However, the first width statement does not affect anything.
const pivotDataSource = new jqx.pivot(
dataAdapter,
{
pivotValuesOnRows: false,
totals: {
rows: {subtotals: true, grandtotals: true},
columns: {subtotals: false, grandtotals: false}
},
rows: [
{dataField: ‘Precinct’, width: 300}, <==== This has no affacts.
{dataField: ‘Candidate’, width: 175} <==== This works.
],
columns: [{dataField: ‘Office’}],
values: [
{dataField: ‘VotesPolling’, ‘function’: ‘sum’, text: ‘Polling’, align: ‘right’},
{dataField: ‘VotesEarly’, ‘function’: ‘sum’, text: ‘Early’, align: ‘right’},
{dataField: ‘VotesProvisional’, ‘function’: ‘sum’, text: ‘Provisional’, align: ‘right’},
{dataField: ‘VotesTotal’, ‘function’: ‘sum’, text: ‘Total’, align: ‘right’}
]
}
);Hi Gary,
That happens because of the initial auto-resize during the data binding. After the Pivot grid is data bound, you can use the setColumnWidth method. Something like that:
pivotGridInstance.getPivotRows().setColumnWidth(0, 200); pivotGridInstance.getPivotRows().setColumnWidth(1, 200);
Regards,
PeterHello, Peter,
I tried what you suggested and found that PivotGrid does not have method setColumnWidth available.
You using something that is in pre-release. If so not a problem for me. I can wait.
Thanks,
GaryHi Gary,
Actually, it does not have setColumnWidth, the Pivot Rows and Columns have. That is the reason I wrote in my code, getPivotRows().setColumnWidth…
Regards,
Peter -
AuthorPosts
You must be logged in to reply to this topic.