JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › Pivot/grouping + charting question
Tagged: pivot table
- This topic has 20 replies, 3 voices, and was last updated 1 year, 9 months ago by pkz.
-
AuthorPosts
-
January 27, 2023 at 12:27 pm #104312ivanpeevskiParticipant
HI pkz,
Please see the example here – codepen
As I mentioned in the previous reply, for most chart types, it is as simple as setting:
smartChart.seriesGroups[0].type = ‘column’ or = ‘line’…..Best regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/January 27, 2023 at 9:09 pm #104313pkzBlockedThanks! That solves all my questions for now!
January 27, 2023 at 10:37 pm #104317pkzBlockedSorry for the double post – minor problem: in your most recent code, the chart options for normal grid does not work – selection or just clicking it.
I comes up with a blank chart.
I have to use
grid.createChart('bar');
if it’s not a pivot to chart things properly for a grid – is this an issue?Also, even with using
grid.createChart('bar');
, I’m not able to select and plot for datasets that have 100+ columns and many rows. I don’t see any errors in the console also.Any tips?
EDIT: here is the large sample where I’m not able to get the charting for normal grid to work with your code: https://codepen.io/ttwer2/pen/ZEjxBzp
- This reply was modified 1 year, 9 months ago by pkz.
January 27, 2023 at 11:51 pm #104319pkzBlockedCan’t edit previous post, but more issues:
Code: https://codepen.io/ttwer2/pen/ZEjxBzp
1.
when switching between pivot and grid
ex: switch to pivot – so some charting, switch back to grid results in empty grid with the following error:
Grid: Invalid property name "allowRowGroup" set for Column: "col8" Uncaught Grid: Invalid property name "allowRowGroup" set for Column: "col8"
2. charts are cut off I need to scroll to see the other parts of the chart
3. everything in pivot is VERY laggy with only 10k rows of data (randomly generated – also part of the code)
- This reply was modified 1 year, 9 months ago by pkz.
January 30, 2023 at 1:29 pm #104322ivanpeevskiParticipantHi pkz,
I have answered the questions regarding the chart and the slow loading to your colleague at the support mail.
The chart is cut-off since it’s default width is 400px. You can set it to 100% or any other % value and it will scale inside the window. For example:
smart-chart{
width: 95%;
}smart-window{
width: 600px;
}For the second issue:
allowRowGroup is not a valid Grid column property. I think you are confusing it with ‘allowGroup’
You can find the full Grid API here – https://www.htmlelements.com/docs/grid-api/#toc-column
‘allowRowGroup’ only exists for PivotTable columns. Some of the properties of the grid and pivot columns are similar, but they are not identical
Best regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/January 30, 2023 at 3:04 pm #104324pkzBlockedHi,
Thanks for the chart-width suggestion.
Regarding the allowRowgroup for grid, how can I specify only certain rows to be allowed to be grouped?
-
AuthorPosts
- You must be logged in to reply to this topic.