Fixed line chart (was broken), fixed dimensions of charts, regen dist files (#342)

This commit is contained in:
FrancescoUK
2016-05-24 12:14:01 +01:00
parent 719a0e6107
commit 3e44c7caf5
12 changed files with 68 additions and 35 deletions

View File

@@ -6,7 +6,7 @@
<title>Open Source Point Of Sale <?php echo $this->lang->line('login_login'); ?></title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<!-- start css template tags -->
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=50ab19585f"/>
<link rel="stylesheet" type="text/css" href="css/login.css"/>
<!-- end css template tags -->

View File

@@ -62,12 +62,12 @@
<link rel="stylesheet" media="print" href="css/print.css" type="text/css" />
<![endif]-->
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=50ab19585f"/>
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=64efbc27a9"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=fa50118507"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d12d3461fe" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=77957c6da1" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>

View File

@@ -10,6 +10,21 @@
// We are setting a few options for our chart and override the defaults
var options = {
// Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
width: '100%',
// Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
height: '80%',
// Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
chartPadding: {
top: 10,
// right: 15,
// bottom: 10,
// left: 10
},
// X-Axis specific configuration
axisX: {
// Lets offset the chart a bit from the labels
@@ -23,9 +38,6 @@
offset: 60
},
width: '100%',
height: '75%',
// plugins configuration
plugins: [
Chartist.plugins.ctAxisTitle({
@@ -34,7 +46,7 @@
axisClass: 'ct-axis-title',
offset: {
x: 0,
y: 80
y: 100
},
textAnchor: 'middle'
},

View File

@@ -10,6 +10,22 @@
// We are setting a few options for our chart and override the defaults
var options = {
// Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
width: '100%',
// Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
height: '80%',
// Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
chartPadding: {
top: 10,
// right: 15,
// bottom: 10,
// left: 10
},
// Set the bar chart to be horizontal
horizontalBars: true,
// X-Axis specific configuration
@@ -25,9 +41,6 @@
offset: 120
},
width: '80%',
height: '80%',
// plugins configuration
plugins: [
Chartist.plugins.ctAxisTitle({

View File

@@ -1,10 +1,10 @@
<script>
// Labels and data series
var data = {
labels: [<?php echo $labels_1; ?>],
labels: <?php echo json_encode($labels_1); ?>,
series: [{
name: '<?php echo $yaxis_title; ?>',
data: [<?php echo $series_data_1; ?>]
data: <?php echo json_encode($series_data_1); ?>
}]
};
@@ -12,11 +12,11 @@
var options = {
// Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
// width: '80%',
width: '100%',
// Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
// height: '80%',
height: '80%',
// Draw the line chart points
showPoint: true,
@@ -24,12 +24,12 @@
lineSmooth: false,
// Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
/*chartPadding: {
top: 15,
right: 15,
bottom: 20,
left: 10
},*/
chartPadding: {
top: 10,
// right: 15,
// bottom: 10,
// left: 10
},
// X-Axis specific configuration
axisX: {

View File

@@ -10,9 +10,21 @@
// We are setting a few options for our chart and override the defaults
var options = {
// Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
width: '100%',
// Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
height: '80%',
// Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
chartPadding: {
top: 10,
// right: 15,
// bottom: 10,
// left: 10
},
// show the labels on the border with the pie chart
labelPosition: 'outside',
// interpolate labels to show lable, value and %

View File

@@ -15,7 +15,6 @@
#report_summary
{
margin: 2em 0 auto;
text-align: center;
}
@@ -23,11 +22,8 @@
{
}
/* set the chart to be centered */
.ct-chart
{
text-align: center;
margin: 0 auto;
}
/* style chart X axis labels to be rotated of 60 degrees */

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,7 @@
<title>Open Source Point Of Sale <?php echo $this->lang->line('login_login'); ?></title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<!-- start css template tags -->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=50ab19585f"/>
<link rel="stylesheet" type="text/css" href="css/login.css"/>
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
<!-- end css template tags -->

View File

@@ -58,14 +58,14 @@
<!--[if lte IE 8]>
<link rel="stylesheet" media="print" href="css/print.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=50ab19585f"/>
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=64efbc27a9"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=fa50118507"/>
<!-- end mincss template tags -->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d12d3461fe" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=77957c6da1" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>