Skip to content

Commit

Permalink
0.11.2
Browse files Browse the repository at this point in the history
Now legend position can be set in visual.setup.js. Default ("ne") not
changed.
  • Loading branch information
badosa committed Jul 19, 2016
1 parent cb54937 commit fa0aab6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "visual",
"version": "0.11.1",
"version": "0.11.2",
"main": ["visual.css", "visual.js", "visual.setup.js", "./lib/*", "./maps/*"],
"ignore": [
"**/.*"
Expand Down
2 changes: 1 addition & 1 deletion lazyvisual.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Boolean. This determines whether the heading is built by composition from *title
#### legend
Boolean. This determines whether the chart legend should be shown. Default (*true*) is set in [visual.setup.js](https://github.com/idescat/visual/blob/master/visual.setup.js).

The position of the legend in Cartesian charts is set in [visual.setup.js](https://github.com/idescat/visual/blob/master/visual.setup.js) (canvas *position* property). The position of the legend in maps is particular to each map and is set in the [canvas properties of the Visual map object](#canvas-properties-area-legend).

#### grid
Object with the following properties: *border* (number: grid border width), *line* (number: line width), *shadow* (number: line shadow width) and *point* (number: point radius). Default border (*0*), line (*2*), shadow (*4*) and point (*1*) are set in [visual.setup.js](https://github.com/idescat/visual/blob/master/visual.setup.js).

Expand Down
2 changes: 1 addition & 1 deletion visual.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions visual.max.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/*global d3, LazyLoad*/
var VisualJS={
version: "0.11.1",
version: "0.11.2",
show: true, //To be used when a callback function is specified: "false" means "don't run VisualJS.chart()", that is, load everything but don't draw.
old: false, //You can change it to true programmatically if you already know the browser is IE<9
fixed: null,
Expand Down Expand Up @@ -1101,7 +1101,8 @@ var VisualJS={
}
},
legend: {
show: shlegend
show: shlegend,
position: scanvas.position || "ne"
},
grid: {
borderWidth: container.grid.border,
Expand Down
5 changes: 3 additions & 2 deletions visual.setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014 Institut d'Estadistica de Catalunya (Idescat)
Copyright (c) 2016 Institut d'Estadistica de Catalunya (Idescat)
http://www.idescat.cat (https://github.com/idescat/visual)
Permission is hereby granted, free of charge, to any person obtaining
Expand All @@ -22,7 +22,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

VisualJS.setup={ //v.0.10.0
VisualJS.setup={ //v.0.11.2
//Colors for maps and series
colors: {
map: {
Expand All @@ -39,6 +39,7 @@ VisualJS.setup={ //v.0.10.0
position: "end"
},
legend: true,
position: "ne", //legend position: "ne", "nw", "se" or "sw"
grid: {
border: 0, //grid border width
shadow: 4, //line shadow width
Expand Down

0 comments on commit fa0aab6

Please sign in to comment.