You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "DevitX (via GitHub)" <gi...@apache.org> on 2025/02/11 10:14:09 UTC
[I] [Feature] Add a label or description field to Calendar coordinate system [echarts]
DevitX opened a new issue, #20748:
URL: https://github.com/apache/echarts/issues/20748
### What problem does this feature solve?
Hi,
it seems that currently the "calendar" coordinate system doesn't support any field to add a string to a date on a chart. This could be useful to add memos or notes to specific dates on the tooltip of charts like: scatter, effectScatter and graph,
### What does the proposed API look like?
Currenlty in Calendar.ts this dimensions are specified:
`
static getDimensionsInfo() {
return [{
name: 'time', type: 'time' as const
}, 'value'];
}
`
My proposal is to add a 'tooltip' or 'description' field to the data/dataset. This is a example of how should it be defined:
data: [['2025-01-01', 300, 'String']]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Add a label or description field to Calendar coordinate system [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20748:
URL: https://github.com/apache/echarts/issues/20748#issuecomment-2695242128
Calendar data does not come from a dataset, just a date [range](https://echarts.apache.org/en/option.html#calendar.range). It's just an axis with date values.
Daily **data** comes from associated **series** and that data could have unlimited columns - [Demo](https://echarts.apache.org/examples/en/editor.html?c=calendar-heatmap&edit=1&reset=1&code=GYVwdgxgLglg9mABAcwKZQGowE5RAQwBsARfKfACgE9V9sBKRAbwChFEIEBnKRAEzKpEAXkQBqVBAAWdKFwB0sALap5ABzpdU1WtnGIA5AFoADAEZTZg_QDcbDt16owfEeMkzcC5ao3YtFGI0dPpm-sbmltZ27JxgPPz4VAAqMCpuAMwAbCYmiABUiABMACwFiGa5JjEO8bwC5G4A2gC6NcBwehSE6Ig-bg2oNn1pQgA8iM58w_1iogIpo4ys7OwN-OogXFIUTfark9Ky3qPyHdhKZBQ-ADSGTFSPVAC-RkwAsu-vTHx8zwZ3YBELT0G77VbvMhSM6EOCdCiQqDQ7D4FxwJQURiFSpVUHg9gAZSg2BgYGQZ2w6IAwp4qXA-NoTAAfRHI1F8dGY_JFLJiACcAHZGOwAPQixAotFKRA9KBQVB6TiEEBKMDglq2ezPezYdAgbBIdZ2bVwNSwBBuFYjKA9ABczHBUFN9oyJjBBx6wCg9oMEGc8uwAMdqAAHt7DKQYIQqIgiag1Ig6eAoAYte6-nDCLA1Parexzpc5Qr7WoE8IAHwOg7sXV4A2GABuRBAqB9YlL8nWTTMLXCYwARthy7KA22O12im1wdr2M90w2YFwCIRITmq6slKT7W7wZcQ_acbl0-woFQ1K3DGoYJJUAB3ReoIMHTrXsDhgxSF8ALwQ5EIT9WT13z9N8FQAk9nUQLIAFY7j4UZ4ngMBbTMNN7AgIgpjoXNHUgswih3D1UC9F1CNWElkCkcNXWPDhUEIQgCRgL8LyaAx8BAJ0AQqDIWloyU0B9Ai
zCycDEBgeUlCJKg7XXA5-06BlsAAdRgPgkW3eRoOnWjgmwAAZfB-3o3NEG2OBb3tIFCC0RAZzs9MtBJVAuBwg5T3PH0pFoKBLjUMTOEU0lBAJKgeFQJQfQwnoXDoMT1ntNBMBwPAiFIcgKAMYTRPoLUWGeGwgA).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Add a label or description field to Calendar coordinate system [echarts]
Posted by "DevitX (via GitHub)" <gi...@apache.org>.
DevitX commented on issue #20748:
URL: https://github.com/apache/echarts/issues/20748#issuecomment-2698829824
> Calendar data does not come from a dataset, just a date [range](https://echarts.apache.org/en/option.html#calendar.range). It's just an axis with date values. Daily **data** comes from associated **series** and that data could have unlimited columns - [Demo](https://echarts.apache.org/examples/en/editor.html?c=calendar-heatmap&edit=1&reset=1&code=GYVwdgxgLglg9mABAcwKZQGowE5RAQwBsARfKfACgE9V9sBKRAbwChFEIEBnKRAEzKpEAXkQBqVBAAWdKFwB0sALap5ABzpdU1WtnGIA5AFoADAEZTZg_QDcbDt16owfEeMkzcC5ao3YtFGI0dPpm-sbmltZ27JxgPPz4VAAqMCpuAMwAbCYmiABUiABMACwFiGa5JjEO8bwC5G4A2gC6NcBwehSE6Ig-bg2oNn1pQgA8iM58w_1iogIpo4ys7OwN-OogXFIUTfark9Ky3qPyHdhKZBQ-ADSGTFSPVAC-RkwAsu-vTHx8zwZ3YBELT0G77VbvMhSM6EOCdCiQqDQ7D4FxwJQURiFSpVUHg9gAZSg2BgYGQZ2w6IAwp4qXA-NoTAAfRHI1F8dGY_JFLJiACcAHZGOwAPQixAotFKRA9KBQVB6TiEEBKMDglq2ezPezYdAgbBIdZ2bVwNSwBBuFYjKA9ABczHBUFN9oyJjBBx6wCg9oMEGc8uwAMdqAAHt7DKQYIQqIgiag1Ig6eAoAYte6-nDCLA1Parexzpc5Qr7WoE8IAHwOg7sXV4A2GABuRBAqB9YlL8nWTTMLXCYwARthy7KA22O12im1wdr2M90w2YFwCIRITmq6slKT7W7wZcQ
_acbl0-woFQ1K3DGoYJJUAB3ReoIMHTrXsDhgxSF8ALwQ5EIT9WT13z9N8FQAk9nUQLIAFY7j4UZ4ngMBbTMNN7AgIgpjoXNHUgswih3D1UC9F1CNWElkCkcNXWPDhUEIQgCRgL8LyaAx8BAJ0AQqDIWloyU0B9AizCycDEBgeUlCJKg7XXA5-06BlsAAdRgPgkW3eRoOnWjgmwAAZfB-3o3NEG2OBb3tIFCC0RAZzs9MtBJVAuBwg5T3PH0pFoKBLjUMTOEU0lBAJKgeFQJQfQwnoXDoMT1ntNBMBwPAiFIcgKAMYTRPoLUWGeGwgA).
Hi @helgasoft, thank you for your reply! Currenly, I tried to encode the data of a **heatmap** that has a "calendar" coordinate system, this is what you can encode/map: time, value (or x,y,z with a grid coordinate system). I would like to also encode the "tooltip" but with how datasets work I'm having some troubles.
I found a workaround to put "text" in the dataset. This is a minimum [demo](https://echarts.apache.org/examples/en/editor.html?c=calendar-heatmap&edit=1&reset=1&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GoBAzAAwA0R6uAZmAQOQDGO0YOATszcRhwAPJrGYARAIYQsAT1gBlLiFgBhYAFdOzIgF9-JYFkggCqAQGcAFsADuBMNw049BgG4QLGyVgCyk00IBAFtJIXJqWlhgiGgCClciVh8OABNJbjMosFJYAEYAJkiBBlFKA3RuCABzKzLi4m5JaGr8MSKCgFY-KIguYKVZXCyBdAAjYG5UngB1CFSwK3iAOk6o_SjZHAyAGUkxnCwzWGs7ByccWF1E9AseCBwLEeJUiGCOCyhoJ9gAbWZ0lw-GI3D5nMwALoVDCyEBtZhWbZgUIgHoCVjASavaCSLgKWQWfosZK4aDpXjQjgY6bPASQd4sQE4NGjUFYZwsNng6EbOmY4wQQLmUb0SahMBcTKwAAUHEcsgAlAgAHxBUaVHBgDTcODMXASngsWAAalgcu4smWgMkvwKEIA3FF0NcBC6rjQiNa7qJhbdNNx2AAJbbTKX0Hx3aGvd7fL4_f5M4HMLnMqhiLgiSHQiz-9gEX5Ov7MDqdAC0eXLSbyADYk8yoYX_iXSwVK2nmHk8kmhFnG8WKF1S2Q22IyF325Je-qmwOywAWEcdshJ1iQqIQvQoXT2oA). There seems to be something wrong on how the encode or dataset behave, I would expect that I put my dimension in the encode (x,y,z or time, value) and then I can use my other dimension
(text) in encode.tooltip. But by doing this the data doesn't even render.
> // In any of the series and coordinate systems,
// these properties are available:
encode: {
// Display dimension "product" and "score" in the tooltip.
tooltip: ['product', 'score']
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Add a label or description field to Calendar coordinate system [echarts]
Posted by "DevitX (via GitHub)" <gi...@apache.org>.
DevitX commented on issue #20748:
URL: https://github.com/apache/echarts/issues/20748#issuecomment-2698839692
Adding the correct mapping from dataset's dimension to 'tooltip' in the 'encode' object seems the best approach in my idea. Do you have any suggestion, solution or a opinion on this matter? Thanks for your attention. Iām looking forward to your reply!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Add a label or description field to Calendar coordinate system [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20748:
URL: https://github.com/apache/echarts/issues/20748#issuecomment-2698999852
> would expect that I put my dimension in the encode (x,y,z or time, value) and then I can use my other dimension (text) in encode.tooltip. But by doing this the data doesn't even render.
agree, it seems series with _calendar_ coordinates do not play well with _dataset_ and _encode_.
Your example demonstrates how _encode_ does **not** work, but _dimensions_ (which is not even in the docs!?) is **mandatory** š²
```encode: {time: 'time', value: 'value', tooltip: ['value', 'something_else']}``` is perfectly valid setting/expectation.
So I would say this issue is not about adding a new feature, but about fixing a **bug** š - [Demo](https://echarts.apache.org/examples/en/editor.html?c=calendar-heatmap&edit=1&reset=1&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GoBAzAAwA0R6uAZmAQOQDGO0YOATszcbADOAVwBGXAB5NYAImYdWwACY5msegEMIWQVVjDoS4K2EBbDlyWxmSiOeiCoDtQHdg3ANaDYEB1w1KMkQAvvwkwFiQIARIsKFEAG4QIhpYALIa0YQCphoS5NS0sKa-BBQhYaypHEoa3DFFYKSwAIwATIUCDNKUYejcEADmABY9ncTcGtCD-NYdbQCsfEUQXKYAymAAnrgNAuii7ircAOoQSmDDZQB0C0XxAls4dQAyGqI4WDFCw8AuBGBuMIcHEKkRBDwIDhBHtiNsQLNmMNnmBciA-LAioojr4NFx1ltBGsWFVcIY6ssBLZ7I4YDDYABtGx41R6ZgJVLA5gAXT0AHo-cVhET9BCfH5nlZgPRYAplCCAIQAfgVRQAcgB5OUqWECAWQcwsWpcDEcrDAlhmrl6IroA2zaiwK2zFp6JoRKIENr3PrhSIQLKofbqdy5MBceqwAAUFm4WwAlAgAHzZYOwbg4MDCbhwZi4cM8FiwADUss4ceuxo0DLa3IA3LbQQJgmCiFWIdIGUHiIJgNn2AAJSWF9SpCG-gXUji0hwEJnG1nWZ0Y5iSMA8329_uzBmNpnzBYAWhax5XLQAbCvVLy98wD4e2qe2S0WiuJBvb_eyE_rGRX2yNA_YN9woRZDwAFh_ZgWjIFdWB5IpuRCJDgjrIA)
You may change the title accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org