npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-speedgrid

v0.2.4

Published

The Speedgrid is a lightning fast datagrid, made for a lot of data. Usually starting with some thousands of datarows, up to 1 million (or even more), based on browser memory.

Downloads

7

Readme

ngx-speedgrid

The Speedgrid is a lightning fast datagrid, made for a lot of data. Usually starting with some thousands of datarows, up to 1 million (or even more), based on browser memory.

I created this grid because i have seen a lot or projects with slow grids, in most cases not easy to handle by the user. There are several reasons for this.

  • Slow and stuttering grids. They do stuff a user requested some seconds ago and just confuse.
  • Too small data packages with fetching new data at the end of the scroll limit. It's simply not working, users don't know how many data is coming, and every small scroll action leads to loading more small packages, resulting in a lot of waiting.
  • Paging. I think it's deprecated, since current systems / browser / server / bandwidth are able to do a lot more.

Usually, for UX reasons, grids should not even exist anymore. But reality is different, nearly every project still needs them. But why not load a lot of data, ready to be scrolled without waiting after the initial load. Some components use virtualization to display a lot of data. That works well too. But still, it is not possible to beat the performance of a canvas component.

For more detailed information, visit our blog: https://shipbit.de/blog/speedgrid-high-performance-canvas-component/

Installation

npm install ngx-speedgrid

Dependencies

The Speedgrid is a canvas based component. It uses my angular-canvas-base to handle the rendering. You can find more infos about that here: https://github.com/okuechen/angular-canvas-base

Documentation

You can find the documentation here: https://wolfamongsheep.de/speedgrid/index.html

Features

I tried to add all necessary features to this component. There is a limit though, since the base is a canvas, you cannot add dom elements to it. So putting other components into cells is not possible. But too much content in cells is not the scenario i had in mind for this grid anyways. It's all about performance and a good user experience here.

Current features

  • Speed: Scrolling and working with the grid like you would in a game. 60 FPS is always the target.
  • Theming: Use default themes or simply create your own themes.
  • Easy configuration and extending. Create new renderer for cells, use pipes for values.
  • Full row or single cell hovering defined in theme.
  • Full row or single cell selection.
  • Responsive if you want. Put it into a flex environment or css grid, it will follow your rules.
  • Column resizing / ordering.

What is planned for the future?

That is depending on requests and my own needs for now :D. But on my list, those topics are next:

  • Column drag & drop
  • Edit mode
  • Column Groups

Live Demo

Visit https://wolfamongsheep.de/speedgrid/demo/index.html for a live demo. Environment is a simple .Net Core backend, using a mariaDB to fetch and sort 10k datarows, which are all drawn by the two grids. All names are randomly generated by a script.

Simple example

    <ngx-speedgrid
        style="width: 100%; height: 500px;"
        [columns]=" columns "
        [data]=" entities "
        (clicked)=" speedgridClicked($event) "
        (selectedCellsChanged)=" selectedCellsChanged($event) "
        (orderByChanged)=" orderByChanged($event) "
    ></ngx-speedgrid>
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {

    public columns: SpeedgridColumn<YourEntity>[] = [
        {
            width: 100,
            property: 'numberField',
            bodyCellRenderer: new SpeedgridBodyCellRendererNumber(),
            label: 'Number'
        },
        {
            width: 250,
            property: 'id',
            label: 'Guid'
        },
        {
            width: 350,
            property: 'textField',
            label: 'Text'
        },
        {
            width: 100,
            property: 'dateField',
            bodyCellRenderer: new SpeedgridBodyCellRendererString(new DatePipe('en-US')),
            label: 'Date'
        },
        {
            width: 70,
            property: 'imageField',
            bodyCellRenderer: new SpeedgridBodyCellRendererImage(this.imageStorageService, 16, 16),
            label: 'Image'
        },
        {
            width: 50,
            property: 'booleanField',
            bodyCellRenderer: new SpeedgridBodyCellRendererBoolean(),
            label: 'Bool'
        }
    ];

    public entities: SpeedgridEntity[] = [];

    constructor(private imageStorageService: SpeedgridImageStorageService) {}

    public ngOnInit(): void {
        // get your data somewhere and put it into this.entities;
    }

    public speedgridClicked(location: SpeedgridLocation): void {
        // handle click
    }

    public selectedCellsChanged(cells: Readonly<SpeedgridLocation[]>): void {
        // handle selection change
    }

    public orderByChanged(pairs: Readonly<SpeedgridOrderByPair[]>): void {
        // handle order by request
    }
}

History

  • Version 0.2.4: Update to Angular version 13.2.6
  • Version 0.2.0: Release Version.