question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example with labelled bars

See original GitHub issue

Please add the example for bar/column chart labelled with data values. The critical part is: how to instantiate google.visualization.DataView?

$scope.chart.view = new google.visualization.DataView($scope.chart.data); // not found at runtime
$scope.chart.view.setColumns([
	0, 1,
	{
		calc : "stringify",
		sourceColumn : 1,
		type : "string",
		role : "annotation"
	},
	2
]);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nberingcommented, Apr 15, 2017

Sorry, I didn’t get back to you right away and it’s been a crazy couple of months.

https://jsfiddle.net/pceo1jxm/5/

I found this upstream issue a long time ago. If you check out the hide series example on the docs site, I encountered this while build that.

The ChartWrapper we use internally doesn’t actually like to take a view instance. It takes an object literal that looks like a view instance. When you pass a view instance, it starts getting all conflicted with their minified code. This might be something reportable as a bug to google, but I never did get around to passing it on.

0reactions
dmakcommented, Feb 15, 2017

I totally agree. Nice catch! Here is the corrected example. However the major goal is not yet achieved: the value annotations are not added to the bars. I think that $scope.chart.data is used to draw the graph, not $scope.chart.view hence column tuning is not applied. Could you please help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar Label Demo — Matplotlib 3.6.2 documentation
This example shows how to use the bar_label helper function to create bar chart labels. See also the grouped bar, stacked bar and...
Read more >
3.9 Adding Labels to a Bar Graph - R Graphics Cookbook
Another common scenario is to add labels for a bar graph of counts instead of values. To do this, use geom_bar() , which...
Read more >
Adding value labels on a Matplotlib Bar Chart
Set the title, X-axis labels and Y-axis labels of the chart/plot. Now visualize the plot by using plt.show() function. Example 1: Adding value ......
Read more >
How to add value labels on a bar chart? - python
Firstly freq_series.plot returns an axis not a figure so to make my answer a little more clear I've changed your given code to...
Read more >
A Complete Guide to Bar Charts | Tutorial by Chartio
Bar charts are a fundamental visualization for comparing values between groups of data. Use this guide to learn how to get the most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found