Add Point Markers to a Google Chart Line Chart

It\'s pretty easy to add points or nodes to a google line chart.  The keys are to add the pointSize option to the chart options object.  By default, it\'s set to 0, so the points don\'t appear.  The color will set to be whatever you have set in your colors series.  Also note that the size is unitless:

 

    var options = {
       width:1000,
       height:500,
       backgroundColor: \'white\',
       chartArea: {backgroundColor: \'white\'},
       colors: [\'#639426\'],
       pointSize: 6
    };

This will output something like:

 

\"\"

 

If you want to add strokes around each of those points, view my how to add stroke points to a Google line chart post.




Related Posts


Simple Sticky Element

The user scrolls down the page and once the scrolling reaches the top of an element of my choosing, that element sticks to the top of the window, so it's always visible from that point on...
Read Post

Removing the Horizontal Margins on a Google Chart Graph

I seem to be able to successfully modify quite a bit with google charts, but I couldn't find a good way to remove the horizontal padding to the left and right of a google graph. From what I can find, there really isn't a good way to do it...
Read Post

PHP JSON Returned As Object Instead of Array

I was returning, what I thought was an array from PHP, but it kept returning it as a json object...
Read Post

A Simple Slideout Menu

I just wanted an easy slideout menu. Click on a link, and the menu slides out from the left side of the screen. Click on the link again, or somewhere else on the page, and the menu slides back in...
Read Post