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 on setting XHR header option setting #1031

Closed
netil opened this issue Aug 19, 2019 · 1 comment
Closed

Fix on setting XHR header option setting #1031

netil opened this issue Aug 19, 2019 · 1 comment
Assignees

Comments

@netil
Copy link
Member

netil commented Aug 19, 2019

Description

When loads data via XHR, headers option can be used.

chart.load({
    url: './data/test.json',
    mimeType: "json",
    headers: {"Content-Type": "text/xml"} 
});

But, header setting are done before opening the XHR object.
headers must be done after the open.

const req = new XMLHttpRequest();
if (headers) {
Object.keys(headers).forEach(key => {
req.setRequestHeader(key, headers[key]);
});
}
req.open("GET", url);

@netil netil added the bug label Aug 19, 2019
@netil netil self-assigned this Aug 19, 2019
@netil netil closed this as completed in 82461b3 Aug 20, 2019
netil pushed a commit that referenced this issue Sep 3, 2019
# [1.11.0-next.1](https://github.com/naver/billboard.js/compare/1.10.1...1.11.0-next.1@next) (2019-09-03)

### Bug Fixes

* **all:** Fix possible IE9 style value ([950c335](950c335)), closes [/github.com/naver/billboard.js/commit/54631506721bc64476d5c8fd64a2a681f3b340c1#diff-851f1a6e431d0ae7dc68b646d27821a8R90-R93](https://github.com//github.com/naver/billboard.js/commit/54631506721bc64476d5c8fd64a2a681f3b340c1/issues/diff-851f1a6e431d0ae7dc68b646d27821a8R90-R93) [#1059](#1059)
* **api:** Fix .data() to return exact data ([12bdc54](12bdc54)), closes [#1035](#1035)
* **data:** Fix header option setting ([82461b3](82461b3)), closes [#1031](#1031)
* **interaction:** Fix on eventRect rederaw ([dc5f67a](dc5f67a)), closes [#1028](#1028) [#1019](#1019) [#963](#963)
* **text:** Fix data label y position when all data are 0 ([4b423a5](4b423a5)), closes [#1026](#1026)
* **tooltip:** Fix tooltip work on touch zoom ([5d98187](5d98187)), closes [#1056](#1056)

### Features

* **data:** Intent to ship data.labels.overlap ([90792fa](90792fa)), closes [#977](#977)
* **options:** Intent to ship render option ([b6af77f](b6af77f)), closes [#1015](#1015)
* **plugin:** Intent to ship TextOverlap ([728e879](728e879)), closes [#1048](#1048)
netil pushed a commit that referenced this issue Nov 22, 2019
# [1.11.0](1.10.2...1.11.0) (2019-11-22)

### Bug Fixes

* **all:** Fix possible IE9 style value ([950c335](950c335)), closes [/github.com/naver/billboard.js/commit/54631506721bc64476d5c8fd64a2a681f3b340c1#diff-851f1a6e431d0ae7dc68b646d27821a8R90-R93](https://github.com//github.com/naver/billboard.js/commit/54631506721bc64476d5c8fd64a2a681f3b340c1/issues/diff-851f1a6e431d0ae7dc68b646d27821a8R90-R93) [#1059](#1059)
* **api:** Fix .data() to return exact data ([12bdc54](12bdc54)), closes [#1035](#1035)
* **axis:** Correct on tick count display ([d4c8eb1](d4c8eb1)), closes [#1077](#1077)
* **axis:** Correct subchart x axis culling ([8478dd9](8478dd9)), closes [#1068](#1068)
* **data:** Fix header option setting ([82461b3](82461b3)), closes [#1031](#1031)
* **gauge:** Fix to not align background startingAngle from option ([862156f](862156f)), closes [#1073](#1073)
* **gauge:** Show legend by default ([46fc102](46fc102)), closes [#1136](#1136)
* **interaction:** Fix on eventRect rederaw ([dc5f67a](dc5f67a)), closes [#1028](#1028) [#1019](#1019) [#963](#963)
* **options:** Correct background element's position ([d66e4fd](d66e4fd)), closes [#1132](#1132)
* **shape:** Fix shape position on multiple xs ([6ce784a](6ce784a)), closes [#1115](#1115)
* **text:** Fix data label y position when all data are 0 ([4b423a5](4b423a5)), closes [#1026](#1026)
* **tooltip:** Fix tooltip work on touch zoom ([5d98187](5d98187)), closes [#1056](#1056)
* **tooltip:** Remove 'pointer-events:none' inline set ([baa7bc6](baa7bc6)), closes [#1124](#1124)
* **zoom:** Correct Axis culling on zoom ([c319302](c319302)), closes [#1106](#1106)
* **zoom:** Fix to pass domain arg on onzoom ([e1daae6](e1daae6)), closes [#1109](#1109)

### Features

* **arc:** Intent to ship pie/donut.startingAngle ([b84be8e](b84be8e)), closes [#1128](#1128)
* **axis:** Intent to ship axes.domain ([355b0bd](355b0bd)), closes [#1090](#1090)
* **data:** Intent to ship data.labels.overlap ([90792fa](90792fa)), closes [#977](#977)
* **data:** Intent to ship data.labels.position dataset ([dd5ba44](dd5ba44)), closes [#1126](#1126)
* **data:** Pass element arg for data callbacks ([bb9f952](bb9f952)), closes [#1100](#1100)
* **options:** Intent to ship background ([493c2a3](493c2a3)), closes [#1131](#1131)
* **options:** Intent to ship render option ([b6af77f](b6af77f)), closes [#1015](#1015)
* **plugin:** Intent to ship TextOverlap ([728e879](728e879)), closes [#1048](#1048)
@netil
Copy link
Member Author

netil commented Nov 22, 2019

🎉 This issue has been resolved in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@netil netil added the released label Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant