So I have this code which shows up my Mysql data in chart.js. Basically everything works but i just want to change the date into days This is what I have Current Chart And this is what I want to achieve My goal Whatever i try i get never the result i want to get. Here is all of my
Tag: javascript
Why to use Object.assign() to update functional component props change?
I have a list of students and I display them on the table. There are two buttons that indicate by which value should I sort the list (name or birthdate). When the button is clicked and I sort the list, the list itself is getting sorted, but it’s not updating if I don’t assign the list to the new l…
function is declared but its value is never read : React
I am new to Reactjs so forgive me if this is lame. I am following the Reactjs docs for learning React and during the self implementation of exercise in components and props. And I encountered following weird behaviour: In the ‘Comment’ function <UserInfo ../> tag is working fine but <comm…
how to apply a mask to an item coming from an API with Javascript
I have a basic CRUD situation, where in the form, when I send the data, it inserts the mask normally, and when sending it to my local API, I format it and leave it in numeric format. But how am I going to apply the mask again on the item being displayed in a grid? in my form, is like
How to return the variant values of each product if that product is a variant?
I have a database in MongoDB like this Now I want to return data where 500 GB has been in productId 1 and 3 The response should be like this: I have the possible values that I store in another collection for variantPossible values. The values that i am storing are like this: I want to return the variant value…
Firestore is super slow to retrieve documents even though an index is created
I am having trouble with Firestore in production. There is a collection I am trying to query and it has about 200-300 documents. It’s a simple query being done through a Cloud Function. I’ve setup a timer to log the duration of each query. This one takes about 2-4 seconds This one takes another 2-…
this.props.navigation.navigate() not working
I want the app to check if there’s a user logged in (firebase authentication). If there is, navigate to one page (react navigation v5), if there isn’t, to another. I have the following code: In App.js In Loading.js I get an error which says: TypeError: undefined is not an object (evaluating ‘…
Difference between component API and Backend API?
Hi guys this is a question based on a scenario. Implementing autocomplete widget where it, fetch data from backend render results as a tree support for radio, checkbox , icons In here what does the component’s API looks like? what does the backend API looks like? I know what is an API but this makes me …
How to hide password from user when password protecting a page [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question How Can I Hide The Passcode so someone can’t just inspect the elemen…
Read JSON that is in website source in client-side vanilla javascript
I have a simple JSON file sitting in a data folder within the source of my website. In a javascript script I want to read the JSON and update the DOM with the information inside. The file structure of my website is like this I obviously can’t use require() from nodejs because this is on the client side.…