-
Notifications
You must be signed in to change notification settings - Fork 52
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
[WIP] Browsable time slider #31
base: main
Are you sure you want to change the base?
Conversation
Hi, this caught my attention that actualType should be replaced with pie, line or bar. What do you think?? |
actualType holds the actual type of the graph, which is returned by the
function determineType, that function is just responsible for returning the
type of the graph. Does that make sense?
…On Wed, May 29, 2019, 12:05 AM Sourav Sahoo ***@***.***> wrote:
Hi, this caught my attention that actualType should be replaced with pie,
line or bar. What do you think??
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZYFX6G2T6SCPII637TPXV3ODA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWNBKLY#issuecomment-496637231>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ2AO2IX76TQE46VIYTPXV3ODANCNFSM4HQFE3TQ>
.
|
Hi @IshaGupta18 ! I had a feeling similar to @Souravirus . Maybe we could use |
Yeah understood @IshaGupta18 |
So anyone has any ideas? |
I like `graphType`!
…On Wed, May 29, 2019 at 8:46 AM Isha Gupta ***@***.***> wrote:
So anyone has any ideas?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AAAF6J2ZYKHSHBEKRDNSFWTPXZ3JXA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWPGVFQ#issuecomment-496921238>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J746LNU2SH7ZXBECNLPXZ3JXANCNFSM4HQFE3TQ>
.
|
Alright, the name of the variable is changed now. What do you all think might be causing the error? |
I think it may be necessary to wrap your code (esp the line causing the error) in a function which can be run after all the prerequisites are loaded. I think it may be a load-time issue. You can wrap your code in: $( document ).ready(function onReady() {
// your code here; it'll run after jQuery is loaded!
}); If that doesn't work, a more basic way to do this is: (function onReady() {
// this code will be delayed in execution until the page is completely loaded
})() Worth a try! |
I tried putting up the entire code, since its all co-dependent, but the error still persists, I feel it was something to with the |
Does anyone have other ideas that could be tried on? @Souravirus. @sagarpreet-chadha @rexagod, could you have a glance here? |
@IgorWilbert @geekychasser any suggestions? |
@IshaGupta18 sorry, could you please recap? What is the error message you are getting now? I saw that on #22, you solved the carroussel problem. |
Refer to this comment as well! |
@IshaGupta18 I hope this does not sound obvious. Your CDN is trying to use |
@IgorWilbert , so the fiddle works fine, and my implementation is very similar to the fiddle, that is why, I am not able to understand, why this one is creating a problem. I think it was to do something with the |
@IshaGupta18 I see. I guess it is unlikely that there is a problem with the |
Let me try it out and get back to you, in the meantime, if you find
anything else interesting, do let me know! Thanks a lot. Also, could you
please look at a couple of issues like #30, #26 and #17? Thanks again!
…On Sun, Jun 2, 2019, 10:38 PM igorwilbert ***@***.***> wrote:
@IshaGupta18 <https://github.com/IshaGupta18> I see. I guess it is
unlikely that there is a problem with the initial variable, unless if
only a given range is allowed (you could test changing its value to [3,
10] for example). Are you able to print to the console the props of
RangeSliderChart ? The values for chartData, chartOpts, chartType,
chartCTX, class and initial are all valid? If yes, then it might be that
the browser needs the graph before it is rendered. In this case, you could
try assigning new RangeSliderChart to a variable and setting a timeout
when calling the variable: Window.setTimeout(myVariable(), 3000);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ4JX4Y3J5KV6SUSCGDPYP475A5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXZ4EQ#issuecomment-498048530>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ5LFJ2UWNK5L2DF7MDPYP475ANCNFSM4HQFE3TQ>
.
|
Okay so we have made some progress here, the bug is removed now, however, there is a new problem, which seems fixable but I can't seem to recall how: |
Hi @IshaGupta18, in this line, just call the getContext function as is told in this answer: https://stackoverflow.com/a/48895731/7806855 simple-data-grapher/src/parsing.js Line 175 in de6e403
See if this works. |
Hmm, can you describe the problem? I think what I'm seeing is the graph getting generated over and over. |
@Souravirus I think this didn't work out. |
Okay, so before I could have started debugging this yet again, I found that the cdn link is broken, which was working fine till yesterday, but all of a sudden it has stopped working. @jywarren @Souravirus does anyone of you have an alternative for the slider thing? Thanks a ton! |
Checking if I can get something @IshaGupta18. |
That would be great, thank you!
…On Fri, Jun 7, 2019, 10:54 PM Sourav Sahoo ***@***.***> wrote:
Checking if I can get something @IshaGupta18
<https://github.com/IshaGupta18>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ4SVOP7RBJYTO7GSA3PZKKU5A5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXGO4PA#issuecomment-499969596>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ2POTNYXDLHUOLD4MDPZKKU5ANCNFSM4HQFE3TQ>
.
|
Hi @IshaGupta18, see if it can be downloaded from yarn because it is available in npm also, here is the link for npm: https://www.jsdelivr.com/package/npm/chart.js-rangeslider |
Any other alternatives for the slider? |
See if this rangeslider will work: https://rangeslider.js.org/ |
Oh will try this one! Thanks!
…On Sat, Jun 8, 2019, 1:18 AM Sourav Sahoo ***@***.***> wrote:
See if this rangeslider will work: https://rangeslider.js.org/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZYEDTAQZV7AT4JV2OLPZK3PTA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXG2HMI#issuecomment-500016049>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ4SY7YLCTJI6ARV7F3PZK3PTANCNFSM4HQFE3TQ>
.
|
Actually, the rangeslider has to be integrated with chart.js, I think the
current one uses this one only internally. So we need an in built or an
integrable feature. What do you think of using plotly instead of chart.js?
…On Sat, Jun 8, 2019, 1:44 AM Isha Gupta ***@***.***> wrote:
Oh will try this one! Thanks!
On Sat, Jun 8, 2019, 1:18 AM Sourav Sahoo ***@***.***>
wrote:
> See if this rangeslider will work: https://rangeslider.js.org/
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#31?email_source=notifications&email_token=AJXHQZYEDTAQZV7AT4JV2OLPZK3PTA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXG2HMI#issuecomment-500016049>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AJXHQZ4SY7YLCTJI6ARV7F3PZK3PTANCNFSM4HQFE3TQ>
> .
>
|
Yeah fine for me if it serves the purpose. |
Hi @IshaGupta18 I think what was suggested was that we include https://www.jsdelivr.com/package/npm/chart.js-rangeslider via NPM as a dependency in our package.json and then use it locally. Can you run |
I could try a hand at it for sure, although after working a lot with this,
trying it locally and experimenting with it, I am not too sure how stable
this would be.
…On Wed, Jun 12, 2019, 12:09 AM Jeffrey Warren ***@***.***> wrote:
Hi @IshaGupta18 <https://github.com/IshaGupta18> I think what was
suggested was that we include
https://www.jsdelivr.com/package/npm/chart.js-rangeslider via NPM as a
dependency in our package.json and then use it locally. Can you run npm
install chart.js-rangeslider and reference it locally?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ7WCMYLM46ATOG74O3PZ7WPRA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXODLYQ#issuecomment-500970978>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZZY37SVIW7UD2W5NPLPZ7WPRANCNFSM4HQFE3TQ>
.
|
The advantage of using npm to include it would be that you could pin it to
a specific version and then you don't have to rely on their uptime or
version stability to ensure you get exactly the same file each time. So
could that help? Or what are the issues you're worried about re: stability?
Thanks!
…On Tue, Jun 11, 2019 at 2:47 PM Isha Gupta ***@***.***> wrote:
I could try a hand at it for sure, although after working a lot with this,
trying it locally and experimenting with it, I am not too sure how stable
this would be.
On Wed, Jun 12, 2019, 12:09 AM Jeffrey Warren ***@***.***>
wrote:
> Hi @IshaGupta18 <https://github.com/IshaGupta18> I think what was
> suggested was that we include
> https://www.jsdelivr.com/package/npm/chart.js-rangeslider via NPM as a
> dependency in our package.json and then use it locally. Can you run npm
> install chart.js-rangeslider and reference it locally?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#31?email_source=notifications&email_token=AJXHQZ7WCMYLM46ATOG74O3PZ7WPRA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXODLYQ#issuecomment-500970978
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AJXHQZZY37SVIW7UD2W5NPLPZ7WPRANCNFSM4HQFE3TQ
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AAAF6J2ZYJCX76PLSHU54GDPZ7XKPA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOEBMA#issuecomment-500973744>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J5ORWTLKKLAKLMBPKLPZ7XKPANCNFSM4HQFE3TQ>
.
|
I will try this approach out, and then we can discuss on the stability
issues? Thanks a lot!
On Wed, Jun 12, 2019, 4:34 AM Jeffrey Warren <[email protected]>
wrote:
… The advantage of using npm to include it would be that you could pin it to
a specific version and then you don't have to rely on their uptime or
version stability to ensure you get exactly the same file each time. So
could that help? Or what are the issues you're worried about re: stability?
Thanks!
On Tue, Jun 11, 2019 at 2:47 PM Isha Gupta ***@***.***>
wrote:
> I could try a hand at it for sure, although after working a lot with
this,
> trying it locally and experimenting with it, I am not too sure how stable
> this would be.
>
> On Wed, Jun 12, 2019, 12:09 AM Jeffrey Warren ***@***.***>
> wrote:
>
> > Hi @IshaGupta18 <https://github.com/IshaGupta18> I think what was
> > suggested was that we include
> > https://www.jsdelivr.com/package/npm/chart.js-rangeslider via NPM as a
> > dependency in our package.json and then use it locally. Can you run npm
> > install chart.js-rangeslider and reference it locally?
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <
>
#31?email_source=notifications&email_token=AJXHQZ7WCMYLM46ATOG74O3PZ7WPRA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXODLYQ#issuecomment-500970978
> >,
> > or mute the thread
> > <
>
https://github.com/notifications/unsubscribe-auth/AJXHQZZY37SVIW7UD2W5NPLPZ7WPRANCNFSM4HQFE3TQ
> >
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#31?email_source=notifications&email_token=AAAF6J2ZYJCX76PLSHU54GDPZ7XKPA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOEBMA#issuecomment-500973744
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AAAF6J5ORWTLKKLAKLMBPKLPZ7XKPANCNFSM4HQFE3TQ
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ4BTXCHKXSQRBRGFFTP2AVP7A5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOYCAI#issuecomment-501055745>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ5SZXNX7DC75HU5L4DP2AVP7ANCNFSM4HQFE3TQ>
.
|
In terms of stability I feel that it doesn't always work, sometimes it's
CDN keeps breaking, or the errors are ambiguous. I feel that, not very
sure, in the long run this might be a little hard to maintain.
…On Wed, Jun 12, 2019, 10:04 AM Isha Gupta ***@***.***> wrote:
I will try this approach out, and then we can discuss on the stability
issues? Thanks a lot!
On Wed, Jun 12, 2019, 4:34 AM Jeffrey Warren ***@***.***>
wrote:
> The advantage of using npm to include it would be that you could pin it to
> a specific version and then you don't have to rely on their uptime or
> version stability to ensure you get exactly the same file each time. So
> could that help? Or what are the issues you're worried about re:
> stability?
> Thanks!
>
> On Tue, Jun 11, 2019 at 2:47 PM Isha Gupta ***@***.***>
> wrote:
>
> > I could try a hand at it for sure, although after working a lot with
> this,
> > trying it locally and experimenting with it, I am not too sure how
> stable
> > this would be.
> >
> > On Wed, Jun 12, 2019, 12:09 AM Jeffrey Warren ***@***.***
> >
> > wrote:
> >
> > > Hi @IshaGupta18 <https://github.com/IshaGupta18> I think what was
> > > suggested was that we include
> > > https://www.jsdelivr.com/package/npm/chart.js-rangeslider via NPM as
> a
> > > dependency in our package.json and then use it locally. Can you run
> npm
> > > install chart.js-rangeslider and reference it locally?
> > >
> > > —
> > > You are receiving this because you were mentioned.
> > > Reply to this email directly, view it on GitHub
> > > <
> >
> #31?email_source=notifications&email_token=AJXHQZ7WCMYLM46ATOG74O3PZ7WPRA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXODLYQ#issuecomment-500970978
> > >,
> > > or mute the thread
> > > <
> >
> https://github.com/notifications/unsubscribe-auth/AJXHQZZY37SVIW7UD2W5NPLPZ7WPRANCNFSM4HQFE3TQ
> > >
> > > .
> > >
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <
> #31?email_source=notifications&email_token=AAAF6J2ZYJCX76PLSHU54GDPZ7XKPA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOEBMA#issuecomment-500973744
> >,
> > or mute the thread
> > <
> https://github.com/notifications/unsubscribe-auth/AAAF6J5ORWTLKKLAKLMBPKLPZ7XKPANCNFSM4HQFE3TQ
> >
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#31?email_source=notifications&email_token=AJXHQZ4BTXCHKXSQRBRGFFTP2AVP7A5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOYCAI#issuecomment-501055745>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AJXHQZ5SZXNX7DC75HU5L4DP2AVP7ANCNFSM4HQFE3TQ>
> .
>
|
Hi @IshaGupta18 ! Are you still facing stability issues with npm? If yes, what are the error messages you are getting? |
@IgorWilbert I am yet to try the suggested approach. Once I do, I will bet back to you. Thanks a lot! |
Okay so https://www.jsdelivr.com/package/npm/chart.js-rangeslider address doesn't contain the npm anymore, and here's the link to the issue: schme16/Chart.js-RangeSlider#17 which I am facing, however, it didn't work with this file as well, the test example they have given in their repo shows the same error. I am still gonna give a shot to the npm method somehow, but I am not too sure of its working. |
So I included it through npm, however we are still supposed to include the script file as, so I tried that, and I am facing the same error: I honestly feel that we should look for an alternative now, as this one is very unstable ie. it is not working within its own example (one in the repo and one in a fiddle) and it's not very regularly maintained. If we decide to shift to plotly.js, we won't be needing a slider at all, as zooming and panning is built in. What do you think @jywarren @IgorWilbert ? |
@IshaGupta18 have you make significant work (I mean, that it would take a long time to redo) based on chart.js? I believe what @jywarren meant in #34 was to use both plotly and chart.js by passing an identifier to a function. However, in my opinion, using both libraries can make the code a little harder to understand and maintain, so I would avoid doing that. |
We will have to rearrange some data structures I believe, it will take some
time though. I think what he means is, is to separate the code for both the
libraries and pass an identifier, to use which one when, as and when
required. Keeping both of the library's code in the same file will create
confusion, like you said.
…On Mon, Jun 17, 2019, 12:29 AM igorwilbert ***@***.***> wrote:
@IshaGupta18 <https://github.com/IshaGupta18> have you make significant
work (I mean, that it would take a long time to redo) based on chart.js? I
believe what @jywarren <https://github.com/jywarren> meant in #34
<#34> was to use
both plotly and chart.js by passing an identifier to a function. However,
in my opinion, using both libraries can make the code a little harder to
understand and maintain, so I would avoid that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ3377AX6R52D5MPSMLP22ESNA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZTCKI#issuecomment-502477097>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZ45KVOKFJ4HHX55RG3P22ESNANCNFSM4HQFE3TQ>
.
|
@IshaGupta18 yay, now we have plotly! Do you already know how we can continue working on the slider? |
Despite trying so much for so long, I was unable to figure it out :( But
since we have plotly now, that functionality is good to go I believe!
…On Sun, Jun 30, 2019, 7:07 PM igorwilbert ***@***.***> wrote:
@IshaGupta18 <https://github.com/IshaGupta18> yay, now we have plotly! Do
you already know how we can continue working on the slider?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AJXHQZ52N3XK36XXW2AYFWLP5CZKTA5CNFSM4HQFE3T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY4MLIQ#issuecomment-507037090>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJXHQZYBFSI6NXCQ2NN4ZZDP5CZKTANCNFSM4HQFE3TQ>
.
|
@jywarren @Souravirus here's the code for #22. Lets work to resolve this bug or find a workaround for this