This is weird: I added a row selector for each chart, but the last chart C3 chart is always in the top right corner.
I uploaded the charts and the elements code. I cannot find any error. I am using dc.js and c3.js.
I am using mongodb to store the data. retrieve the data using node.
I appreciate any help!!! Thanks!
Related
I have two tables, one that shows the sales history of salespeople per year, and another table that shows the sales history in months. As you can see in the image below:
I need to create a composite chart (I believe it is a composite chart, as it will have more than 01 line) that is exactly the representation of the month table.
After creating the chart when I click on the seller Miguel for example, the chart will be rendered with the history of that seller.
And for example if I click on month 03 of the graph, the table of sellers will be rendered only with the sales that were made in month 03.
I don't know how to do it, I managed to create a composite chart that presents the same data as the month table, however, I was unable to integrate my chart together with my tables.
Can you tell me how I can do that?
I put the codes I made in JSFiddle, here are the links:
Sales/Month Table: https://jsfiddle.net/bernalvinicius/ejxcfpvz/15/
Month Chart: https://jsfiddle.net/bernalvinicius/kanm158j/17/
Thanks in advance.
Just put all your code in the same file(s), combine your crossfilter instances, and put all the charts in the same chart group (the default), and it should work fine.
The chart group is the second parameter to each chart constructor. If it's not specified, then the chart goes into the default chart group.
When any chart is filtered in a chart group, it will tell all the other charts in that chart group to redraw, and they will pull their new data from their respective crossfilter groups. (Sorry about the naming, a dc.js chart group has nothing to do with a crossfilter group.)
In order to combine your code, I renamed both of the crossfilter instances to cf. Then I added the new fields you are generating to the existing rows, instead of mapping the data:
data.forEach(d =>
Object.assign(d, {
mes: d.Month,
atual: d.Vendas_Ano,
passado: d.Vendas_Ant
})
);
In your table fiddle, you were initializing the table for every row in the data with a data.forEach() which wasn't necessary. That's why it was so slow to load.
Other than that, both fiddles had the same general structure so I just copied and pasted the code from the table fiddle to the composite fiddle, HTML, JS, and CSS.
In the JS I made sure to put the same lines outside and inside the d3.json() callback as before.
It looks like it works?
https://jsfiddle.net/gordonwoodhull/0q1y5ftr/15/
As a first time OBIEE user, I've built an analysis containing a pie chart and added it to a dashboard. I want to be able to click on a slice of the pie chart and it should open a new page or analysis. I tried using Action Links but that seems to be working only for the column heading of a table but not for table contents or in my case the pie charts. Is this a possibility in OBIEE 12c?
Yes. Action links will work on the value too. Check out the documentation and the embedded video: https://docs.oracle.com/middleware/12213/biee/BIEUG/GUID-63576665-7BFE-4D1E-ABB9-51B8AAFBB940.htm#GUID-63576665-7BFE-4D1E-ABB9-51B8AAFBB940
In dc.js I'm displaying the number of filtered and total rows with dc.dataCount:
dc.dataCount(".dc-data-count", "charts")
.dimension(data_cf)
.group(all);
and
<div class="dc-data-count">
<strong class="filter-count"></strong> selected out of <strong class="total-count"></strong> records
On the same page, I have a d3 donut chart that I've drawn. Within this chart I'd like to display the filter-count (which updates as filters are applied), as well as other calculations like the sum of a value in the current selection. Given that dc.dataCount is accessed by a div class, I don't know how to access the number to place precisely in my donut chart.
How can I pass values from dc.dataCount or some other grouping into a d3 object?
Thanks!
I would do this with a renderlet on the donut chart that just reads the values you need, and adds them. Renderlets run after the chart has rendered, so there is a slight delay, but it shouldn't be too disturbing for this use.
As for how to get the numbers, there is no magic to the dataCount widget; it's just reading crossfilter values:
https://github.com/dc-js/dc.js/blob/master/src/data-count.js#L77
So you can add text elements to the svg using dimension.size() and group.value() in the same way.
I am using System.Web.Helpers.Chart for charting in MVC3, charts are rendering fine, but i want to add the value of at the top of the bar I tried a lot but failed to find a way to show value of respective bar,Is it possible using System.Web.Helpers.Chart?
Thanks in Advance.
I am using the Telerik rad chart control to create a bar chart of date-based data. The x-axis shows the date for each data point. The y-axis shows some total.
When there is no data in my datasource for a particular date, the chart is still showing a date, but no bar.
I think this falls under the "empty series approximation" functionality. Is there any way of turning this off? Some property or combination of properties that need to be set?
Thank you.
One way of doing this is using xcategories instead of xvalues in your SeriesMapping. Check the sample:
<TelerikChart:SeriesMapping.ItemMappings>
<telerik:ItemMapping FieldName="Value" DataPointMember="YValue" />
<telerik:ItemMapping FieldName="Date" DataPointMember="XCategory" />
</TelerikChart:SeriesMapping.ItemMappings>
I hope it helps.