Here is the code, how do i fix the labels,so they do not overlap
google.charts.load('current', {'packages':['sankey']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
var colors = ['#a6cee3', '#b2df8a', '#fb9a99', '#fdbf6f',
'#cab2d6', '#ffff99', '#1f78b4', '#33a02c'];
data.addColumn('string', 'From');
data.addColumn('string', 'To');
data.addColumn('number', 'Weight');
data.addRows([
['Entry: Grid Page , 7926K , 26% ', 'Filter , 5% ', 0.561425481890373],
['Filter , 5% ', 'Global Header , 1% ', 0.116644345973736],
['Filter , 5% ', 'Mega Menu / Burger Menu , 8% ', 0.858125780849744],
['Filter , 5% ', 'Exit , 0% ', 0],
['Filter , 5% ', 'Search , 0% ', 0.0423119444169805],
['Filter , 5% ', 'PDP Visit , 50% ', 5.07810744492481],
['Entry: Grid Page , 7926K , 26% ', 'No Filter , 58% ', 5.8278568356695],
['No Filter , 58% ', 'Global Header , 14% ', 1.45281071054466],
['No Filter , 58% ', 'Mega Menu / Burger Menu , 10% ', 1.0102374730956],
['No Filter , 58% ', 'Search , 1% ', 0.161784675156729],
['No Filter , 58% ', 'PDP Visit , 64% ', 6.47534622608855],
]);
// Sets chart options.
var options = {
width: 900,
height: 400,
sankey: {
node: { width: 10,
nodePadding: 10,
colors: colors,
label: { fontName: 'Garamond',
fontSize: 14,
color: '#346287',
bold: true
}
},
link: {
colorMode: 'gradient',
colors: colors
}
}
};
// Instantiates and draws our chart, passing in some options.
var chart = new
google.visualization.Sankey(document.getElementById('sankey_basic'));
chart.draw(data, options);
}
--
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/ccfe59a3-d7fb-4104-a998-f22534aba1a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.