I wrote a gantt chart using 'dhtmlxGantt' in vue. The data I want to put into the gantt chart is in my database, I get it by 'get' method and put it into a variable called 'data'.
If it is normal flow, you have to draw the event on the gantt chart on the screen with this data, but there is a problem here. The lifecycle section that fetches the data is called 'created', but no events are drawn on the screen. It has been determined that retrieving data from the database is successful.
I think the event that draws a chart on the screen first appears first, then the data is loaded. This is because there is nothing in the variable 'data' before the drawing event is applied to the screen.
How can I generate an event that draws a chart on the screen after the data is loaded? Is this a lifecycle matter? I wonder if anyone has a similar problem.
Related
I am writing an app for hotel registration. There are multiple fillup forms to get all relevant information/data. But I have kept each fillup form in different class. There are next and back buttons at the bottom of screen. I have created several global variables so that they can be accessed throughout the project.
For screen changes on next button taps, I have created a list of form screens.
List<Widget> formScreens = [personal_info,login_creds, bank_details,hotel_configs]
So when I Tap Next button there is a global variable (index) which changes value by +1 to iterate over formScreens.
setState(){
globals.index-=-1;
}
I have created these naviagators (next and back buttons) in a different class. They also work fine.
But When I tap on the Next button, Build method, which controlls all the different components and creates a body, isn't called immediatly, thus not updating screen to the next screen. But when I tap on any of the formFields, build method is invoked and the screen changes to next fillup form.
This is on my first screen, so there is no back button
I have segregated each component because it was fairly large amount of code to be kept in a single class.
Or is there any other way that I can use segregated components and access them throughout the project?
I have dgrid with paging, 50 rows per page, and using a memory store
The last 2 columns are editable select and filtering select, so when I change page it takes some time.
The problem is that there is not indication to the user that something is happening.
No loading message or a spinning image.
So I want to know if there is an event that fires up before the change of page, so I can manually show a spinner.
So far I have not been able to find such an event.
I used firebug to listen to all click that fires up when I click on the grid, and clicked on the next button to see what will happen.
The only event that fired up was after the rendering of the page. Before the rendering I got nothing.
So how can I show a busy indicator to user when I change page on the dgrid?
A div with the class dgrid-loading is added to the content area of the grid when Pagination loads a new page, and that div spans the full width and height of the content area. You can add styles to this class to add a loading indicator.
You can also add a loading message via the grid's loadingMessage property.
There's an explanation and demonstration of the loading node in the Grids and Stores tutorial in the Customizing Messages section.
I have a GridView in SemanticZoom.ZoomedOutView. When I set the GridViews ItemClick it never gets called. How do I put a custom action to the click? I want to do a slihtly different logic.
(Please do not answer like you should not do this, it is the clients wish and the cannot be persuaded)
I created a custom Grid implementing ISemanticZoomInformation and used it in the ZoomedOutView, the GridView as its child.
I summed it up in a blog post: http://blog.kulman.sk/customizing-semantic-zoom-in-windows-8-apps/
I have a tabpanel with 4 lists as child items. When each list is shown I want to load it's data. When I launch the app all 4 show events fire even though only the first tab is active. Is this how it's supposed to be? I could use activeitemchange of the tabpanel to populate the lists but I want to keep the code separate for each list. It doesn't make sense having the tabpanel control it's child items.
There's another event call 'painted' which fires whenever a component as actually shown to the user. I don't know what the difference between 'show' and 'painted' is but this seems to fix my problem.
So I have an app I am using to learn more about touch. I got the basic framework setup based on tutorials I have found around the net where I can bounce around the app clicking on things. I integrated a sencha touch line chart which works fine.
The problem is I want to populate the series labels for the chart based on data that comes back from the server, not hard code the labels. My plan was to once execute:
Ext.redirect('Chart/Index');
I would hit that controller and load the store. In the onLoad listener for the store, once the data is returned, populate the title array in the series and render the chart. I tried to attach a customer listener to the chart view, and then execute it from the store listener.
listeners: {
load:function(el,records, success){
App.fireEvent('myListener', records);
}
},
That isn't working for me, listener is undefined (I do have it defined in the chart view). So that isn't my solution.
Then I tried to give the chart an id, and do a Ext.query(#myChartName); That returned a html element, not something wrapped in Ext that can be executed.
Now it extsj4, I can put a listener for a store in the controller, and define a method in the controller to execute. It can easily access any component within the controller and would be how I would solve this issue. But that doesn't seem to be how MVC works in the touch apps. The examples I have seen are laid out drastically different in fact. (Why is that btw?)
What's my best solution in taking the data in my store after load and populating the labels/legend in my chart?
UPDATE
Added links to the code in question. I am trying to add strings (the label names) to the title array in the series. Notice the Chart View & the Store.
Chart view
http://jsfiddle.net/5JhCu/2/
Controller
http://jsfiddle.net/3C4Tq/1/
Store
http://jsfiddle.net/LT6eh/
FYI, I tried adding the listener to multiple things/objects like the app, the view, within the controller, still no luck.
Did you try Ext.getCmp('myChartId') to get access to the chart component?