Hi Marek,

Apparently version 46 treats the { textPosition: 'none' } option
differently than previous versions.  This happens because it is trying
harder now to show all your ticks, but it gets confused if you tell it they
are positioned nowhere.

This is a regression, and I will probably be able to fix it for future
versions.  There is an easy workaround, however.  Instead of using
textPosition: 'none', set the textStyle.color to 'none'.

"textStyle": {
        "color": "none"
      }



On Thu, Oct 4, 2018 at 5:02 AM Marek Kozela <[email protected]> wrote:

> Hi,
>
> in our graphs the gridelines are not showing...
>
> Here are our settings:
>
> // Set chart default options
> var options = {
> width: '100%',
> height: 260,
> legend: 'none',
> backgroundColor: '#fff',
> chartArea: {
> backgroundColor: '#fff',
> width: '100%',
> height: '100%',
> left: 10,
> right: 20,
> top: 20
> },
> hAxis: {
> // baseline: 0,
> // viewWindowMode: 'pretty',
> gridlines: {count: 5},
> textPosition: 'none'
> },
> vAxis: {
> baseline: 0.0,
> baselineColor: 'red',
> gridlines: {count: 5},
> textPosition: 'none'
> },
> series: {0: {color: '#7bd7f0'}},
> gridlines: {color: "#cacfd8"},
> baselineColor: '#cacfd8',
> };
>
> // Load the Visualization API and the linechart package.
> google.charts.load('current', {'packages':['corechart'], 'language':
> 'sk'});
>
>
> var from = "{arguments.from}";
> var to = "{arguments.to}";
>
> google.charts.setOnLoadCallback(drawChart{fund.uid});
>
> function drawChart{fund.uid}() {
> var fund = {fund.uid};
> var jsonData{fund.uid} = $.ajax({
> method: 'POST',
> url: 'service/',
> data: {
> tx_rtgfunds_fund: {
> action: 'performance',
> id: fund,
> from: from,
> to: to
> }
> },
> dataType: 'json',
> async: false
> }).responseText;
> var data = new google.visualization.DataTable(jsonData{fund.uid});
> var chart{fund.uid} = new
> google.visualization.LineChart(document.getElementById('chart_div{fund.uid}'));
> // Get chart range
> var axisRange = data.getColumnRange(1);
> var min = Math.abs(axisRange.min);
> var max = Math.abs(axisRange.max);
> var optionsLocal = options;
> //console.log('min/max: ' + Math.ceil(min) + ' - ' + Math.ceil(max));
> if (max >= min) {
> // optionsLocal.hAxis.viewWindowMode = 'pretty';
> optionsLocal.vAxis.minValue = Math.ceil(max) * -1;
> optionsLocal.vAxis.maxValue = Math.ceil(max);
> } else {
> optionsLocal.vAxis.minValue = Math.ceil(min) * -1;
> optionsLocal.vAxis.maxValue = Math.ceil(min);
> }
> chart{fund.uid}.draw(data, optionsLocal);
> }
>
> Here is the website with the graphs:
> http://dev.iad.sk/en/mutual-funds/conservative-investment/
>
> Thank you very much for your help.
>
> --
> 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/eb5ce779-d6da-45b9-80ca-8d2af6eab457%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/eb5ce779-d6da-45b9-80ca-8d2af6eab457%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]>   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/CAOtcSJPCT2NdxB4VUoqQ3ct-YcMWyLP%2B9PnDYdmTuFCQ0MzBBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to