Labels for bar charts in Cognos - javascript

I have a Cognos chart and I want to be able to turn on one label that shows the amount for just the bar that is showing with conditional formatting (the selected center from a drop down list).
I have found a way to turn all of the labels on, and all of the labels off with Cognos chart - show values - but there has to be a way to only turn on just one specified value.
I am trying to create some JavaScript that will assist me in manipulating the specific element that is the selected value for my chart. Does anyone know how to find the ElementID for each individual bar in a Cognos bar chart?
Here is an example rendering of what Cognos creates will all the labels turned on: http://i.imgur.com/aM4gEYu.jpg
I am trying to create a rendering with only the label for the blue bar showing.

just click on 'series' on chart
set from properties pane
value to 'yes'
Grouping type ---> stacked
value location ----> outside top
value type ----> absolute

Related

Chart.js - How to place text outside of radar chart

I'm using Chart.js to build a radar chart. I have seven datasets grouped by color as seen in the image below:
I would like to place the dataset labels outside of the chart, in the center of each dataset sector (at the crosses in the image). Does anyone know if this is possible?
You could probably basically accomplish this by doing roughly the following:
Specify a non-empty label only where you'd like the group label to appear (e.g. for every sixth datapoint or something similar)
Then set the tooltips.callbacks.label option to return the label for each point so that they still appear in the tooltip as they originally would

Show hint data inside bar in DevExpress chart controls

I have an ASP.NET web forms application which uses DevExpress's bar chart controls. In the below side-by-side bar chart:
I needed to show some extra information apart from traditional x and y argument-values using series point's {HINT} pattern (Hospital Admissions: 130, (65%)) - as per the image.
Now, I need to show it in the bar itself. Like the control shows by-default for Stacked bar charts:
How do I push the Tool tip hint data to be shown inside the data bars?
Any suggestions, kind folks?
It is possible to access the current data row directly when handling the CustomDrawSeriesPoint event. Cast the e.SeriesPoint.
Tag property to the corresponding type (e.g., DataRowView). This should make it possible to update the SeriesPoint label text.
You can find a small sample project that illustrates this approach in the Chart Series Label from a dataset column that is not part of the series ticket.

Change fill color of selected point in Google Charts API scatter plot

I have a Google Charts scatter plot with various points specified on it. I also have a side bar with a list of values corresponding to the points on the scatter graph and when I select a side bar value, it highlights the corresponding point in the graph.
I would like to change the fill-color of the selected item when it is selected. Currently, my working selection code is:
$("#select").on('click', function() {
scatterChart.setSelection([{row: 1, column: 1}]);
});
I have tried using setValue() and setProperty on the data and have redrawn the chart but it has no affect.
Any help much appreciated.

C3JS bar display alignment

Team,
Q1 : I have a bar graph (on x-axis i have timestamps, and on y-axis i have few counts). Now, the bar display is not aligned with x-axis label display, it is misaligned and thus does not show the bar display at correct position of label value.
I tried with tick value as false\true, but still the bar is misaligned. Any idea as where it is going wrong?
Q2: For the same bar graph above, i wish to show the summary\count of all counts inside a legend, are there any examples or which call back function to achieve this?
Regards,
Santhosh

Assigning colors to a d3.js bar chart?

I'm trying to create a color-coded bar chart using d3. I am SO CLOSE. Here's my bl.ocks chart:
http://bl.ocks.org/sconnors37/b99070b055f125c9dff1/1cb53954be3f20e3c4492066eccd749b5cf04bbe
What I'm trying to do is assign color values based on the "teams" field in my .tsv file. So grey for Mercedes, red for Ferrari, etc. I have the teams in the var color domain and the colors in the var color range, and I'm pulling var color into the bar attrib.
For some reason though, the entire chart is just taking on the first item in the range - I changed it from grey to red just to see if that was what was going on, and it is.
So! How do I get the rest of my colors to pull through onto the bar chart? Help me, stackoverflow, you're my only hope.
In your .tsv file the last column team is not separated from the previous column by a tab, but rather through two spaces. If you look at the data passed to the d3.tsv callback I think you will find that you have one date team column instead of a date and team column.
This means that the field d.team is undefined and ordinal(undefined) will just return the first value from the range.

Categories