Within the context of D3.js, what is a reusable chart? - d3.js

I tried searching for this online, but I was not able to find any proper explanation online. Help?

As explained in this article (http://bost.ocks.org/mike/chart/), a reusable chart can be used for inserting a chart into any DOM element, any number of times within the same page. And it also lets you use different data each time the chart is rendered.

Related

Use hierarchical tables in SlickGrid

We have a request from our designers to build tables something like this, with rows that expand to show essentially another sub-table underneath. In KendoUI documentation, this is called "Hierarchy."
We use SlickGrid v2.3 with a few additional plugins. We currently have tables with a similar row expand/collapse like this: https://mleibman.github.io/SlickGrid/examples/example5-collapsing.html . That does not allow for a completely different set of columns in the sub-table.
The question is, can this be done in SlickGrid or not?
It might be hard to do with current SlickGrid, there's no code that handles the hierarchical part itself so that would be lot of work to implement in SlickGrid. However it is implemented in Slickgrid-Universal, which is a wrapper on top of SlickGrid. You can see Example 5 and Example 6 which shows 2 types of Tree Data grids (hierarchical or parentId refs). We use it in production for a project that we have. Also note that this is not a grid within a grid, it's rather an expand/collapse the same as what you found in example5-collapsing.html, the only differences with SlickGrid is that Slickgrid-Universal has the code to deal with hierarchical data (filtering/sorting) while SlickGrid itself doesn't and also another nice to know thing is that expand/collapse is actually using data filtering behind the scene and you can see that in the total items displayed when you have the footer enabled.
Please note that I'm the author of Slickgrid-Universal and also a major contributor to SlickGrid as well
At the moment, it can't be done. In order to achieve its speed, Slickgrid enforces a fixed row height and a single scrolling canvas. It's just a different approach than used by HTML display grids.
You could put together a workaround using mutiple slickgrids or an embedded slickgrid in a group row, I suppose, but it would be messy.
One thing I have done is develop a SlickCombo, which is essentially a grid presented as a multi-column dropdown. It's a full grid and can offer editing.
That's probably as close as you'd get.
A comment: the MLeibman repo is long dead - you should be using: https://github.com/6pac/SlickGrid

Is there a way to show number and percent in stacked bar graphs in Quickbase?

I'd essentially want to create what's in the link in QuickBase, but from what I've seen, it isn't a straightforward procedure.
https://www.exceldashboardtemplates.com/wp-content/uploads/2013/08/image_thumb11.png
Don't think you can use display both value using the native/built-in charts. You could build a Code Page in Quickbase that queries data using the API and then renders a chart using a library such a Highcharts or Charts.js

How to update the data in a stacked area chart?

I've created a stacked area chart in d3.js and would like to update the chart with data from a CSV when one of the scenario buttons is clicked.
Here's a link to the bl.ocks.org gist I've created: http://bl.ocks.org/saraquigley/094e38913b550cf5f27f
How do I correctly bind the data and get the chart to update and display the appropriate scenario.
Thanks!
Sara
Thanks for your comment, in code veritas. I was able to answer my own question by further cleaning up my code and dealing with a data filtering issue that I had caused. I've updated the gist, same link as above in case it helps anyone with a similar problem.
Sara

Store App Dashboard: GridView and Multiple Charts

I'm working on a Store app that consists of several charts. I've already developed the charts and have them rendering using the chart control in the various forms.
I have been asked to bring these together in an app that allows the user to scroll left and right through each of the charts.
Every example I have found for using a GridView data binds the content of the GridView to item templates.
What I'm trying to get my head round is how I could please these chart controls directly in to a GridView.
Any help would be greatly appreciated.
Cheers,
Roy
As per my understanding of the question you need to have charts as items in a grid view.
If this is what you want, I have dome this before using charts from 3rd party toolkit.
You need ( may be variable sized) templates with each item having a different template of its own.
You need a items list with data for all the charts.
Then upon runtime you need to assign the template to each item.

Can an Apex Class or a Visualforce Page be the data source for a standard Salesforce dashboard component?

In Salesforce, I create a dashboard and drag a pie chart component on to it. I can then drop almost any report onto the pie chart to serve as its data source. Is it possible to use a class or page to drive the Pie Chart instead of a report?
My attempts so far suggest not. I have an apex:page that is returning a very simple table of data. I can add my entire apex:page with its apex:pageblocktable to my dashboard as an embedded VisualForce Page and the table shows up fine. But it won't let me use the page as the data source for my Pie Chart. My controller class isn't even listed to try using it. Is there some way I can evolve my controller or page to make it a suitable data source for a Pie Chart or any other standard Salesforce dashboard component?
I'm starting to think the only option available to me is to make a page that renders the pie chart for itself (probably using flot) and embed that in the dashboard. I'm willing to go this route, but it sure would save me some time if I could use the standard dashboard components. Any help is appreciated.
If you're wondering why I don't just use a report, it's because I haven't found any that combine leads and contacts in one. I've followed this multi-object apex dummy class pattern to create a custom UnifiedLeadContact class with a handful of common properties from my leads and contacts. My controller runs two queries, one for leads and one for contacts, uses the results to populate a list of new UnifiedLeadContacts and returns it. That is working well to feed my table that functions similar to a lead or contact view but has both leads and contacts in it.
As far as I am aware there is no way to use the output of a VF page as the source of a chart.
But you can create a chart as part of your VF page.
If you have a look at http://www.salesforce.com/us/developer/docs/pages/Content/pages_charting_overview.htm
This will give you the basics on how to feed in the data to a chart ov

Resources