I want to give different color and auraColor to annotations on google combo chart. Anyone can say if is it posible and how?
This is current options;
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true,
}
},
Also i've tryed this but it doesn't work;
annotations: {
0:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true
}},
1:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'black',
auraColor: 'red',
fontSize: 11,
alwaysOutside: true,
}},
2:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'blue',
auraColor: 'white',
fontSize: 11,
alwaysOutside: true,
}}
},
Thanks in advance
try using the series option...
series: {
0:{
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true
}
}
},
1:{
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'black',
auraColor: 'red',
fontSize: 11,
alwaysOutside: true,
}
}
},
...
Related
In data I have a am5.Picture object
icon = am5.Picture.new(root, {
height: 28,
src: src
});
The image fits on the text, is not inserted next to it
this doesn't work either
series.labels.template.set("text", "{icon} {name}") // return only name
Used Container
series.labels.values.forEach((label, index) => {
if (label.dataItem.dataContext.icon) {
let container = am5.Container.new(root, {
layout: root.horizontalLayout
})
container.children.push(label.dataItem.dataContext.icon)
container.children.push(
am5.Label.new(root, {
text: label.dataItem.dataContext.name,
fontSize: 10,
textAlign: "left",
centerY: am5.percent(50),
paddingLeft: 5,
})
)
label.children.clear()
label.children.push(container)
} else {
label.setAll({
fontSize: 10,
fontWeight: "300",
textAlign: "left",
maxWidth: 260,
oversizedBehavior: "wrap",
text: "{name}"
})
}
})
I'm trying to make the background of my BottomTabNavigator transparent.
I've tried setting the position to 'absolute', this makes the background transparent but now the tab bar is not clickable anymore. Does anyone knows a solution?
tabBarOptions: {
inactiveBackgroundColor : COLORS.TINTCOLOR,
activeBackgroundColor: COLORS.TINTCOLOR,
activeTintColor: COLORS.WHITE,
inactiveTintColor: COLORS.WHITE,
showLabel: false,
labelStyle: {
fontSize: 12
},
style: {
borderTopWidth: 0,
borderTopColor: COLORS.TINTCOLOR,
height: 50,
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'transparent',
borderTopLeftRadius: 25,
borderTopRightRadius: 25,
overflow: 'hidden',
},
},
I tried to change the header style of the Datagrid component based on material-ui style guide. Datagrid body content is updated based on custom style but the header is not reflected the custom style changes.
the code snippet is below:
export const TableStyleProp = {
style: {
color: "#ff0000"
},
selectable: true,
headerStyle: {
color: "#ff0000"
},
bodyStyle: {}
};
const muiTheme = getMuiTheme({
table: {
backgroundColor: "#FF0000 !important"
},
thead: {
backgroundColor: "#b7cbfb"
},
tableHeader: {
borderColor: "#FF0000",
backgroundColor: "#FF0000"
},
tableHeaderColumn: {
textColor: "#FF0000",
height: 56,
spacing: 24
},
tableRow: {
hoverColor: "#FF0000",
stripeColor: "#FF0000",
selectedColor: "#FF0000",
textColor: "#FF00FF",
borderColor: "#FF0000",
height: 48
},
tableRowColumn: {
height: 48,
spacing: 24
}
});
<MuiThemeProvider muiTheme={muiTheme}>
This is described in the documentation: https://marmelab.com/admin-on-rest/List.html#custom-grid-style
I am using jqplot CategoryAxisRenderer for my x-axis data. I need zooming also. But I am able to zoom only y axis. Please suggest a solution. I am new to charts. I searched a lot but didnt get a proper answer. Please provide an answer.
This is my code.
function renderBarChart(){
barChartData = [["abcd",56], ["efgh",60], ["ghij",79],["klmn",20],["opqr",34],["stuv",67],["wxyz",42],["adfg",77],["ghjy",29]];
plot2 = $.jqplot('barChart', [barChartData], {
seriesColors: ["#4fb3ce"],
animate: !$.jqplot.use_excanvas,
highlighter: {
show: true,
showMarker:false,
tooltipLocation:'n',
tooltipOffset: 6,
tooltipContentEditor:tooltip_formatter_bar
},
grid: {
background: '#f7fafa',
drawBorder: false,
shadow: false,
gridLineColor: '#eceeee',
gridLineWidth: 1
},
legend: {
show: false
},
seriesDefaults:{
showMarker:false,
renderer:$.jqplot.BarRenderer,
rendererOptions: {
barPadding: 0,
barMargin: 0,
barWidth:20,
shadowAlpha: 0.04,
shadowOffset:1.5,
highlightMouseOver: false,
dataLabels: 'percent'
},
pointLabels:{
show: true,
ypadding : 5,
color: '#7c7c7c',
}
},
axesDefaults: {
rendererOptions: {
baselineWidth: 1,
baselineColor: '#eceeee',
drawBaseline: true
}
},
axes: {
xaxis: {
showMark: false,
renderer: $.jqplot.CategoryAxisRenderer,
//ticks: barTicks,
//pad: 0,
label:'Associate ID',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
labelOptions: {
fontFamily: 'Arial',
fontSize: '12px'
},
tickOptions: {
angle: 0,
textColor: '#7c7c7c',
showMark: false,
fontSize: '10px'
}
},
yaxis: {
tickOptions: {
showMark: false,
fontSize: '10px'
},
min:0,
max:100,
tickInterval:10,
label: 'Incident',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
labelOptions: {
fontFamily: 'Arial',
fontSize: '12px'
}
}
},
cursor:{
show: true,
zoom:true
}
});
}
Have you tried using contrainZoomTo: 'x'.
cursor: {
show: true,
showTooltip: true,
zoom: true,
constrainZoomTo: 'x'
},
Below is my code for a pie chart:
legend: { margin: 1, padding: 4, layout: 'horizontal', align: 'center', verticalAlign: 'bottom', itemWidth: 189, borderWidth: 0, enabled: true, useHTML: false, labelFormatter: function () { return (this.y == 0 || this.y == null || this.y == '') ? "" : (this.name); }, itemMarginBottom: 8, itemStyle: { color: '#333333', fontWeight: 'bold', fontFamily: 'Arial', fontSize: '10px', lineHeight: '15px' }, symbolWidth: 11, x: -7, symbolPadding: 8 }
However the legend text is not bold till i change the font to 10.5 which i think is too big.
Below is the html generated in FF:THis happens in both Chrome and Firefox. IE is working fine.
<text x="19" y="13" style="font-family:Arial;font-size:10.4px;cursor:pointer;color:#333333;font-weight:bold;line-height:15px;fill:#333333;" text-anchor="start" zIndex="2">
Is there something I can do about this?
For me it is bolded, compare: http://jsfiddle.net/3bQne/233/
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container2'
},
legend: {
margin: 1,
padding: 4,
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
itemWidth: 189,
borderWidth: 0,
enabled: true,
useHTML: false,
labelFormatter: function () {
return (this.y == 0 || this.y == null || this.y == '') ? "" : (this.name);
},
itemMarginBottom: 8,
itemStyle: {
color: '#333333',
//fontWeight: 'bold',
fontFamily: 'Arial',
fontSize: '10px',
lineHeight: '15px'
},
symbolWidth: 11,
x: -7,
symbolPadding: 8
},
series: [{
showInLegend: true,
type: 'pie',
data: [3.45, 4.21, 5.11]
}]
});
And image: