(core) New chart view axis conf with picker for each of X,Y and group by

Summary:
Chart view used to rely on the same view field configuration as used in any other widget.

This diff allows to explicitely select X-AXIS, Y-AXIS and group by column with column picker.

As charts supports several y-axis, we still use a draggable list to arrange them.

Diff also fix doc to the `insertPositions` function.

Test Plan: Updated the relevant test.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3021
This commit is contained in:
Cyprien P
2021-09-15 10:51:18 +02:00
parent 3e5a292cde
commit 2cf2088373
5 changed files with 363 additions and 92 deletions

View File

@@ -19,8 +19,8 @@ const G = require('../lib/browserGlobals').get('document', 'DOMParser');
* If an upperPos is not given, return consecutive values greater than lowerPos
* If a lowerPos is not given, return consecutive values lower than upperPos
* Else return the avg position of to-be neighboring elements.
* Ex: insertPositions(null, 0, 4) = [1, 2, 3, 4]
* insertPositions(0, null, 4) = [-4, -3, -2, -1]
* Ex: insertPositions(null, 0, 4) = [-4, -3, -2, -1]
* insertPositions(0, null, 4) = [1, 2, 3, 4]
* insertPositions(0, 1, 4) = [0.2, 0.4, 0.6, 0.8]
*/
function insertPositions(lowerPos, upperPos, numInserts) {