Giter VIP home page Giter VIP logo

highcharts-assembler's Introduction

Highcharts JS is a JavaScript charting library based on SVG and some canvas/WebGL.

Highcharts is a source available product. Please refer to shop.highcharts.com for details on licensing.

Installing and using Highcharts

This is the working repo for Highcharts code. If you simply want to include Highcharts into a project, use the distribution package instead, or read the download page.

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.js"></script>

Install from npm

See npm documentation on how to get started with npm.

npm install --save highcharts

ES6 modules, AMD, CommonJS and others

For other ways to use Highcharts in your projects, please refer to our installation docs.

Create your own custom build of Highcharts

To reduce file size, or combine modules into one file to reduce latency, you may want to create your own build of the Highcharts modules. See Creating custom Highcharts files for more information.

Build and debug

If you want to do modifications to Highcharts or fix issues, you may build your own files. Highcharts uses Gulp as the build system. After npm install in the root folder, run gulp, which will set up a watch task for the JavaScript and CSS files. Now any changes in the files of the /js or /css folders will result in new files being built and saved in the code folder. Other tasks are also available, like gulp lint.

npm install
gulp

Node setup for Apple Mx CPU

When running Node natively on ARM64 MacOS, some Node packages like node-canvas with integrated compiling might fail. Install additional tools to resolve the problem:

  • Homebrew and run brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman

Generate API docs

Run in this highcharts repository the doc generator with npx gulp jsdoc-watch, which also starts a new server with the generated API documentation.

highcharts-assembler's People

Contributors

bre1470 avatar dependabot[bot] avatar goransle avatar jon-a-nygaard avatar oysteinmoseng avatar torsteinhonsi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

highcharts-assembler's Issues

Error while creating custom Highchart file

I am getting the below error when trying to run custom-builder

➜ node custom-builder.js
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at fs.readFileSync (fs.js:583:19)
    at getFile (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/utilities.js:61:26)
    at getOrderedDependencies (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:202:19)
    at imports.reduce (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:220:13)
    at Array.reduce (<anonymous>)
    at getOrderedDependencies (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:216:18)
    at compileFile (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:503:24)
    at getIndividualOptions.forEach (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/build.js:129:26)

Import keyword in comments gets replaced

// #2248, #4660
if (!alternateBands[pos]) {
  // Should be imported from PlotLineOrBand.js, but 
  // the import cycle with axis is a problem
  alternateBands[pos] = new H.PlotLineOrBand(axis);
}

becomes

// #2248, #4660
if (!alternateBands[pos]) {
  // Should be imported from PlotLineOrBand.js, but 
  // the                             alternateBands[pos] = new H.PlotLineOrBand(axis);
}

Move package name under @highcharts

As an internal development tool the package name should become @highcharts/highcharts-assembler to avoid conflicts with the NPM registry.

Vulnerabilities detected in assembler

When running 'gulp', I was recommended to reinstall the highcharts-assembler and got these messages

~/src/highcharts  pr-update-samples-for-website ✗                 9h58m ⚑
▶ npm install highcharts-assembler
+ [email protected]
updated 1 package and audited 4960 packages in 6.787s
found 27 vulnerabilities (15 low, 12 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Can someone update the packages?

Which file is part of each chart

'use strict';  
import Highcharts from '../parts/Globals.js';  
import '../parts/SvgRenderer.js';  
import '../parts/Chart.js';  
import '../parts/Series.js';  
import '../parts/Interaction.js';   
export default Highcharts;  

According to Readme on CREATE A CUSTOM MASTER FILE, it will build the line chart with interaction. But how do i know which parts are used? Is there any documentation about which part should i use for each chart and its functionality?

Assembler not working with highcharts 8.0.0

I am attempting to use the highcharts assembler to create a custom bundle. I have noticed it does not work when used as explained in the documents with the newly released version 8.0.0 of highcharts.

When following the example provided here: https://www.highcharts.com/docs/getting-started/how-to-create-custom-highcharts-files I get the following error:

TypeError: Cannot read property 'includes' of null
    at searchCapture (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:161:18)
    at getModuleName (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:226:5)
    at compileFile (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:565:18)
    at getIndividualOptions.forEach (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/build.js:179:20)
    at Array.forEach (<anonymous>)
    at build (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/build.js:178:8)
    at Object.<anonymous> (/home/andrew/Code/highcharts-master/custom-line-builder.js:7:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)

I was able to run my code successfully when downgrading to 7.2.1 , but my team would like to use 8.0.0

Get rid of dependency on js-beautify

js-beautify is used to correct indentation after the source code is bundlend together.
It slows down the build script quite a bit, and is a somewhat unnecessary dependency. Can be replaced with a simple "search and replace" functionality.

Modules dependency resolution

Currently we have no link specifying dependencies between distributed bundles. This means that our AMD patterns are incomplete, as it is not possible to require a single module and get all of its dependencies automatically. See highcharts/highcharts#8890

We propose a fix:

  • new tags in doclet in js/masters/: @module @requires
  • assembler has to lookup all @module names in js/masters which are referenced by @requires and can exclude dependent parts
  • extended define like define( _module_name_ , [ _requires_name_ ], () => {})
  • make sure that all @module names start with highcharts to be unique in users use cases
  • remove new tags from bundle result
  • change the UMD pattern so that factory gets an Highcharts property (in all conditional statements), that can be used like this import { Highcharts } from 'highcharts/modules/offline-exporting';

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.