obsidian-plotly icon indicating copy to clipboard operation
obsidian-plotly copied to clipboard

Implement feature: settings - dark theme for charts

Open DylanCope opened this issue 3 years ago • 4 comments

Is it possible to change the theme of the plot? Preferably to "plotly_dark"

DylanCope avatar Feb 23 '22 16:02 DylanCope

I don't know if the original author is still working on the project. I would also very much like the plugin to integrate more natively with the current theme in obsidian. I have forked the project here (https://github.com/emiltb/obsidian-plotly) and will try to come up with a solution.

emiltb avatar Apr 26 '22 11:04 emiltb

@emiltb any luck on the dark mode?

efemkay avatar Jul 29 '22 04:07 efemkay

@emiltb any luck on the dark mode?

All god intentions from my side, but I ran into some quirks the last time I worked on it that stopped me in my track. I might pick it up again at some point, but I don't have the time right now.

emiltb avatar Aug 11 '22 17:08 emiltb

Here's how you can do it, just customize what colors you want to set your chart:

data:
- x: [0, 1, 2]
  y: [0, 1, 0]
  line:
    color: 'rgb(255, 255, 255)' # Line color (white)
    width: 2 # Line width
  marker:
    color: 'rgb(0, 150, 255)' # Marker color (blue)
    size: 8 # Marker size
  mode: 'lines+markers' # Display both lines and markers
layout:
  paper_bgcolor: 'rgb(17, 17, 17)' # Dark background color
  plot_bgcolor: 'rgb(17, 17, 17)' # Dark plot area color
  font:
    color: 'rgb(255, 255, 255)' # Font color (white)
  xaxis:
    color: 'rgb(255, 255, 255)' # X-axis color (white)
    gridcolor: 'rgb(102, 102, 102)' # X-axis grid color (gray)
  yaxis:
    color: 'rgb(255, 255, 255)' # Y-axis color (white)
    gridcolor: 'rgb(102, 102, 102)' # Y-axis grid color (gray)

sfdrada avatar Aug 07 '23 16:08 sfdrada