Good idea, but we don't support a single default pointStyle option for all
series.  You'll have to instead set the separate options for pointSize,
pointShape, dataOpacity, colors, and lineWidth. Or for a particular series,
you can use several slightly different options, e.g.

 var options = {
    series: {
      0: { color: 'black', pointSize: 7, lineWidth: 4 }
    }
  }

See Customizing Points at:
  https://developers.google.com/chart/interactive/docs/points


On Wed, Mar 1, 2017 at 1:56 PM, Georgess <[email protected]> wrote:

>
> 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]
>         ]);
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to google-visualization-api@
> googlegroups.com.
> Visit this group at https://groups.google.com/
> group/google-visualization-api.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-visualization-api/195eeb2b-9056-4ef5-ae34-
> 8c1c016d632a%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/195eeb2b-9056-4ef5-ae34-8c1c016d632a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, Cambridge MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMf_5uRT2xqSvnLoG3kxJ5aDn1RSsp53X4FiQe_pZeuxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to