How to 'show/hide' specific JSON Objects (TimelineJS)? - javascript

I am using Timeline JS with JSONP as my source file.
The final product will be one timeline about two separate histories (which are related).
I need to be able to show/hide each history's timeline elements so that you can view one and not the other.
Default, of course, shows both histories simultaneously.
Thank you

Related

In Qualtrics, how to dynamically connect two sliders?

In Qualtrics, I would like to establish a relationship between two sliders (using the "Draggable Sliders" question type).
One slider would dynamically decrease the value of another slider by the same amount. The user should be able to adjust only the first slider, which would automatically adjust the second slider and its associated value (which should be displayed and updated with the dynamic adjustment).
Does anyone have a suggestion for the javascript necessary to establish this type of relationship between two sliders in Qualtrics?
Right - you could start with the custom sliders, but that won't dynamically update. It will only force a constant sum.
If you go to innovation exchange linked below you can download an example of survey that does this though.
You have to upload the survey to qualtrics, and the only way at least I'm familiar with this is to go into an existing survey and go to the advanced options. You'll find "Import Survey," which is what you want. Import that QSF file and you'll have a version of the slider to play with.
This is the link with more info and the qsf file.
http://www.qualtrics.com/innovation-exchange/dan-ariely-tradeoff-question/
Here's a link with a preview I just mocked up. Not pretty, but I'm sure you can toy with the css.
https://az1.qualtrics.com/jfe3/preview/SV_6lIzOgpiSm91X4F

Component based frontend UI design

We're planning a front end application where you can continuously add/remove UI components in the stage. You can configure them in place and finally can publish the stage (web page).
We’ve an inventory of components. The components are categorized. For example: headers, sidebars. In the inventory they will show a preview (may be an image) of the available components in that category.
An item can be added to the stage (traditionally a simple web page) from the inventory. The stages are related to inventory categories. For example, in the stage, there is one “headers containers” where you can add component only for headers inventory.
Each category may have own rule. For example, You can’t add more than one component in the in “headers containers” (which is in the stage/page) from headers inventory category. However, you can add as many item as you want in the “sidebar containers”.
In the same way, each component may have own rules. Each component may render differently and may have different configuration option. For example, you add an header component from “headers inventory” which has logo, background image. But another may not have background image. Unless a component has a feature (e.g. background image), it won’t be available in the configuration panel.
All of the above components will always work except previewing in inventory. That means, as soon as they’re added to stage, they’re live element, they should work as they should with default settings (unless configured). They will communicate in the backend services to get/save data.
Persisting data: We also want to persists data among the switching of the components (of same type). For example, if you add one header component added on the stage which you configured to have own your logo, switching to another header component (which also has support for logo) should keep the old selected logo.
I am also thinking it will be very good if we can everything a component. For example, logo is a component, background image is a component. Each of them should work independently, with own configurator (file upload button for logo component), validation (check file types for logo component) etc.. The previously mentioned each header component will be container of several components which can hold any number of components and can work as bridge among those components (like merging all the configuration in the same interface rather than individually).
My current thoughts are:
Backbone.js
jQuery UI Widget Factory
But both will require lots of fundamental job at our end. Is there any framework/library that already solved most or some of the problems we’re trying to solve. I am not sure whether Angular.js directive based solution will be good here too. Any suggestion towards that is highly appreciated
If I understand you correctly you want to build a dashboard like functionality. Try taking a look at sDashboard https://github.com/ModelN/sDashboard or commercial options like droptiles http://www.droptiles.com/ or razorflow http://razorflow.com/

"Flip View" of ListViews for Windows8

I would like to create a "FlipView" of ListViews in Windows8 using JS and HTML. That is, I would like a control that would display a ListView and when the user swips or scrolls, it would display the contents of a different ListView. Is this possible? If so, how? Thanks for helping a Windows8 noob!
My attempt to put a listview under flipview, was not successful. css classes used by both controls overlap (e.g. win-item). I found that items in the nested list view occupied the whole available space like flip view item. This behavior was happening because the win-container hosting the nested list view item, was sized like that. I could not set its (win-container) size explicitly to smaller size even after overriding it in css file.
It does not look like that list view will work nested under a flip view for css/html. If any one else has had success with this, do share your comments and code.
if anyone had tried it in c# using FlipView and nested GridView/ListView and had success, do mark a answer with code (will be interesting to know).

Linking 2 graphs for selection?

I have two graphs on a page that shares unique elements (Names of entities) and I want to be able to click on one and it will highlight the element in both graphs. I think this used to be called linking but was removed in recent d3 revisions. Is this still possible somehow?

Reordering the results of several asynchronous requests

I need some conceptual help:
I am trying to display a page that contains a single table with a lot of data (moderately big number of rows, very big number of columns), and I want that page to be as fast and smooth as possible from the user's point of view. What I am doing is the following:
Retrieve a list containing the database primary keys of the elements to be displayed in the table.
Iterate through the list, asynchronously request each element given its primary key, and, every time element is retrieved, add it to the table.
Each of these retrieval operations is implemented as a Web service call.
Now my questions are the following:
How can I reorder the elements if they arrive in a different order than they were requested? (It is absolutely essential for me that these elements be inserted in the table in the same positions as their respective primary keys were in the original list.)
Can this strategy be made compatible with any of the main JavaScript grid controls available out there? (Without me having to modify or understand how these controls internally work, of course.)
I think you can look into the jQuery DataTables plugin. It is quite a powerful tool to display data in a tabular format.

Categories

Resources