Instead of setting style for each point in data I want to set style only once in var options.
For example pointStyle: {shape-type: square, stroke-width: 4, fill-color: 'transparent', stroke-color: 'red' }
How it can be done?
var options = {
legend: 'none',
hAxis: { minValue: 0, maxValue: 9 },
curveType: 'function',
pointSize: 7,
dataOpacity: 0.8,
pointStyle: {shape-type: square, stroke-width: 4, fill-color: 'transparent', stroke-color: 'red' }
};
function drawChart() {
var data = google.visualization.arrayToDataTable
([['X', 'Y', {'type': 'string', 'role': 'style'}],
[1, 3, null],
[2, 2.5, null],
[3, 3, null],
[4, 4, 'point { size: 8; shape-type: circle; fill-color: orange;}'],
[5, 4, 'point {shape-type: square; size: 10; stroke-width: 2; fill-color: transparent; stroke-color: red;}'],
[6, 3, 'point { size: 18; shape-type: star; fill-color: #a52714; }'],
[7, 2.5, null],
[8, 3, null]
]);