dashed-slug.net › Forums › Exchange extension support › Chart CSS
Tagged: axis, candlesticks, Chart, css, lightweight-charts, specificity, tradingview
- This topic has 4 replies, 2 voices, and was last updated 4 years, 3 months ago by alexg.
-
AuthorPosts
-
June 9, 2020 at 11:02 pm #8565AnonymousInactive
Hi alex I understand that individual styling is not really supported by you but could you shed any light how to do some CSS to edit the graph. I have attached two images a before and after of how I would like it set out.
Basically I want to display multiple static charts on one page about 4or 5 charts wide but just the actual graph non of the price of timeline. I have tried using visual CSS and it struggles as there are multiple layers
Excuse the rough drawing I did it on a small screen mobile.
Any help would be appreciatedRegards,
Jamie
Attachments:
You must be logged in to view attached files.June 10, 2020 at 6:48 am #8569alexgKeymasterHello Jamie,
The TradingView chart is rendered on a canvas, so it doesn’t lend itself to CSS styling. Fortunately the chart and each of its axes is rendered on distinct canvas elements, so you could hide the axes using CSS like so:
.tv-lightweight-charts table tr:nth-child(2), .tv-lightweight-charts table tr:nth-child(1) td:nth-child(3) { display:none; }
I do intend to add some more options to Customizer, so that the library renders the charts with different styling parameters depending on user settings.
Hope this helps. Let me know if have any further questions on this.
with regards
P.S. While I do not promise to be able to help with CSS, I generally do try to help when possible. The reason I do not make promises is because I often get requests from people who don’t know what an HTML class is, and they expect me to do big changes to the layout of their sites, while using sub-par themes with confusing rules.
All web developers should spend a few minutes studying CSS selectors and selector specificity rules. That’s all you need to know in most cases. MDN is a good resource and a good article that I often recommend for selector specificity is https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/
June 11, 2020 at 9:06 pm #8590AnonymousInactiveThank you.
I have also added
.dashed-slug-wallets-exchange div table{
border-style:none;}
Regards,
Jamie
June 11, 2020 at 10:21 pm #8591AnonymousInactiveI did a little more styling and have given it a radius.
June 12, 2020 at 6:09 am #8593alexgKeymasterThat’s great!
Eventually I want to add more Customizer options to the Exchange, just like with the parent plugin UIs.
When this is implemented, your CSS rules may interfere with the Customizer implementation. Just something to keep in mind, no big deal.
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.