Dmytro-Shulha / obsidian-plotly

Obsidian plugin to embed Plotly charts into markdown notes.
MIT License
70 stars 4 forks source link

Implement feature: settings - dark theme for charts #8

Open DylanCope opened 2 years ago

DylanCope commented 2 years ago

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

emiltb commented 2 years ago

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.

efemkay commented 2 years ago

@emiltb any luck on the dark mode?

emiltb commented 1 year ago

@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.

sfdrada commented 11 months ago

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)