redherring917
Posts: 21
Joined: Tue Sep 10, 2024 8:32 pm

DataGrid Styling

Hi there. I'm wondering what the possible options are for styling the contents of a DataGrid component? Things like:

- left/center/right alignment of content in a column
- width of columns
- color of text
- hyperlinking of content
- perhaps excluding a header row entirely

Assuming that some of this type of styling is possible, it would be great to see an example that uses a connector to pull data for the DataGrid. As I've mentioned in another post (different question), I need to use connectors to populate our components' data, but in so doing I seem to be struggling with the setting of certain component options. Clearly it's just ignorance on my part, but in these early stages of working with Highcharts I find myself unable to replicate some of the component option-related functionality that I find in examples as most of the examples by far do not use connectors and that seems to make things just different enough that I'm struggling to get some of these "option" details sorted out.

I'll include snapshots of some relevant code that I'm currently using to try to make sure I'm not doing something horribly and obviously wrong :)

Thanks again!
Attachments
2024-09-19_14-02-40.png
2024-09-19_14-02-40.png (129.16 KiB) Viewed 1370 times
User avatar
dawid.d
Site Moderator
Posts: 1119
Joined: Thu Oct 06, 2022 11:31 am

Re: DataGrid Styling

Hi again,

Thanks for the question!

We are very close to releasing Dashboards v3.0, which will include a completely rebuilt DataGrid, with its API also changing, so all of this might soon become outdated (it’s already on the master branch, you can test it here: https://github.com/highcharts/highchart ... s/DataGrid). However, in response to these questions, I have prepared a demo showing how to solve them.

Demo: https://jsfiddle.net/BlackLabel/fdo3L7ay/

Also, take a look at the CSS. As for setting the width of individual columns, this will only be introduced in Dashboards v3.0.0, soon.

Best regards!
Dawid Draguła
Highcharts Developer
timhighcharts
Posts: 5
Joined: Mon Sep 16, 2024 9:22 pm

Re: DataGrid Styling

I just came here to post my surprise and frustration at how limited the DataGrid is so glad to see a major update is coming.

I've had a quick look through the code of v3 and it is looking pretty good.

When do you expect to release?
User avatar
dawid.d
Site Moderator
Posts: 1119
Joined: Thu Oct 06, 2022 11:31 am

Re: DataGrid Styling

Hi,

We don't have an exact date set because we still want to test everything thoroughly and if anything comes up, we want to fix it before release, but the loose plan is the beginning of October.

Regards
Dawid Draguła
Highcharts Developer

Return to “Highcharts Dashboards”