Date formatting, line opacity and moving legend and title #374
Replies: 3 comments 1 reply
-
Thanks for the kind words!
You can override the tick formatter but I think this won't be enough for what you need. The only option I see is to override tickvals with an array of strings that you construct yourself using an universal expression If you do, please make sure to make a Show&Tell post in the discussions! :)
Try changing the order of your entities. If that is problematic because you need the data in a specific order to store in vars and process, you can always have the same entity twice (one first and one last) and mark one as
Yes, change the legend y value. See the defaults here.
The easiest way is to map the values to on/off using a map_y filter and this answer in a discussion Viel Erfolg damit! |
Beta Was this translation helpful? Give feedback.
-
Thanks David, appreciate the detailed answer! :) The first priority at the moment is to get the 'raw' visualization going. The soure visu contains some quite complex CSS-styled pages, so it'll take a bit - fiddling around a lot while learning HA. The heating page with 4 plots is only one of ~10 pages to transfer (example here). On Q1: For the moment, I have overriden the X tick intervals on one of the three stacked charts with a plain 'H:M', which works absolutely fine. The intention is to have the charts synchronized (scrolling/zooming), so it's sufficient to display the date in only one of them. Will further dig into this kind of 'fine tuning' after the raw implementation is done for all pages to transfer (most of them contain graphs). Btw: Implementing the heating curve as displayed on the controller worked like a charm in plotly - done 1:1 within 3 hours only. Will keep you posted! :) /tom |
Beta Was this translation helpful? Give feedback.
-
😆 Yap, that one would've saved me at least one or two of the three hours. |
Beta Was this translation helpful? Give feedback.
-
First of all: Thanks for all the work to bring 'custom:plotly-graph' to it's present stage - love it, and much appreciate all the work that has been put into this project. I just read the HA General Thread in one run (with lot's of copy-paste to example graphs for 'memorizing').
Currently I am migrating to HA from another system I've been using for ~10 years and with a Highcharts integration:
Previous system:
![image](https://private-user-images.githubusercontent.com/20954551/304586056-9a7cf8eb-bcc6-4bf3-9a3a-e8f223dcaad9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MTYxNDMsIm5iZiI6MTczOTYxNTg0MywicGF0aCI6Ii8yMDk1NDU1MS8zMDQ1ODYwNTYtOWE3Y2Y4ZWItYmNjNi00YmYzLTlhM2EtZThmMjIzZGNhYWQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEwMzcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRhMTRlYWRhNjBkZDJlNWViOTliMzAwYTRjYzBhZjQzMGZlNzliNTI5NTFlNzA5YzM5YjZmOGEwYzA3MWIzZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Vn0F4HsW1jnqkV9epEGmT_-OEfIT6N8jQ7t3a3h3x-Q)
HA with plotly:
![image](https://private-user-images.githubusercontent.com/20954551/304586126-a8d48568-0a1e-4613-a97f-27a09c476bfa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MTYxNDMsIm5iZiI6MTczOTYxNTg0MywicGF0aCI6Ii8yMDk1NDU1MS8zMDQ1ODYxMjYtYThkNDg1NjgtMGExZS00NjEzLWE5N2YtMjdhMDljNDc2YmZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEwMzcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJhNjkyYmU0ZWY3MzE2N2Y2OWQ2MGNkOWEwZjYzMjMyOTE3NDlmMzMyMzcyOTYxMmI1OWE2OTc4Y2VkYTFkNzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9vX6lHDLwxREBoB0X6sWx8QHQaMkzQx3x0Rq5hSEHdw)
Q1: Is it possible to replace the date in the timeline like in the old system, e.g. with a filter or such? 00:00 is replaced in Highcharts with the date. This would save up some space, especially with several plots on top of each other.
Q2: What is the reason the lines look so 'opacious' in HA when a filled plot line is behind? Are there layers or something to bring them in front? (for sure something I overlooked)
Q3: Is there a way to freely move title and legend? (most likely: dito)
And finally Q4: Is there a way to hide the 0.2, 0.4 etc between 0 and 1 on y2 here, and ideally replace 0/1 with 'on'/'off'?
Thanks for help, much appreciated - apologize for the beginner questions, and again thanks for all the work bringing plotly into HA!
/tom
Beta Was this translation helpful? Give feedback.
All reactions