Download the PHP package antishov/yii2-morrisjs without Composer
On this page you can find all versions of the php package antishov/yii2-morrisjs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-morrisjs
yii2-morrisjs
This is the MorrisJS widget. It's a very simple API for drawing line and bar charts.
Installation
The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies.
To install, either run
or add
to the require
section of your composer.json
file.
Usage
Line Chart
Example of code
Properties
resize
- Set to true
to enable automatic resizing when the containing element resizes. (default: false
). This has a significant performance impact, so is disabled by default.
gridTextSize
- Set the point size of the axis labels (default: 12
).
element
- Identifier that will be assigned to the chart.
data
- The data to plot. This is an array of objects, containing x and y attributes as described by the xkey and ykeys options.
xKey
- A string containing the name of the attribute that contains date (X) values (see available formats at spec).
yKeys
- A list of strings containing names of attributes that contain Y values (one for each series of data to be plotted).
labels
- A list of strings containing labels for the data series to be plotted (corresponding to the values in the ykeys
option).
xLabels
- Sets the x axis labelling interval. By default the interval will be automatically computed (see valid interval strings at spec).
yLabelFormat
- function that accepts y-values and formats them for display as y-axis labels.
yMin
- Min. bound for Y-values. Alternatively, set this to 'auto'
to compute automatically, or 'auto [num]'
to automatically compute and ensure that the min y-value is at most [num]
.
lineColors
- lineColors Array containing colors for the series lines/points.
pointFillColors
- Colors for the series points. By default uses the same values as lineColors
.
Bar Chart
Properties
element
- Identifier that will be assigned to the chart.
data
- The data to plot. This is an array of objects, containing x and y attributes as described by the xkey and ykeys options.
xKey
- A string containing the name of the attribute that contains date (X) values (see available formats at spec).
yKeys
- A list of strings containing names of attributes that contain Y values (one for each series of data to be plotted).
labels
- A list of strings containing labels for the data series to be plotted (corresponding to the values in the ykeys
option).
barColors
- Array containing colors for the series bars.
Examples
All examples are stored in the example
subdirectory and based on Yii2 framework with Docker.
You are free to set up your own host.
See Dockerfile
and docker-compose.yml
to get further information.
License
yii2-morrisjs is released under the MIT License. See the bundled LICENSE.md
for details.
All versions of yii2-morrisjs with dependencies
bower-asset/morrisjs Version 0.5.1
yiisoft/yii2-bootstrap Version ^2.0
php Version >=5.5
yiisoft/yii2 Version ^2.0