What does this type expect as input and what does it output?
I have tried it with several input values such as Datetime string or yyyy-mm-dd formatted date but none worked.
Same question for the weekday type.
Hello Toky,
Thank you for the question.
month
type can be used for string values such as January
, February
, etc.
When using month
type, members of such hierarchy will be sorted correctly from January to December.
Same for the weeday
, it works with Monday
, Tuesday
, etc.
Please let us know if it was helpful.
Regards,
WebDataRocks Team
Thanks.
Didn’t think it was that simple. I overthought it.
Does the value have to match with the configured translation in the localization?
Hello Toky,
Yes, month
and weekday
values have to match the localization values.
Regards,
WebDataRocks Team
month
type can be used for string values such asJanuary
,February
, etc.
where should I set this `type` field , under which object ??
Hello,
Thank you for reaching out to us.
Specific types for hierarchies can be defined using the meta-object of the JSON or CSV data source. Such an object is represented as the first element of an array for JSON or the first row for CSV.
In case your data source is JSON, it is also possible to use the meta-object in order to create multi-level hierarchies and defining specific captions of the hierarchies.
We would like to kindly draw your attention to the following code snippets demonstrating the type definition:
JSON:
[{
"Revenue": {
type: "number"
},
"Month": {
type: "month"
}
},
{
"Revenue": 4678,
"Month": "January"
}
...
]
CSV:
-Revenue, m+Month
4768, January
...
More information about the meta-object and data types in our documentation:
We hope it helps.
Best regards,
WebDataRocks Team