You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with data like:
$data = [
['his': 10, 'jvp':13, 'cur':11, 'wk_start': 'avg', 'c2':'#ff0000'],
['his': 10, 'jvp':13, 'cur':11, 'wk_start': '06.09.'],
['his': 10, 'jvp':13, 'cur':11, 'wk_start': '13.09.'],
.... and a lot of more data
]
All bars get the default color #286aac except the first one ('#ff0000')
The legend will take the color from the first bar => '#ff0000'
If I'm not doomed in your source:
In the Colour Class I found the behavior that the priority for the colour will be like:
from data struct
first element
mod (%) ...
But in this case, we have a legend the priority must be
global (default) if not set ->
data struct ...
I don't found the position in source where the Legend calls the "getColour" Method, but at this position I think it must be handeld by a different Method (not the same for lines or bares) or the Method must be parameterized....
Thanks
The text was updated successfully, but these errors were encountered:
For multi-dataset graphs the legend_type option is set to "dataset", which means only the first entry in each dataset is used for the legend.
For more control you can use the legend_text structured data field to set the text for specific entries (instead of using legend_entries) or set the legend_type to "all" and use the legend_entries_callback option to change them after they are generated.
In a BarAndLineGraph
with data like:
$data = [
['his': 10, 'jvp':13, 'cur':11, 'wk_start': 'avg', 'c2':'#ff0000'],
['his': 10, 'jvp':13, 'cur':11, 'wk_start': '06.09.'],
['his': 10, 'jvp':13, 'cur':11, 'wk_start': '13.09.'],
.... and a lot of more data
]
All bars get the default color #286aac except the first one ('#ff0000')
The legend will take the color from the first bar => '#ff0000'
If I'm not doomed in your source:
In the Colour Class I found the behavior that the priority for the colour will be like:
But in this case, we have a legend the priority must be
I don't found the position in source where the Legend calls the "getColour" Method, but at this position I think it must be handeld by a different Method (not the same for lines or bares) or the Method must be parameterized....
Thanks
The text was updated successfully, but these errors were encountered: