Skip to content

Commit

Permalink
Merge branch 'stesie-dynamic-bubble-colors'
Browse files Browse the repository at this point in the history
  • Loading branch information
mojoaxel committed May 11, 2015
2 parents 3440cdd + e09e5b0 commit 75e5b4e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The MIT License (MIT)

Copyright (c) 2015 Alexander Wunschik
Copyright (c) 2010, 2011, 2012, 2013 by Juergen Marsch
Copyright (c) 2015 by Alexander Wunschik
Copyright (c) 2015 by Stefan Siegl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ Licensed under [MIT](http://opensource.org/licenses/MIT)

### 0.3.2
* code cleanup

### 0.3.3
* `series.color` can be of type `function` (thx @stesie)

5 changes: 4 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
var d2 = [[60,25,15], [70,40,6], [30,80,4]];
var options = {
series: {
color: '#CCC',
color: function(x, y, value) {
var red = 155 + value * 10;
return 'rgba('+red+',200,200,1)';
},
bubbles: {
active: true,
show: true,
Expand Down
6 changes: 5 additions & 1 deletion jquery.flot.bubbles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* The MIT License
Copyright (c) 2010, 2011, 2012, 2013 by Juergen Marsch
Copyright (c) 2015 by Stefan Siegl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,7 +26,7 @@ THE SOFTWARE.
"use strict";

var pluginName = "bubbles";
var pluginVersion = "0.3.2";
var pluginVersion = "0.3.3";

var options = {
series: {
Expand Down Expand Up @@ -134,6 +135,9 @@ THE SOFTWARE.
y = offset.top + serie.yaxis.p2c(data[1]);
v = data[2];
r = parseInt(serie.yaxis.scale * data[2] / 2, 0);
if(typeof c === 'function') {
c = c.apply(this, data);
}
serie.bubbles.drawbubble(ctx, serie, x, y, v, r, c, overlay);
};

Expand Down

0 comments on commit 75e5b4e

Please sign in to comment.