Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dataset guess #11746

Merged
merged 3 commits into from
Dec 1, 2019
Merged

fix: dataset guess #11746

merged 3 commits into from
Dec 1, 2019

Conversation

100pah
Copy link
Member

@100pah 100pah commented Nov 29, 2019

(1) Enhance dataset default encode guess strategy. Fix #11428, Fix #11419, Fix #11735
(2) Support candlestick in dataset encode guess.
(3) Some refactor of the code arrangement of dataset encode guess and dimension calculation.

Break change of:
<test/dataset-charts.html>
image

The test case:
<test/dataset-guess.html>
image

Strategy:

line, bar, pictorialBar, scatter, effectScatter, candlestick, boxplot

[The strategy of the arrengment of data dimensions for dataset]:

  • "value way": if all axes are non-category axes. So series one by one take
    several (the number is coordSysDims.length) dimensions from dataset.
    The result of data arrengment of data dimensions like:
    | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y |
  • "category way": if at least one axis is category axis. So the the first data
    dimension is always mapped to the first category axis and shared by
    all of the series. The other data dimensions are taken by series like
    "value way" does.
    The result of data arrengment of data dimensions like:
    | ser_shared_x | ser0_y | ser1_y | ser2_y |

pie, funnel, map

Find the first pure number dim as the value dim,
and then find a name dim with the priority:
"number-like|other string dim" > "other dim" > "the value dim itself".

If the previous strategy is not satisfied (that is, no pure number),
find the first number-like dim as the value dim,
and then find a name dim with the priority:
"other dim" > "the value dim itself".
That is for backward compat: number-like (e.g., '3', '55') can be
treated as number.

(1) Enhance dataset default encode guess strategy. Fix #11428, Fix #11419, Fix #11735
(2) Support candlestick in dataset encode guess.
(3) Some refactor of the code arrangement of dataset encode guess and dimension calculation.
pissang
pissang previously approved these changes Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants