Flot pie chart change position of legends
Asked Answered
E

2

8

Can we change the position of legends from default left side to right or bottom?

How can we implement hover on mouse pointer that is the content should be shown on the mouse pointer and not in other DIV

Ekaterinburg answered 14/8, 2012 at 11:8 Comment(0)
W
11

The legend option takes a "position" attribute to specify it's location:

  legend: {
    position: "ne" or "nw" or "se" or "sw"
  }

What do you mean by "on the mouse pointer". Would you like the "content" to follow the pointer?

Weirdie answered 14/8, 2012 at 16:9 Comment(0)
L
6

Here's the documentation of the library you're using:

https://github.com/flot/flot/blob/master/API.md#customizing-the-legend

legend: {
    show: boolean
    labelFormatter: null or (fn: string, series object -> string)
    labelBoxBorderColor: color
    noColumns: number
    position: "ne" or "nw" or "se" or "sw"
    margin: number of pixels or [x margin, y margin]
    backgroundColor: null or color
    backgroundOpacity: number between 0 and 1
    container: null or jQuery object/DOM element/jQuery expression
    sorted: null/false, true, "ascending", "descending", "reverse", or a comparator
}
Lesialesion answered 27/11, 2015 at 23:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.