Doubled Nov 4th label in visualization












0















I just find there exist two data records with labeled date "Nov 4th" on the chart though I got the right data.
See Screenshot



Here is the code I wrote:



new Keen.Dataviz()
.el('#actionChart')
.title(' ')
.chartOptions({
axis: {
y: {
label: {
text: 'Count',
position: 'outer-middle'
},
min: 0,
padding: { bottom: 0 }
},
}
})
.height(300)
.colorMapping({
Presented: ANALYTICS_COLORS[1],
Facebook: ANALYTICS_COLORS[3],
SMS: ANALYTICS_COLORS[2]
})
.type('line')
.stacked(false)
.prepare();


});



and the data I got:



{"result": [{"value": [{"action": "presented", "result": 1661}, {"action": "selected_facebook", "result": 21}], "timeframe": {"start": "2018-11-01T07:00:00.000Z", "end": "2018-11-02T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1398}, {"action": "selected_facebook", "result": 9}], "timeframe": {"start": "2018-11-02T07:00:00.000Z", "end": "2018-11-03T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1718}, {"action": "selected_facebook", "result": 17}], "timeframe": {"start": "2018-11-03T07:00:00.000Z", "end": "2018-11-04T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1498}, {"action": "selected_facebook", "result": 16}], "timeframe": {"start": "2018-11-04T07:00:00.000Z", "end": "2018-11-05T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1330}, {"action": "selected_facebook", "result": 10}], "timeframe": {"start": "2018-11-05T07:00:00.000Z", "end": "2018-11-06T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1351}, {"action": "selected_facebook", "result": 20}], "timeframe": {"start": "2018-11-06T07:00:00.000Z", "end": "2018-11-07T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1819}, {"action": "selected_facebook", "result": 12}], "timeframe": {"start": "2018-11-07T07:00:00.000Z", "end": "2018-11-08T07:00:00.000Z"}}]}


I tried the latest .js file, and same problem happens



also, add



axis: {
x: {
localtime: false
}
},


does not work, see here










share|improve this question

























  • The reason is that I sent the request with specific timezone info

    – Tapir
    Dec 13 '18 at 23:02
















0















I just find there exist two data records with labeled date "Nov 4th" on the chart though I got the right data.
See Screenshot



Here is the code I wrote:



new Keen.Dataviz()
.el('#actionChart')
.title(' ')
.chartOptions({
axis: {
y: {
label: {
text: 'Count',
position: 'outer-middle'
},
min: 0,
padding: { bottom: 0 }
},
}
})
.height(300)
.colorMapping({
Presented: ANALYTICS_COLORS[1],
Facebook: ANALYTICS_COLORS[3],
SMS: ANALYTICS_COLORS[2]
})
.type('line')
.stacked(false)
.prepare();


});



and the data I got:



{"result": [{"value": [{"action": "presented", "result": 1661}, {"action": "selected_facebook", "result": 21}], "timeframe": {"start": "2018-11-01T07:00:00.000Z", "end": "2018-11-02T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1398}, {"action": "selected_facebook", "result": 9}], "timeframe": {"start": "2018-11-02T07:00:00.000Z", "end": "2018-11-03T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1718}, {"action": "selected_facebook", "result": 17}], "timeframe": {"start": "2018-11-03T07:00:00.000Z", "end": "2018-11-04T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1498}, {"action": "selected_facebook", "result": 16}], "timeframe": {"start": "2018-11-04T07:00:00.000Z", "end": "2018-11-05T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1330}, {"action": "selected_facebook", "result": 10}], "timeframe": {"start": "2018-11-05T07:00:00.000Z", "end": "2018-11-06T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1351}, {"action": "selected_facebook", "result": 20}], "timeframe": {"start": "2018-11-06T07:00:00.000Z", "end": "2018-11-07T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1819}, {"action": "selected_facebook", "result": 12}], "timeframe": {"start": "2018-11-07T07:00:00.000Z", "end": "2018-11-08T07:00:00.000Z"}}]}


I tried the latest .js file, and same problem happens



also, add



axis: {
x: {
localtime: false
}
},


does not work, see here










share|improve this question

























  • The reason is that I sent the request with specific timezone info

    – Tapir
    Dec 13 '18 at 23:02














0












0








0








I just find there exist two data records with labeled date "Nov 4th" on the chart though I got the right data.
See Screenshot



Here is the code I wrote:



new Keen.Dataviz()
.el('#actionChart')
.title(' ')
.chartOptions({
axis: {
y: {
label: {
text: 'Count',
position: 'outer-middle'
},
min: 0,
padding: { bottom: 0 }
},
}
})
.height(300)
.colorMapping({
Presented: ANALYTICS_COLORS[1],
Facebook: ANALYTICS_COLORS[3],
SMS: ANALYTICS_COLORS[2]
})
.type('line')
.stacked(false)
.prepare();


});



and the data I got:



{"result": [{"value": [{"action": "presented", "result": 1661}, {"action": "selected_facebook", "result": 21}], "timeframe": {"start": "2018-11-01T07:00:00.000Z", "end": "2018-11-02T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1398}, {"action": "selected_facebook", "result": 9}], "timeframe": {"start": "2018-11-02T07:00:00.000Z", "end": "2018-11-03T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1718}, {"action": "selected_facebook", "result": 17}], "timeframe": {"start": "2018-11-03T07:00:00.000Z", "end": "2018-11-04T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1498}, {"action": "selected_facebook", "result": 16}], "timeframe": {"start": "2018-11-04T07:00:00.000Z", "end": "2018-11-05T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1330}, {"action": "selected_facebook", "result": 10}], "timeframe": {"start": "2018-11-05T07:00:00.000Z", "end": "2018-11-06T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1351}, {"action": "selected_facebook", "result": 20}], "timeframe": {"start": "2018-11-06T07:00:00.000Z", "end": "2018-11-07T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1819}, {"action": "selected_facebook", "result": 12}], "timeframe": {"start": "2018-11-07T07:00:00.000Z", "end": "2018-11-08T07:00:00.000Z"}}]}


I tried the latest .js file, and same problem happens



also, add



axis: {
x: {
localtime: false
}
},


does not work, see here










share|improve this question
















I just find there exist two data records with labeled date "Nov 4th" on the chart though I got the right data.
See Screenshot



Here is the code I wrote:



new Keen.Dataviz()
.el('#actionChart')
.title(' ')
.chartOptions({
axis: {
y: {
label: {
text: 'Count',
position: 'outer-middle'
},
min: 0,
padding: { bottom: 0 }
},
}
})
.height(300)
.colorMapping({
Presented: ANALYTICS_COLORS[1],
Facebook: ANALYTICS_COLORS[3],
SMS: ANALYTICS_COLORS[2]
})
.type('line')
.stacked(false)
.prepare();


});



and the data I got:



{"result": [{"value": [{"action": "presented", "result": 1661}, {"action": "selected_facebook", "result": 21}], "timeframe": {"start": "2018-11-01T07:00:00.000Z", "end": "2018-11-02T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1398}, {"action": "selected_facebook", "result": 9}], "timeframe": {"start": "2018-11-02T07:00:00.000Z", "end": "2018-11-03T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1718}, {"action": "selected_facebook", "result": 17}], "timeframe": {"start": "2018-11-03T07:00:00.000Z", "end": "2018-11-04T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1498}, {"action": "selected_facebook", "result": 16}], "timeframe": {"start": "2018-11-04T07:00:00.000Z", "end": "2018-11-05T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1330}, {"action": "selected_facebook", "result": 10}], "timeframe": {"start": "2018-11-05T07:00:00.000Z", "end": "2018-11-06T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1351}, {"action": "selected_facebook", "result": 20}], "timeframe": {"start": "2018-11-06T07:00:00.000Z", "end": "2018-11-07T07:00:00.000Z"}}, {"value": [{"action": "presented", "result": 1819}, {"action": "selected_facebook", "result": 12}], "timeframe": {"start": "2018-11-07T07:00:00.000Z", "end": "2018-11-08T07:00:00.000Z"}}]}


I tried the latest .js file, and same problem happens



also, add



axis: {
x: {
localtime: false
}
},


does not work, see here







keen-io keen-js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 18:12







Tapir

















asked Nov 8 '18 at 22:37









TapirTapir

33




33













  • The reason is that I sent the request with specific timezone info

    – Tapir
    Dec 13 '18 at 23:02



















  • The reason is that I sent the request with specific timezone info

    – Tapir
    Dec 13 '18 at 23:02

















The reason is that I sent the request with specific timezone info

– Tapir
Dec 13 '18 at 23:02





The reason is that I sent the request with specific timezone info

– Tapir
Dec 13 '18 at 23:02












2 Answers
2






active

oldest

votes


















0














Find the reason from .call(function(){console.log(this.dataset);}):



the timezone is different. Before it's GMT-7, the last three






share|improve this answer


























  • but still don't know why it gets the different timezones, in raw data the they are the same

    – Tapir
    Nov 8 '18 at 22:55



















0














it's probably related to c3 local timezone conversion.
https://github.com/keen/keen-dataviz.js#date-format
To turn off the conversion use the code below:



const chart = new KeenDataviz({
container: '#some_container', // required
axis: {
x: {
localtime: false
}
}
});





share|improve this answer
























  • Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

    – Tapir
    Nov 14 '18 at 18:13











  • Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

    – Tapir
    Nov 14 '18 at 18:55











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53217204%2fdoubled-nov-4th-label-in-visualization%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Find the reason from .call(function(){console.log(this.dataset);}):



the timezone is different. Before it's GMT-7, the last three






share|improve this answer


























  • but still don't know why it gets the different timezones, in raw data the they are the same

    – Tapir
    Nov 8 '18 at 22:55
















0














Find the reason from .call(function(){console.log(this.dataset);}):



the timezone is different. Before it's GMT-7, the last three






share|improve this answer


























  • but still don't know why it gets the different timezones, in raw data the they are the same

    – Tapir
    Nov 8 '18 at 22:55














0












0








0







Find the reason from .call(function(){console.log(this.dataset);}):



the timezone is different. Before it's GMT-7, the last three






share|improve this answer















Find the reason from .call(function(){console.log(this.dataset);}):



the timezone is different. Before it's GMT-7, the last three







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 8 '18 at 22:56

























answered Nov 8 '18 at 22:50









TapirTapir

33




33













  • but still don't know why it gets the different timezones, in raw data the they are the same

    – Tapir
    Nov 8 '18 at 22:55



















  • but still don't know why it gets the different timezones, in raw data the they are the same

    – Tapir
    Nov 8 '18 at 22:55

















but still don't know why it gets the different timezones, in raw data the they are the same

– Tapir
Nov 8 '18 at 22:55





but still don't know why it gets the different timezones, in raw data the they are the same

– Tapir
Nov 8 '18 at 22:55













0














it's probably related to c3 local timezone conversion.
https://github.com/keen/keen-dataviz.js#date-format
To turn off the conversion use the code below:



const chart = new KeenDataviz({
container: '#some_container', // required
axis: {
x: {
localtime: false
}
}
});





share|improve this answer
























  • Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

    – Tapir
    Nov 14 '18 at 18:13











  • Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

    – Tapir
    Nov 14 '18 at 18:55
















0














it's probably related to c3 local timezone conversion.
https://github.com/keen/keen-dataviz.js#date-format
To turn off the conversion use the code below:



const chart = new KeenDataviz({
container: '#some_container', // required
axis: {
x: {
localtime: false
}
}
});





share|improve this answer
























  • Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

    – Tapir
    Nov 14 '18 at 18:13











  • Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

    – Tapir
    Nov 14 '18 at 18:55














0












0








0







it's probably related to c3 local timezone conversion.
https://github.com/keen/keen-dataviz.js#date-format
To turn off the conversion use the code below:



const chart = new KeenDataviz({
container: '#some_container', // required
axis: {
x: {
localtime: false
}
}
});





share|improve this answer













it's probably related to c3 local timezone conversion.
https://github.com/keen/keen-dataviz.js#date-format
To turn off the conversion use the code below:



const chart = new KeenDataviz({
container: '#some_container', // required
axis: {
x: {
localtime: false
}
}
});






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 12:40









AdamKasAdamKas

114




114













  • Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

    – Tapir
    Nov 14 '18 at 18:13











  • Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

    – Tapir
    Nov 14 '18 at 18:55



















  • Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

    – Tapir
    Nov 14 '18 at 18:13











  • Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

    – Tapir
    Nov 14 '18 at 18:55

















Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

– Tapir
Nov 14 '18 at 18:13





Thank you for the help, but it does not work somehow, I've attached the screenshot in the question

– Tapir
Nov 14 '18 at 18:13













Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

– Tapir
Nov 14 '18 at 18:55





Another problem is every time I call render(data) with the same chart object, the label showed when hover on the graph is duplicated with the latest data

– Tapir
Nov 14 '18 at 18:55


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53217204%2fdoubled-nov-4th-label-in-visualization%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python