Comments (4)
->withMeta($options)
from nova-dashboard.
Ah, thanks for the tip, @cord
I couldn't make it :(
Here is how I am doing it :
public function widgets(): array
{
$widget = new ConsumedSolarEnergyValue(0, 0, 2, 1);
$options = [
"prefix" => null,
"suffix" => "kWh",
"decimal" => "2",
"no_current_data" => "N\/A",
"labels" => [
"No Prior Data" => "Aucune donn\u00e9e plus ancienne",
"No Current Data" => "Aucune donn\u00e9e",
"No Increase" => "Pas d\u2019augmentation",
"Increase" => "Augmentation",
"Decrease" => "Diminution",
"Previous Value" => "Previous value:"
],
"widget_title" => "Energie r\u00e9seau consomm\u00e9e",
"widget_help" => null
];
$widget->withMeta(['options' => $options]);
return [
$widget,
];
}
If I change it to
$widget->withMeta(['optionsXXX' => $options]);
,
I can see the optionsXXX
value when checking /nova-vendor/nova-dashboard/tableau-de-bord
.
but when I use options
, it seems to be overwritting the $options variable with null values.
Do you have an example you already did ?
from nova-dashboard.
check
https://github.com/Nova-BI/nova-dashboard-manager/blob/main/src/Views/CustomView.php
for an example how to work with meta data.
from nova-dashboard.
mmm. Still can't find it. I think withMeta may not be the problem, it is just overwritten by empty defaults, and I can't find to see why.
from nova-dashboard.
Related Issues (20)
- Publish Migrations error HOT 2
- Update on Static and dynamic mix? HOT 2
- Replacing default dashboard HOT 1
- enhance widget placement options HOT 2
- Hiding dashboards from sidemenu when having only 1 item HOT 3
- public Team-dashboard HOT 1
- Compatible with awesome-nova/dependent-filter ? HOT 2
- Multiple Dashboard link doesn't work HOT 7
- New filter released HOT 1
- Access to $filters in widgets() function HOT 1
- update url with filter settings HOT 1
- Charts are not updated when changing filters HOT 3
- Nova 4 compatibility HOT 3
- Filters' width HOT 2
- Full Example HOT 1
- Hiding widgets based on role? HOT 1
- Navigation state doesn't update HOT 5
- Can't get mobile menu to open on dashboard page
- Improvement: Responsiveness HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-dashboard.