GithubHelp home page GithubHelp logo

ashwanigarg / highcharts-dist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from highcharts/highcharts-dist

0.0 2.0 0.0 48.48 MB

Official shim repo for Highcharts releases

CSS 0.65% JavaScript 99.35%

highcharts-dist's Introduction

Highcharts is a JavaScript charting library based on SVG, with fallbacks to VML and canvas for old browsers. This package also contains Highstock, the financial charting package, and Highmaps for geo maps.

For NPM users, please note that this module replaces the previous Highcharts Server module.

Download and install Highcharts

Please note that there are several ways to use Highcharts. For general installation instructions, see the docs.

Use our CDN

Instead of downloading, you can use our CDN to access files directly. See code.highcharts.com for details.

<script src="https://code.highcharts.com/highcharts.src.js"></script>

Install from npm

See npm documentation on how to get started with npm.

npm install --save highcharts

Install from Bower

See Bower documentation on how to get started with Bower.

bower install highcharts

Load Highcharts as a CommonJS module

Highcharts is using an UMD module pattern, as a result it has support for CommonJS. The following examples presumes you are using npm to install Highcharts, see Download and install Highcharts for more details.

// Load Highcharts
var Highcharts = require('highcharts');
// Alternatively, this is how to load Highstock. Highmaps is similar.
// var Highcharts = require('highcharts/highstock');

// Load the exporting module, and initialize it.
require('highcharts/modules/exporting')(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});

Load Highcharts as an ES6 module

Since Highcharts supports CommonJS, it can be loaded as an ES6 module with the use of transpilers. Two common transpilers are Babel and TypeScript. These have different interpretations of a CommonJS module, which affects your syntax. The following examples presumes you are using npm to install Highcharts, see Download and install Highcharts for more details.

Babel

import Highcharts from 'highcharts';
// Alternatively, this is how to load Highstock. Highmaps is similar.
// import Highcharts from 'highcharts/highstock';

// Load the exporting module.
import Exporting from 'highcharts/modules/exporting';
// Initialize exporting module.
Exporting(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});

TypeScript

import * as Highcharts from 'highcharts';
// Alternatively, this is how to load Highstock. Highmaps is similar.
// import Highcharts from 'highcharts/highstock';

// Load the exporting module.
import * as Exporting from 'highcharts/modules/exporting';
// Initialize exporting module.
Exporting(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});

Styled mode vs classic

  • The files for classic mode are available on root. This is the regular mode where presentational attributes and styling is set in the options structure.
  • The JavaScript files for styled mode are available under the /js/ folder. In these files, most presentational code including options are removed, so without styling it will draw an ugly black-and-white chart if anything.
  • The default CSS file for styled mode is available as /css/highcharts.css. This CSS is in turn based on a SCSS file, /css/highcharts.scss.

highcharts-dist's People

Contributors

torsteinhonsi avatar jon-a-nygaard avatar artur- avatar

Watchers

James Cloos avatar Ashwani Garg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.