You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as in the example, data values are set in series.data and series.encode contains rules for x/y axis where x is a category axis.
Current Behavior
the boxplot series will be created using the first 5 available dimensions ignoring the encode rules.
The axis will show integer numbers instead of the category values.
Expected Behavior
encoding rules should be respected and the category values be used instead of the category index:
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
If a dataset is used with the identical values then the encode rules are respected and it works ( see example, bottom chart has 2 boxplot series)
I investigated this a bit, and it seems the issue is in WhiskerBoxCommonMixin when getInitialData() is run.
there is a check for category axis and ordinalMeta is set to the 'base' dimension, and inserted as the 0th value dimension in series data. This is always set for category-axis which I think is breaking the encode settings.
I'm happy to submit a PR for this - what is the recommended way to check for encode rules on a series option?
constencodeRules=this.getEncode();if(xAxisType==='category'){option.layout='horizontal';ordinalMeta=xAxisModel.getOrdinalMeta();addOrdinal=!encodeRules?.data?.has('x');//instead of addOrdinal = true}elseif(yAxisType==='category'){option.layout='vertical';ordinalMeta=yAxisModel.getOrdinalMeta();addOrdinal=!encodeRules?.data?.has('y');//instead of addOrdinal = true}else{option.layout=option.layout||'horizontal';}
inside the getInitialData() function.
It feels a little crude, but I tested it and it works in some simple examples.
Let me know if this would be sufficient and I'll submit a PR
Version
5.5.1
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=line-simple&version=5.5.1&code=PYBwLglsB2AEC8sDeAoWsDmAnCATAXLANpKwBGwYYwAtoQOQBsjApPbAL4A0ys1IDACwAGNjwpVaQ0e27J-DZmw4BdLmj7BgAG0gDkG9GBwYMAUywMAhgA8IAZ3obuG7WfPQCxJKvXobAIJ29oREhgbokXwAniBmDJA0ZvR-UZg4uACSnmY2hMKpUdBWSQwAKpkAsgCiAQAamQDKKeEuUahpMXEMAG5W2gCuyYWR2HjZuLmEAIwj6MWlsPQAagEAMgCqtQ3NI22RHWlgsfFLAMZWYO7AWNEtnWNZOXmwAExzsAun9ADCAWXVADiAHkAEoATXqTXukQ4GjUGmiQQcoXChyijwmU1gBVaI3RowyWJeszxaPC6Exz0I71a8NSuEuVnsZjAoUO9mAAywZ1OYU66CI0wKbxFAGYRSIeABWEX0GDJBEC4hisU8MUADnVAE4eFLYNLpTx6AAzLlYehKgVEfWCI0GkXS96wZjGsAACywZkVFNgKmcVpZODMIWI5M6XwSECStgcMKix26SwoNhA2ko8ciZCsWAA6ngPQwJZn0GZoGdgJNCKQXiLoqFZm91XqZSpOB9GWArKjlUKncIxf3hMPhzxhTxXuLJY7hFbOn3J8xXhqR6PYKr1Vr17rYPrDXO0gvhNqAOxixir6d6-2ymXO5j-zqP2H432RpZ9QZmWOOD6J74pmmGYfNmeYFu6RbCCWsCBMExIzB8SJwdSsCkp0ZYVlWvC1jw9bEI2zpqrurbtr6nbdmGva3qhIqTuqV4OgeURCmuG7rluYo7nu0pMZEfYMXaMqOvejDPlEYmke0b4lN8FxXBgNzRD-sADPYEDQBgsBBhAIYAHTkbAAAUZBYMAADWZYAJTQf-DCAemYDQaB-a4IWSzFh8sEOPBTa-kh3kobS6HlpWpw1oQ9p4UQIoEc2u5tvsUTkT21rjqK9F6jOxoKpaHyCmxmo6plMr2qa5q5b6gq2jewk8K6Swel6PpPmSUkRjJDBydctzKap6maeRLJgEZADuNxmf11l_icdnAKmDlOTmLlufQHm-l59g-UFaT-ZtgUfBhoXVjBEW4aEMUTnFggJR2TJDfBuJRHC6D-hwADcQA
Steps to Reproduce
as in the example, data values are set in series.data and series.encode contains rules for x/y axis where x is a category axis.
Current Behavior
the boxplot series will be created using the first 5 available dimensions ignoring the encode rules.
The axis will show integer numbers instead of the category values.
Expected Behavior
encoding rules should be respected and the category values be used instead of the category index:
Environment
Any additional comments?
If a dataset is used with the identical values then the encode rules are respected and it works ( see example, bottom chart has 2 boxplot series)
ie:
The text was updated successfully, but these errors were encountered: