Thanks for the reply. I have sort of got it to work but I am still having a couple of problems.
Firstly whatever I do I can't get plot 2 to be a different colour.
And, secondly when using the on click, how can I differentiate between whether the user has clicked on the bars or the dots?
Below is the code I am using.
pre exec
function a(){
var d = this.chartDefinition;
d.crosstabMode = false;
d.seriesInRows = false,
d.readers = [
{names: 'Location', indexes: 0},
{names: 'Complaints', indexes: 3},
{names: 'CEOComplaints', indexes: 4},
{names: 'Market', indexes: 1},
{names: 'Site', indexes: 2}
];
d.dimensions = {
Market:{ isHidden : true},
Site:{ isHidden : true}
};
d.plots = [
{
name: 'main',
visualRoles: {
value: 'Complaints',
category: 'Location'
}
},
{
type: 'point',
linesVisible: false,
dotsVisible: true,
valuesVisible: true,
valuesOptimizeLegibility: true,
orthoAxis: 2,
visualRoles: {
value: 'CEOComplaints'
}
}
];
d.xAxisLabel_textAngle = -0.8,
d.xAxisLabel_textAlign = 'right',
d.valuesVisible = true,
d.valuesOptimizeLegibility = true,
d.plotFrameVisible = false,
d.barSizeMax = 60,
d.clickable = true;
d.clickAction = function(scene) {
console.log(scene);
};
}
Post Fetch
function f() {
var d = this.chartDefinition;
d.colorMap = {
"Complaints": '#808080',
"CEOComplaints": '#00B0F0'
};
}
Thanks
Andy