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

@lowdefy/blocks-amcharts

v3.11.3

Published

Lowdefy blocks for AmCharts.

Downloads

2

Readme

Lowdefy Blocks for AmCharts

This repository provides blocks for AmCharts, a feature rich javascript charts amd maps library.

The implementation of these blocks is a minimal wrapper for the @amcharts/amcharts4 package. It creates charts using the am4core.createFromConfig() method which maps chart config settings directly to the AMChart library. This means you write normal AmChart config to create charts.

See the AmCharts docs for the chart settings API.

Blocks

AmChartsPie Example

Block URL: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsPie.json

name: my-app
lowdefy: 3.11.3
types:
  AmChartsXY:
    url: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsPie.json
pages:
  - id: dashboard
    type: PageHeaderMenu
    blocks:
      - id: my_chart
        type: AmChartsPie
        properties:
          height: 400 # The default height is 500px.
          data: # This will usually be data from a request, so use the  _request operator.
            - name: 'A'
              count: 10
            - name: 'B'
              count: 30
            - name: 'C'
              count: 60
            - name: 'D'
              count: 90
          series:
            - type: PieSeries
              dataFields:
                category: name
                value: count

AmChartsXY Example

Block URL: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsXY.json

name: my-app
lowdefy: 3.11.3
types:
  AmChartsXY:
    url: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsXY.json
pages:
  - id: dashboard
    type: PageHeaderMenu
    blocks:
      - id: my_chart
        type: AmChartsXY
        properties:
          data: # This will usually be data from a request, so use the _request operator.
            - name: 'A'
              count: 10
            - name: 'B'
              count: 30
            - name: 'C'
              count: 60
            - name: 'D'
              count: 90
          xAxes:
            - type: CategoryAxis
              dataFields:
                category: name
          yAxes:
            - type: ValueAxis
          series:
            - type: ColumnSeries
              dataFields:
                categoryX: name
                valueY: count
              columns:
                events:
                  hit: # EXPERIMENTAL: create a chart event listener which will trigger the onClick Lowdefy event when the chart column is clicked.
                    amcharts_event_listener:
                      name: onClick
                adapter:
                  fill: # Use the _function operator to change the column color based on the value.
                    _function:
                      __if:
                        test:
                          __lte:
                            - __args: '0.count'
                            - 50
                        then: '#F00'
                        else: '#0F0'
        events:
          onClick:
            - id: set_selected
              type: SetState
              params:
                selected: # Update 'selected' in state with the event data.
                  _event: true
      - id: selection
        type: Title
        properties:
          level: 4
          content:
            _if: # Show the event data in a title, or call to action.
              test:
                _eq:
                  - _state: selected
                  - null
              then: 'Click to select a column.'
              else:
                _string.concat:
                  - 'Selected: '
                  - _state: selected.name
                  - ', Value: '
                  - _state: selected.count

AmChartsTreeMap Example

Block URL: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsTreeMap.json

name: my-app
lowdefy: 3.11.3
types:
  AmChartsTreeMap:
    url: https://blocks-cdn.lowdefy.com/v3.11.3/blocks-amcharts/meta/AmChartsTreeMap.json
pages:
  - id: dashboard
    type: PageHeaderMenu
    blocks:
      - id: my_chart
        type: AmChartsTreeMap
        properties:
          height: 400 # The default height is 500px.
          data: # This will usually be data from a request, so use the  _request operator.
            - name: 'A'
              value: 10
            - name: 'B'
              value: 30
            - name: 'C'
              value: 60
            - name: 'D'
              value: 90
          dataFields:
            name: name
            value: value

Other Lowdefy Blocks Packages

More Lowdefy resources

  • Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-start
  • Lowdefy docs - https://docs.lowdefy.com
  • Lowdefy website - https://lowdefy.com
  • Community forum - https://github.com/lowdefy/lowdefy/discussions
  • Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues

Licence

Apache-2.0