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
Hi @kernc ; I love your work on this module; using it a lot lately. I have come across the need to control line width for each Indicator. I couldn't work out how to do it natively, so I tinkered with the code and it seems to work.
added the line_width=None property to the def I() function
added to the def _plot_indicators() function (under the colors instrcutions): line_widths = value._opts['line_width'] if line_widths is None: line_widths = [2] * max(len(value._opts['color']), 1) line_widths = cycle(_as_list(line_widths))
...then added to the for loop (again, under the color instruction): line_width = next(line_widths)
...then added line_width=line_width to the fig.line function.
Not sure whether this is a dumb idea or not, but it seems to work. I can now control the line thickness of each of my plots. Just thought I'd share.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @kernc ; I love your work on this module; using it a lot lately. I have come across the need to control line width for each Indicator. I couldn't work out how to do it natively, so I tinkered with the code and it seems to work.
line_width=None
property to the def I() functiondef _plot_indicators()
function (under the colors instrcutions):line_widths = value._opts['line_width']
if line_widths is None:
line_widths = [2] * max(len(value._opts['color']), 1)
line_widths = cycle(_as_list(line_widths))
...then added to the for loop (again, under the color instruction):
line_width = next(line_widths)
...then added
line_width=line_width
to thefig.line
function.Not sure whether this is a dumb idea or not, but it seems to work. I can now control the line thickness of each of my plots. Just thought I'd share.
Regards,
Rydo
Beta Was this translation helpful? Give feedback.
All reactions