Ultimate magazine theme for WordPress.

Crypto Information Using Nomics API – Bitcoin, Ethereum etc. – Share Your Projects!


Do you remember how you did the dynamic period changer?

Yes sure, I built a quick example:

  • You’ll need this https://github.com/iantrich/config-template-card installed – read through it if you’re unfamiliar to try and get the concept in your head.

  • Create an input selector with the values ​​you want to use in your chart for the time periods, e.g. B. 1h, 2h, 1d, etc. (this needs to match the expected values ​​for whatever you’re using to chart – I’m using apex chart one for this)

Once you have these you can go to your dashboard and

  • Create an entity map using the input_select utility you created. This allows you to change the time period from the dashboard:

Type: Entities Entities: – Entity: input_select.period

  • Create a configuration template card referencing the input_select helper you created as variables and entities to monitor, and in it put your graph card (apex graphs in my case) – for the time period (graph_span in my example) reference those in variable defined the config-template-card.

Type: custom:config-template-card Variables: – states[‘input_select.period’].state entities: – input_select.period card: type: custom:apexcharts-card header: show: true title: ApexCharts-Card show_states: true colorize_states: true graph_span: ${vars[0]} series: – Entity: counter.daily_presence

And voila, you can dynamically change the periods of your charts – let me know how you get on :slight_smile:


Learn Crypto Trading, Yield Farms, Income strategies and more at CrytoAnswers

Comments are closed.

%d bloggers like this: