How to skin my chart with modena layout as dashboard in http://www.primefaces.org/modena/
Section "Your Cellular Data Usage Statistics"
Please help me
Modena CHART SKIN
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please try with;
XHTML
Bean.java
JS
XHTML
Code: Select all
<p:chart type="line" model="#{bean.lineModel1}" style="height:350px;" responsive="true"/>
Code: Select all
private void createLineModels() {
lineModel1 = initLinearModel();
lineModel1.setTitle("Linear Chart");
lineModel1.setLegendPosition("e");
lineModel1.setExtender("skinChart"); // JS function
lineModel1.setAnimate(true);
Axis yAxis = lineModel1.getAxis(AxisType.Y);
yAxis.setMin(0);
yAxis.setMax(10);
}
Code: Select all
function skinChart() {
this.cfg.shadow = false;
this.cfg.title = '';
this.cfg.seriesColors = ['#8E24AA', '#C6FF00'];
this.cfg.grid = {
background: '#ffffff',
borderColor: '#ffffff',
gridLineColor: '#F5F5F5',
shadow: false,
};
this.cfg.axesDefaults = {
rendererOptions: {
textColor: '#546E7A'
}
};
this.cfg.seriesDefaults = {
shadow: false,
markerOptions: {
shadow: false
}
}
}
Github Profile: https://github.com/mertsincan
-
- Posts: 17
- Joined: 23 Jun 2011, 23:33
Yes this work for me thks
David Andrade B
Oracle Certified
Oracle Certified
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests