Setting Dates for a Visualization [Reactjs]
up vote
0
down vote
favorite
So I am using Chart.js for my data visualization. And the visualization is being made with this data:
var productionData =
labels: ["10-15-2018", "10-16-2018", "10-17-2018", "10-18-2018", "10-19-2018", "10-20-2018"],
datasets: [producedData, defectsData, qiData, safetyData, workerData, overtimeData, downtimeData]
;
This currently, displays data for all dates from 10-15-2018 to 10-20-2018 but I want to be able to take subsets like persay 10-16-2018 to 10-19-2018.
I have already added two date textfields that a user will use so they can only see data between the two selected dates that they chose (inclusive).
example of textfield:
<Grid item xs=6 style= marginTop: 10, marginBottom: 10 align="center">
<TextField
id="initialDate"
label="Initial Date"
type="date"
defaultValue="2018-10-15"
/>
</Grid>
However, I am unsure as to how to implement that. Is there a way to iterate through each of the dates between the two selected dates, place them in an and then add them to the 'labels' part of the visualization configuration?
what are yalls thoughts? If you need more info, feel free to ask!
reactjs date uitextfield
add a comment |
up vote
0
down vote
favorite
So I am using Chart.js for my data visualization. And the visualization is being made with this data:
var productionData =
labels: ["10-15-2018", "10-16-2018", "10-17-2018", "10-18-2018", "10-19-2018", "10-20-2018"],
datasets: [producedData, defectsData, qiData, safetyData, workerData, overtimeData, downtimeData]
;
This currently, displays data for all dates from 10-15-2018 to 10-20-2018 but I want to be able to take subsets like persay 10-16-2018 to 10-19-2018.
I have already added two date textfields that a user will use so they can only see data between the two selected dates that they chose (inclusive).
example of textfield:
<Grid item xs=6 style= marginTop: 10, marginBottom: 10 align="center">
<TextField
id="initialDate"
label="Initial Date"
type="date"
defaultValue="2018-10-15"
/>
</Grid>
However, I am unsure as to how to implement that. Is there a way to iterate through each of the dates between the two selected dates, place them in an and then add them to the 'labels' part of the visualization configuration?
what are yalls thoughts? If you need more info, feel free to ask!
reactjs date uitextfield
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
So I am using Chart.js for my data visualization. And the visualization is being made with this data:
var productionData =
labels: ["10-15-2018", "10-16-2018", "10-17-2018", "10-18-2018", "10-19-2018", "10-20-2018"],
datasets: [producedData, defectsData, qiData, safetyData, workerData, overtimeData, downtimeData]
;
This currently, displays data for all dates from 10-15-2018 to 10-20-2018 but I want to be able to take subsets like persay 10-16-2018 to 10-19-2018.
I have already added two date textfields that a user will use so they can only see data between the two selected dates that they chose (inclusive).
example of textfield:
<Grid item xs=6 style= marginTop: 10, marginBottom: 10 align="center">
<TextField
id="initialDate"
label="Initial Date"
type="date"
defaultValue="2018-10-15"
/>
</Grid>
However, I am unsure as to how to implement that. Is there a way to iterate through each of the dates between the two selected dates, place them in an and then add them to the 'labels' part of the visualization configuration?
what are yalls thoughts? If you need more info, feel free to ask!
reactjs date uitextfield
So I am using Chart.js for my data visualization. And the visualization is being made with this data:
var productionData =
labels: ["10-15-2018", "10-16-2018", "10-17-2018", "10-18-2018", "10-19-2018", "10-20-2018"],
datasets: [producedData, defectsData, qiData, safetyData, workerData, overtimeData, downtimeData]
;
This currently, displays data for all dates from 10-15-2018 to 10-20-2018 but I want to be able to take subsets like persay 10-16-2018 to 10-19-2018.
I have already added two date textfields that a user will use so they can only see data between the two selected dates that they chose (inclusive).
example of textfield:
<Grid item xs=6 style= marginTop: 10, marginBottom: 10 align="center">
<TextField
id="initialDate"
label="Initial Date"
type="date"
defaultValue="2018-10-15"
/>
</Grid>
However, I am unsure as to how to implement that. Is there a way to iterate through each of the dates between the two selected dates, place them in an and then add them to the 'labels' part of the visualization configuration?
what are yalls thoughts? If you need more info, feel free to ask!
reactjs date uitextfield
reactjs date uitextfield
edited Nov 9 at 19:59
asked Nov 9 at 19:52
DevAllanPer
6110
6110
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232442%2fsetting-dates-for-a-visualization-reactjs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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