All Projects → ashubham → highcharts-webcomponent

ashubham / highcharts-webcomponent

Licence: MIT license
Highcharts Web Component usable with any Framework

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to highcharts-webcomponent

lit-components
Moved to https://github.com/vaadin/component-mixins
Stars: ✭ 59 (+180.95%)
Mutual labels:  webcomponents, custom-elements, lit-html, lit-element
pattern-library
AXA CH UI component library. Please share, comment, create issues and work with us!
Stars: ✭ 103 (+390.48%)
Mutual labels:  webcomponents, custom-elements, lit-html, lit-element
polymerx-cli
⚡ Unlock the power of Polymer 3, Web Components and modern web tools.
Stars: ✭ 30 (+42.86%)
Mutual labels:  webcomponents, lit-html, lit-element
create-evergreen-app
Get up and running with an evergreen web application development stack designed by, and for, today's modern web.
Stars: ✭ 16 (-23.81%)
Mutual labels:  webcomponents, lit-html, lit-element
bui
‹b› Web components for creating applications – built by Blackstone Publishing using lit-html and lit-element
Stars: ✭ 29 (+38.1%)
Mutual labels:  custom-elements, lit-html, lit-element
Wired Elements
Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
Stars: ✭ 8,848 (+42033.33%)
Mutual labels:  webcomponents, lit-html, lit-element
rollup-plugin-lit-css
Moved to https://github.com/bennypowers/lit-css
Stars: ✭ 35 (+66.67%)
Mutual labels:  webcomponents, lit-html, lit-element
MoleculeJS
A library for creating fast and reactive Custom Elements
Stars: ✭ 39 (+85.71%)
Mutual labels:  webcomponents, custom-elements, lit-html
api-viewer-element
API documentation and live playground for Web Components. Based on Custom Elements Manifest format
Stars: ✭ 222 (+957.14%)
Mutual labels:  webcomponents, custom-elements, lit-element
redux-connect-element
Redux HTMLElement Connector
Stars: ✭ 16 (-23.81%)
Mutual labels:  webcomponents, lit-html, lit-element
lazy-image
Lazily load your images with <lazy-image> custom element
Stars: ✭ 42 (+100%)
Mutual labels:  webcomponents, custom-elements
crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (+4.76%)
Mutual labels:  webcomponents, custom-elements
symbiote.js
Simple, light and very powerful library to create embedded components for any purpose, with a data flow management included.
Stars: ✭ 40 (+90.48%)
Mutual labels:  webcomponents, custom-elements
notification-service-js
🚦Notification Service based on Custom Elements
Stars: ✭ 16 (-23.81%)
Mutual labels:  webcomponents, custom-elements
modulor-html
Missing template engine for Web Components
Stars: ✭ 36 (+71.43%)
Mutual labels:  webcomponents, custom-elements
bce.design
minimal magic, minimal tooling, essential dependencies, high productivity, no transpilations and no migrations. The Web Components starter ships with integrated lit-html, redux-toolkit and vaadin router components.
Stars: ✭ 67 (+219.05%)
Mutual labels:  webcomponents, lit-html
lego
🚀 Web-components made lightweight & Future-Proof.
Stars: ✭ 69 (+228.57%)
Mutual labels:  webcomponents, custom-elements
paper-chip
A chip web component made with Polymer 2 following Material Design guidelines
Stars: ✭ 30 (+42.86%)
Mutual labels:  webcomponents, custom-elements
lit-state
Simple shared app state management for LitElement.
Stars: ✭ 93 (+342.86%)
Mutual labels:  lit-html, lit-element
chartjs-web-components
the web components for chartjs
Stars: ✭ 50 (+138.1%)
Mutual labels:  webcomponents, lit-element

Highcharts WebComponent highcharts-wc

npm version

Highcharts WebComponent wrapper.

  • Usable with any Framework.
  • Or without any.

Installing

npm install highcharts-webcomponent

If Highcharts is not already installed, get the package with Highcharts:

npm install highcharts highcharts-webcomponent

Demo

Live Example: https://webcomponents.dev/edit/ObQbCXjw2znEukL93AU3

Using

Basic usage example

  1. Import into your project:
import 'highcharts-webcomponent';

OR

<script type="module" src="node_modules/highcharts-webcomponent/build/highcharts-wc.js"></script>
  1. Start using it with any framework
const options = {
  title: {
    text: 'My chart'
  },
  series: [{
    data: [1, 2, 3]
  }]
}
  • LitHTML
html`
<highcharts-chart .options=${options} @load=${this.onChartLoad}>
</highcharts-chart>`
  • Vue
<highcharts-chart :options="options" @load="onChartLoad">
</highcharts-chart>
  • Angular
<highcharts-chart [options]="options" (load)="onChartLoad()">
</highcharts-chart>
  • React
render() {
    return (
        <highcharts-chart ref="chart"></highcharts-chart>
    );
}

// Notice that we added ref attributes for the component.
// This enables us to reference the components in the next step.

componentDidMount() {
    this.refs.chart.options = options;
    this.refs.chart.addEventListener('load', this.onChartLoad);
}
  • AngularJS
<highcharts-chart ng-prop-options="options" ng-on-load="onChartLoad">
</highcharts-chart>

Properties & Events

Properties

Property Attribute Type Default Description
allowChartUpdate allowChartUpdate boolean true This wrapper uses chart.update() method to apply new options
to the chart when changing the parent component.
This option allow to turn off the updating.
constructorType constructorType `'chart' 'stockChart' 'mapChart'
highcharts Used to pass the Highcharts instance after modules are initialized.
If not set the component will try to get the Highcharts from window.
immutable immutable boolean false Reinitialises the chart on prop update (as oppose to chart.update())
useful in some cases but slower than a regular update.
options Object required Highcharts chart configuration object.
Please refer to the Highcharts API documentation.
updateArgs [boolean, boolean, boolean] [true, true, true] Array of update()'s function optional arguments.
Parameters should be defined in the same order like in
native Highcharts function: [redraw, oneToOne, animation].
Here is a more specific description of the parameters.

Events

Event Description
load Event fired after the chart is created. The detail arg will hold the created chart

Copyright

  • The Highcharts logo is a property of Highsoft AS, Norway.
  • The Webcomponents logo is a property of Webcomponents.org
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].