8 ms·
Hello HN, I’m Robbert, the creator of DataGridXL.js. DataGridXL is a free (and commercial) editable data table library written in ES6. My goal is to develop
by robbiejs 6y ago
Hello HN,
I’m Robbert, the creator of DataGridXL.js.
DataGridXL is a free (and commercial) editable data table library written in ES6.
My goal is to develop the most performant & user-friendly spreadsheet-like data table out there:
- It has zero dependencies. You don’t need any framework to use DataGridXL.
- It is lightweight (~200kb) and easy to use. It does not even require messing with CSS.
- It has its own Virtual DOM implementation to prevent DOM errors.
- Developer friendly. Supports all modern web browsers
Please take a look at the performance demo (https://www.datagridxl.com/demos/one-million-cells https://www.datagridxl.com/demos/one-million-cells) to see the difference with other data grids out there. And let us know if you have any suggestions.
Please let me know if you have any suggestions or comments!
- pulposus 6y agoI'm not sure if this is just me, but the demos all fail because they try to load https://code.datagridxl.com/datagridxl.js https://code.datagridxl.com/datagridxl.js and it's returning a 404.
- robbiejs 6y agoNot sure why that's happening. Is it still like that for you? What browser/OS?
- mkl 6y agoThat title flashing "1 new message" nonsense is incredibly distracting. Is there a UI way to quickly sort by a column?
- MuffinFlavored 6y agosorting + filtering would be awesome too
- robbiejs 6y agoThanks for your suggestions. Sorting will be implemented very soon, perhaps this week. I haven't really thought of filtering yet, but it's very likely that one day we'll introduce a filter-option. However, at this moment I cannot say when.
- robbiejs 6y agoHi, I've just released a new version that adds a Sort Feature to the grid: https://www.datagridxl.com/demos/sorting-columns https://www.datagridxl.com/demos/sorting-columns.
- robbiejs 6y agoHi. Agree with the flashing message, I haven't found a way to turn it off yet. I am actually working on a sort feature at this moment and I expect to release at the end of the week.
- robbiejs 6y agoHi mki, I've just released a new version that adds a Sort Feature to the grid: https://www.datagridxl.com/demos/sorting-columns https://www.datagridxl.com/demos/sorting-columns.
- m1sta_ 6y agoAn example using formulas (as javascript lambda functions) would be cool.
- robbiejs 6y agoHi, DGXL does not support formulas at this time and I am not sure if I will implement the feature. I'll let it depend on popular demand. There are a few products out there that implement formulas. A site like www.jspreadsheets.com mentions a few. Many of these products are not super-reliable or performant though (reason why I started building DGXL in the first place).
- pugio 6y agoI have been looking for years for something to replace a custom rendered excel-like table I have. The table has a complex layout: - One fixed top row (date), two or three fixed columns on the left. - Data are rendered horizontally; the number of rows does not change, but the number of columns can be in the hundreds. Does your library support column-oriented data like this (you mention "60+" columns)? Does anyone know of any library which can easily render something like this? It's surprisingly hard to find something which lets you fix left hand columns and also render as many columns as I need.
- prionassembly 6y agoAh, finance.
- rowsncolumns 6y agoYou could take a look at https://rowsncolumns.app https://rowsncolumns.app , You can render as many columns as you want since the grid supports windowing.
- robbiejs 6y agoHi, The component actually did have fixed/frozen columns/rows in an earlier version, but I decided to leave out the feature for a v1. I plan to reintroduce it after more popular features have been implemented. DGXL is able to handle hundreds of columns. The reason why it says 60+ specifically is that, according to browser-vendors like Mozilla, a DOM node should ideally not have more than 60 child nodes - for performance/memory reasons.
- infinite8s 6y agoAre columns virtualized as well? That could get over the child node restrictions for performance.
- robbiejs 6y agoYes. Let's say your data grid has 200 columns, but only 10 columns (DOM nodes) are rendered in the viewport. The other 190 columns are cached. When scrolling horizontally, column nodes are appended/preprended on-the-fly. The old ones are only removed if the scrolling stops (until that time, column nodes that are outside the viewport are just made invisible by setting their opacity to 0). If a user scrolls really fast without stopping in between, they might have 200 column nodes in the DOM. The DOM nodes are then only removed when scrolling stops. Performance wise I haven't seen any problems with 200 columns or more.
- TAForObvReasons 6y agoCongratulations on launching, but consider distilling a part of the project and making it available under a free and open source license like MIT or Apache or BSD. There are many commercial and open source products on the market, some more established and less expensive than your offering. From the business standpoint, it's easy to sell something like ag-grid because many developers have experience with its open source offering, so we know that we can find experienced people on the market to help if necessary. Your project doesn't benefit from that community and doesn't benefit from having a lower price point (it's comparable to what ag-grid charges)
- beojan 6y agoI expect he may be averse to choosing a permissive license like the ones you mention, but perhaps AGPL?
- sgarrity 6y agoHow did you implement the scrolling such that it feels smooth/fast/native, but scrolls in one row/column steps (so you never see half a row)? CSS Scroll Snap? Nicely done.
- macNchz 6y agoThat’s an interesting case because it’s certainly a cool effect, but it’s kind of a cumbersome UX on mobile. It makes it hard to keep track of the columns as you scroll up and down. At a glance it seems like both the Google Sheets and Numbers iOS apps have smooth scrolling instead of snapping.
- robbiejs 6y agoYou're absolutely right (see comment above). I initially created scroll snap to replicate desktop version of Excel & G. Sheets behavior. I agree that it is not the best option for smaller viewports/touch. It's on my todo-list to introduce smooth-scrolling as well, so that scrolling DGXL on touch will work closer to native apps.
- tobr 6y agoIs this considered a feature? I thought it was a limitation to deal with performance. I find it rather disorienting.
- robbiejs 6y agoTrue, scroll snap does have some performance benefits: fewer moments to update the DOM. You're probably browsing the site on your phone, am I correct? I created scroll snap to replicate desktop version of Excel & G. Sheets behavior. I agree that it is not the best option for smaller viewports/touch. It's on my todo-list to introduce smooth-scrolling as well.
- robbiejs 6y agoThanks! I'd to write a proper "How It's Made" article about it in the future, but this is basically how it's done: There is a blank DOM node "scrollArea" in front of all others that catches the native JS scroll event. It then converts these scroll offsets (scrollTop and scrollLeft) to cell/viewport coordinates, by default 40px actual pixels per row/column. So if the scrollArea has a scrollLeft of 40px and a scrollTop of 200px , an underlying DOM node that renders the cell values and column lines, will render at viewport position {x: 1, y: 5}. The other important part that makes it snappy, is that a viewport of let's say 20 rows by 10 columns does not actually consist of 200 DOM nodes. Only columns are DOM nodes. The values inside a column are made to look like rows by CSS white-space property. So it only updates 10 DOM nodes when scrolling.
- lukeholder 6y agoVote for simple formulas like sum etc.
- robbiejs 6y agoMaybe one day, but no promises. I did experiment with formulas in an earlier version, and it was promising, but there's a lot of things that need to be exactly right. Also, I need to draw a line somewhere. I cannot turn the product into a spreadsheet, as I have chosen for performance as my main feature, which means it cannot do things like merged rows, merged columns, etc. So if I'd implement formulas, people might expect more & more features, which I then cannot deliver... (There are products out there that have basic formula support.)
- programmertote 6y agoHi Robert, This looks like a really great (clean and performant) JS library for interacting with data grid. I'll definitely remember to try it for my next side project. A quick question: is there a way to make only some of the columns read-only in the grid? I looked through the doc [https://www.datagridxl.com/docs/setting-options https://www.datagridxl.com/docs/setting-options] and it seems like user actions for columns are all (applied to every column) or none. If DataGridXL.js allows assigning read-only to a subset of columns, it'd be great to add that in the doc with an example. Thanks for your hard work and especially for allowing others like me to try it for free!
- robbiejs 6y agoHi, Thanks for your feedback! Right now there is no such option, but it's definitely on the todos of 2020. At this moment there are not many individual column options: the goal is to implement validation, formatting, read-only prop, etc. At this moment every column just displays raw values & everything's editable.
- programmertote 6y agoThank you for the reply, Robert! I have bookmarked the site and will be recommending my friends to try out Datagridxl.js in their projects. :)
- robbiejs 6y agoThanks, appreciate it very much!
- gravypod 6y agoCongrats on launching! This seems like a great product! I have seen use cases where something like this could come very in handy. I don't know if this is useful but I'd be worried about using this library because: the difficult to adhere to pricing scheme, the high cost for the level of market saturation, and lack of quality support. Since you're building a library, not a tool, whenever I hire an engineer they'll automatically be using this tool and I'd need to remember to send you more money. The only other products that I have to do this with are either: 1. Monthly subscriptions that automatically charge me the correct amount of money. 2. GitLab which tracks how much I owe the developer and charges me the correct amount of money the next time around. I'm concerned that I'll pay for this software, download a .js file, check it into my repo, hire a new developer, and completely forget they're using this product. The biggest difference between this tool and my currently paid-for software is that it has no "check-in" period. I could very easily imagine a scenario in which I violate your license. Here are two: 1. I, as an engineer on a single project in a large company, buy your software and use it in a product. I move on to other stuff and get asked to write new features after a long time completely forgetting your software was paid-for. Me and another engineer start working on the project. We now have 2 devs. 2. Another engineer sees me building a cool project. They copy my frontend as a starter for another feature. We now have 2 devs in a multiproject license. 3. We have the correct multi project license for the correct number of devs but we want to hire some contractors for some cheap work. Hiring these contractors just became a lot more expensive. As for the pricing, at 54,100 EUR ($62,444.87 USD) for a 50 person team, you're competing with a sizable chunk of an engineers salary. Depending on what part of the world you're in you can pay for 1 quarter to 1 years worth of an engineers time with this chunk of change. It seems you're setting yourself aside from the competition because of performance reasons. If that is the large differentiated factor I'd be thinking the following as an engineering manager: 1. Given the timeline (3 months to 1 year) can I build my own implementation of this product? 2. Given the timeline can I take an open source implementation that has more features, use it until there's a performance problem, then have one of my 10x engineers tweak it to make it perform better? 3. Can I find another paid-for version of this library that will be cheaper? In this very HN post there's another implementation of a similar product with a seemingly similar feature set that is substantially cheaper [0] that is also source available. So, when I'm crunching the numbers, and have to choose to Build, Tweak, or Buy at a cheaper price, it's hard to justify this product. What makes it even harder to justify the product is the support limitations. The main reason to never choose build or tweak or "buy the cheaper one" is because it won't save you any time. Your support page makes it seem like, however, I'll have to put a lot of time and effort into bending over backwards to make a support request that fits your model. This makes the comparison: 1. Build XYZ and support it 2. Tweak XYZ and support it internally 3. Buy your software and get very non-specific support [0] - https://rowsncolumns.app/pricing https://rowsncolumns.app/pricing
- koheripbal 6y agoWhen it comes to reporting, I always get asked if I can have grouped rows that can be expanded/collapsed - it's such a frequent request. Is that possible in your framework?
- robbiejs 6y agoHi, that's not possible, sorry. DGXL is mainly meant to be an editable input component, it's not a data table for presentation purposes. Also see Features & Limits page: https://www.datagridxl.com/docs/features-limits https://www.datagridxl.com/docs/features-limits.