Google charts y-axis label cutting off, I am using material charts












1















Below is my google charts code, I have issue that my left label "Total" is cutting of, I used chartArea.left property here like this chartArea{left:214, width:500} but nothing changes. If anyone knows about what I am missing?



Please see that screenshot for how my chart is showing: https://prnt.sc/lkovdg



google.charts.load("current", {packages:['bar']});
google.charts.setOnLoadCallback(drawBarChartAddedExperiences);
function drawBarChartAddedExperiences()
{
var data = new google.visualization.DataTable();

data.addColumn('string', 'Days');
data.addColumn('number', 'New experiences');

if(typeof experiences_added === 'undefined')
{
//do nothing
}
else
{
for (var i = 0; i < experiences_added.length; i++)
{

var dated = ""+experiences_added[i].dated+"";
var events_added = parseInt(experiences_added[i].events_added);
var dated_format = ""+experiences_added[i].dated_format+"";

data.addRow([dated, events_added]);

data.setRowProperty(i, 'dated_format', dated_format);
}

var view = new google.visualization.DataView(data);
/*
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);
*/

var options = {
title: new_exp_count,
//width: 5000,
height: 400,
bar: {
groupWidth: "25%",
},
legend: {
position: "none",
},
titleTextStyle: {
fontSize: 22,
bold: true,
color:'#575655',
//italic: true,
fontName: 'sans-serif',
},
hAxes: {
0: {
title: 'Days',
textStyle: {
bold: true,
color:'#575655',
fontSize: 12,
fontName: 'sans-serif',
},
}
},
vAxis: {
title: 'Total',
viewWindow: {min: 0, max: total_new_exp_count},
titleTextStyle: {
bold: true,
fontName: 'sans-serif',
//fontSize: '18',
},
textStyle: {
bold: true,
color:'#575655',
//fontSize: 12,
fontName: 'sans-serif',
},
},
};
var chart = new google.charts.Bar(document.getElementById("new_experiences_in_a_duration"));

//chart.draw(view, options);
chart.draw(view, google.charts.Bar.convertOptions(options));









share|improve this question























  • there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

    – WhiteHat
    Nov 20 '18 at 14:01











  • will you please share a sample of the data, along with any styles / css applied to chart's container?

    – WhiteHat
    Nov 20 '18 at 14:02
















1















Below is my google charts code, I have issue that my left label "Total" is cutting of, I used chartArea.left property here like this chartArea{left:214, width:500} but nothing changes. If anyone knows about what I am missing?



Please see that screenshot for how my chart is showing: https://prnt.sc/lkovdg



google.charts.load("current", {packages:['bar']});
google.charts.setOnLoadCallback(drawBarChartAddedExperiences);
function drawBarChartAddedExperiences()
{
var data = new google.visualization.DataTable();

data.addColumn('string', 'Days');
data.addColumn('number', 'New experiences');

if(typeof experiences_added === 'undefined')
{
//do nothing
}
else
{
for (var i = 0; i < experiences_added.length; i++)
{

var dated = ""+experiences_added[i].dated+"";
var events_added = parseInt(experiences_added[i].events_added);
var dated_format = ""+experiences_added[i].dated_format+"";

data.addRow([dated, events_added]);

data.setRowProperty(i, 'dated_format', dated_format);
}

var view = new google.visualization.DataView(data);
/*
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);
*/

var options = {
title: new_exp_count,
//width: 5000,
height: 400,
bar: {
groupWidth: "25%",
},
legend: {
position: "none",
},
titleTextStyle: {
fontSize: 22,
bold: true,
color:'#575655',
//italic: true,
fontName: 'sans-serif',
},
hAxes: {
0: {
title: 'Days',
textStyle: {
bold: true,
color:'#575655',
fontSize: 12,
fontName: 'sans-serif',
},
}
},
vAxis: {
title: 'Total',
viewWindow: {min: 0, max: total_new_exp_count},
titleTextStyle: {
bold: true,
fontName: 'sans-serif',
//fontSize: '18',
},
textStyle: {
bold: true,
color:'#575655',
//fontSize: 12,
fontName: 'sans-serif',
},
},
};
var chart = new google.charts.Bar(document.getElementById("new_experiences_in_a_duration"));

//chart.draw(view, options);
chart.draw(view, google.charts.Bar.convertOptions(options));









share|improve this question























  • there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

    – WhiteHat
    Nov 20 '18 at 14:01











  • will you please share a sample of the data, along with any styles / css applied to chart's container?

    – WhiteHat
    Nov 20 '18 at 14:02














1












1








1








Below is my google charts code, I have issue that my left label "Total" is cutting of, I used chartArea.left property here like this chartArea{left:214, width:500} but nothing changes. If anyone knows about what I am missing?



Please see that screenshot for how my chart is showing: https://prnt.sc/lkovdg



google.charts.load("current", {packages:['bar']});
google.charts.setOnLoadCallback(drawBarChartAddedExperiences);
function drawBarChartAddedExperiences()
{
var data = new google.visualization.DataTable();

data.addColumn('string', 'Days');
data.addColumn('number', 'New experiences');

if(typeof experiences_added === 'undefined')
{
//do nothing
}
else
{
for (var i = 0; i < experiences_added.length; i++)
{

var dated = ""+experiences_added[i].dated+"";
var events_added = parseInt(experiences_added[i].events_added);
var dated_format = ""+experiences_added[i].dated_format+"";

data.addRow([dated, events_added]);

data.setRowProperty(i, 'dated_format', dated_format);
}

var view = new google.visualization.DataView(data);
/*
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);
*/

var options = {
title: new_exp_count,
//width: 5000,
height: 400,
bar: {
groupWidth: "25%",
},
legend: {
position: "none",
},
titleTextStyle: {
fontSize: 22,
bold: true,
color:'#575655',
//italic: true,
fontName: 'sans-serif',
},
hAxes: {
0: {
title: 'Days',
textStyle: {
bold: true,
color:'#575655',
fontSize: 12,
fontName: 'sans-serif',
},
}
},
vAxis: {
title: 'Total',
viewWindow: {min: 0, max: total_new_exp_count},
titleTextStyle: {
bold: true,
fontName: 'sans-serif',
//fontSize: '18',
},
textStyle: {
bold: true,
color:'#575655',
//fontSize: 12,
fontName: 'sans-serif',
},
},
};
var chart = new google.charts.Bar(document.getElementById("new_experiences_in_a_duration"));

//chart.draw(view, options);
chart.draw(view, google.charts.Bar.convertOptions(options));









share|improve this question














Below is my google charts code, I have issue that my left label "Total" is cutting of, I used chartArea.left property here like this chartArea{left:214, width:500} but nothing changes. If anyone knows about what I am missing?



Please see that screenshot for how my chart is showing: https://prnt.sc/lkovdg



google.charts.load("current", {packages:['bar']});
google.charts.setOnLoadCallback(drawBarChartAddedExperiences);
function drawBarChartAddedExperiences()
{
var data = new google.visualization.DataTable();

data.addColumn('string', 'Days');
data.addColumn('number', 'New experiences');

if(typeof experiences_added === 'undefined')
{
//do nothing
}
else
{
for (var i = 0; i < experiences_added.length; i++)
{

var dated = ""+experiences_added[i].dated+"";
var events_added = parseInt(experiences_added[i].events_added);
var dated_format = ""+experiences_added[i].dated_format+"";

data.addRow([dated, events_added]);

data.setRowProperty(i, 'dated_format', dated_format);
}

var view = new google.visualization.DataView(data);
/*
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);
*/

var options = {
title: new_exp_count,
//width: 5000,
height: 400,
bar: {
groupWidth: "25%",
},
legend: {
position: "none",
},
titleTextStyle: {
fontSize: 22,
bold: true,
color:'#575655',
//italic: true,
fontName: 'sans-serif',
},
hAxes: {
0: {
title: 'Days',
textStyle: {
bold: true,
color:'#575655',
fontSize: 12,
fontName: 'sans-serif',
},
}
},
vAxis: {
title: 'Total',
viewWindow: {min: 0, max: total_new_exp_count},
titleTextStyle: {
bold: true,
fontName: 'sans-serif',
//fontSize: '18',
},
textStyle: {
bold: true,
color:'#575655',
//fontSize: 12,
fontName: 'sans-serif',
},
},
};
var chart = new google.charts.Bar(document.getElementById("new_experiences_in_a_duration"));

//chart.draw(view, options);
chart.draw(view, google.charts.Bar.convertOptions(options));






javascript charts google-visualization pygooglechart






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 '18 at 13:27









user2226181user2226181

72113




72113













  • there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

    – WhiteHat
    Nov 20 '18 at 14:01











  • will you please share a sample of the data, along with any styles / css applied to chart's container?

    – WhiteHat
    Nov 20 '18 at 14:02



















  • there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

    – WhiteHat
    Nov 20 '18 at 14:01











  • will you please share a sample of the data, along with any styles / css applied to chart's container?

    – WhiteHat
    Nov 20 '18 at 14:02

















there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

– WhiteHat
Nov 20 '18 at 14:01





there are many options that are not supported by material charts, including chartArea, see --> Tracking Issue for Material Chart Feature Parity

– WhiteHat
Nov 20 '18 at 14:01













will you please share a sample of the data, along with any styles / css applied to chart's container?

– WhiteHat
Nov 20 '18 at 14:02





will you please share a sample of the data, along with any styles / css applied to chart's container?

– WhiteHat
Nov 20 '18 at 14:02












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394039%2fgoogle-charts-y-axis-label-cutting-off-i-am-using-material-charts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394039%2fgoogle-charts-y-axis-label-cutting-off-i-am-using-material-charts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith