Skip to content

feat: allow escaping dot in parsing axis keys#10501

Closed
thabarbados wants to merge 1 commit intochartjs:masterfrom
thabarbados:allow-parsing-escape
Closed

feat: allow escaping dot in parsing axis keys#10501
thabarbados wants to merge 1 commit intochartjs:masterfrom
thabarbados:allow-parsing-escape

Conversation

@thabarbados
Copy link
Contributor

Allow escaping '.' in parsing *AxisKey #10348

You can check the build with changes here

@kurkle
Copy link
Member

kurkle commented Jul 21, 2022

This could have performance impact.

@thabarbados
Copy link
Contributor Author

@kurkle How can I check it?

When using keys of the form `foo.bar`, you can allow for escaping dot symbol and add a double slash before the dot.

```javascript
type: 'doughnut',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to line or bar since the doughnut chart does not use xAxisKey and yAxisKey

}]
},
options: {
parsing: { xAxisKey: "data\\.key", yAxisKey: "data\\.value"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the xAxisKey and yAxisKey both on a separate line to match other code block

@kurkle
Copy link
Member

kurkle commented Jul 24, 2022

@kurkle How can I check it?

You need a large dataset and parsing enabled. Then test with / without the patch.

I did some tests (3 datasets with 55550 datapoints each) :
master: 50 runs done in 3673ms
this pr: 50 runs done in 4223ms

@thabarbados thabarbados deleted the allow-parsing-escape branch July 25, 2022 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments