You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Fnxxxxo (via GitHub)" <gi...@apache.org> on 2024/03/06 08:02:15 UTC
[I] [Feature] Add sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Fnxxxxo opened a new issue, #19684:
URL: https://github.com/apache/echarts/issues/19684
### What problem does this feature solve?
I need constant color for series.itemStyle when using realtimeSort. Currently the color callback provide dataIndex for color picking. But it no params provide sorting info of data. I have to sort data manually before appling them to the bar chart. It makes realtimeSort useless for me.
### What does the proposed API look like?
Add `sortIndex` to the params of series.itemStyle.color callback. It shows us sorting index for the currently data.
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #19684: [Feature] Add sortIndex for color callback of itemStyle when using realtimeSort
URL: https://github.com/apache/echarts/issues/19684
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "Fnxxxxo (via GitHub)" <gi...@apache.org>.
Fnxxxxo commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-1990857403
@helgasoft I want echarts to implement sortIdx which give me the current sorting info data in `realtimeSort: true`.
For the official demo, in my case, the first and the second city should be always using gold and silver color. Other cities keeping using their colors.
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-4093334150
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-1982595152
> no params provide sorting info of data. I have to sort data manually before appling them to the bar chart
So you want to change items colors, instead of preserving them as in [official example](https://echarts.apache.org/examples/en/editor.html?c=bar-race-country) ?
Please make an effort to create **Minimal Reproduction code**.
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-4050141154
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "Fnxxxxo (via GitHub)" <gi...@apache.org>.
Fnxxxxo commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-1987762771
@helgasoft ,I make some changes to the example:
```
yAxis: {
type: 'category',
inverse: true,
max: 10,
axisLabel: {
show: true,
fontSize: 14,
formatter: function (value, idx, sortIdx) {
const flag = sortIdx === 0 ? 'first' : sortIdx === 1 ? 'second' : 'normal';
return '{' + flag + '|' + value + '}' + '{flag|' + getFlag(value) + '}';
},
rich: {
first: {
color: '#ffd700'
},
second: {
color: 'c0c0c0',
},
normal: {},
flag: {
fontSize: 25,
padding: 5
}
}
},
animationDuration: 300,
animationDurationUpdate: 300
},
```
This always set specific color for the first and the second.
--
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 sortIndex for color callback of itemStyle when using realtimeSort [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19684:
URL: https://github.com/apache/echarts/issues/19684#issuecomment-1989928296
> This always set specific color for the first and the second.
cannot replicate, _sortIdx_ is null, I still do not understand what you are trying to accomplish
--
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