jQWidgets Forums

jQuery UI Widgets Forums Angular PivotGrid

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 7 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    PivotGrid Posts
  • PivotGrid #96432

    Gary
    Participant

    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,
    Gary

    PivotGrid #96442

    Peter Stoev
    Keymaster

    Hi Gary,

    The pivot grid width and height are set through CSS Style settings as the Chart.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

    PivotGrid #96467

    Gary
    Participant

    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’}
    ]
    }
    );

    PivotGrid #96470

    Peter Stoev
    Keymaster

    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,
    Peter

    PivotGrid #96471

    Gary
    Participant

    Hello, 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,
    Gary

    PivotGrid #96472

    Peter Stoev
    Keymaster

    Hi 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

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.