Code Monkey home page Code Monkey logo

pattern-fill'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.

pattern-fill's People

Contributors

barbeque avatar binarytales avatar dbergey avatar jon-a-nygaard avatar sebastianbochan avatar torsteinhonsi avatar

Stargazers

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

Watchers

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

pattern-fill's Issues

Release as bower module

Hey there,

We manage our client side dependencies through bower (including Highcharts). Would be great to have this available on bower as well.

Thanks!

New changes are not backward compatible?!

The recent changes is breaking all of out production software. This is very bad for our reputation. You should not update your master link to a new version when it is not backward compatible, or at least create a versioned URL.. Is there any way for making this compatible with the previous version of highcharts quick? It would make it very hard for us to update all of our applications in time. We are getting a lot of complains about this. They see black background where it supposed to be the pattern.

zIndex issue with patterns

As of the current version, the patterns are plotted with a somewhat messy z-index, that covers up the tooltip crosshair.

I have altered the demo fiddle to show this: http://jsfiddle.net/z3jLqu2p/

Changing the tooltip crosshair zIndex makes it cover the markers, so it's not an acceptable work-arround

SVG file-based patterns not showing on Firefox (v57.0.3 / 64bit)

I use this plugin to insert 'hatched' patterns into bar chart series.
To do this, I used the defs property (with patterns), then use the SVG fragment identifier when setting the serie color, in order to select the pattern I want (exactly as described in your README).

But the fact is, it works perfectly on Chrome (v62.0.3202.94 / 64-bit) but not in Firefox on the given version.
By inspecting I see that the serie is present, but it is transparent (no pattern appears) so it seems that a serie is missing.

Do you already had this type of bug? How can I resolve it?

Thanks in advance.

Patterns do not appear sometimes

Hi,
I am using Highstock JS v5.0.10 and the pattern plugin to render custom color patterns.
I have a logic to create an array of patterns in the below format with a variable color and latter map it's id to the color of the series(as shown in the examples)

          var pattern = {
                    'id': "#CCCCCC1",
                    'path': {
                        d: 'M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9',
                        stroke: "white",
                        strokeWidth: 2,
                        fill: "#CCCCCC",
                        fillOpacity: 0.7
                    }
                }

I am facing a weird behavior wherein the bars are filled with pattern at times and sometimes the code goes missing. I was unable to track a pattern for this problem. What I doubt is the server that I have deployed on is unable to load the url's of the patterns sometimes. Can you please help if you have face similar issues or is there something wrong I would be doing in the code.

Blurry and offset pattern in print

Hey

First of all thanks for this plugin. Saved me a great deal of time.

I'm working on a project where we have very specific requirements on the print layout. Once entering the print dialogue - the pattern fill gets rendered really bad (see attached screenshot). Is there something I could do about this?

Thanks in advance
M

image

Series color in pattern

Sorry if this is not an actual issue. I am trying to get the plugin to use an object to define by pattern as I need to be able to set the color for each series individually.
If I look at the version 1 example it seems that the old version can take an object color overrides does not seem to work.
My guess would be to set it up something like this.
http://jsfiddle.net/jzy1unsv/212/

Possible to fill in stroke color from options?

I'm using pattern-fill successfully in x-axis zones to change the color of columns past a specific date time, however as far as I can tell, the color used in the definition for the stroke is static. In this scenario is it possible to have the stroke color be grabbed from the series its being applied from dynamically?

Background color and pattern transparency

Hi ๐Ÿ˜„

I tweaked your plugin to add support for a background color as well as pattern opacity
to be able to keep columns color and add a pattern on top of it basically.

I can make it into a PR if you are interested

Image pattern does not use opacity setting

Hi, there is a little bug in this plugin, if I want to use image pattern with opacity it is not possible. I can prepare a fix for this, it's straightforward.

// Image pattern
 } else if (options.image) {
	if (animate) {
		this.image(
		       options.image, 0, 0, width, height, function () {
		              // Onload
                              // Here in the onload handler check for options.opacity is needed 
		              this.animate({ opacity: 1 }, animate);
		              H.removeEvent(this.element, 'load');
		          }
		      ).attr({ opacity: 0 }).add(pattern);
	} else {
	      this.image(options.image, 0, 0, width, height).add(pattern);
	}
}

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.