relocate script

This commit is contained in:
pratu16x7 2017-10-30 12:18:24 +05:30
parent 1eb6ccf471
commit 6b09bb1f7d
8 changed files with 19 additions and 17 deletions

View File

@ -1,5 +1,5 @@
# Frappé Charts
GitHub-inspired simple and modern charts with zero dependencies.
GitHub-inspired simple and responsive charts with zero dependencies.
https://frappe.github.io/charts

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
docs/assets/js/frappe-charts.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -16,8 +16,8 @@
<script src="assets/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<!--<link rel="shortcut icon" href="https://frappe.github.io/frappe/assets/img/favicon.png" type="image/x-icon">
<link rel="icon" href="https://frappe.github.io/frappe/assets/img/favicon.png" type="image/x-icon">-->
<link rel="shortcut icon" href="https://frappe.github.io/frappe/assets/img/favicon.png" type="image/x-icon">
<link rel="icon" href="https://frappe.github.io/frappe/assets/img/favicon.png" type="image/x-icon">
</head>
<body>
@ -144,7 +144,7 @@
<button type="button" class="btn btn-sm btn-secondary" data-type="region">Region</button>
</div>
<pre><code class="hljs javascript margin-vertical-px"> ...
type: 'line', // Line chart specific properties:
type: 'line', // Line Chart specific properties:
show_dots: 0, // Show data points on the line; default 1
heatline: 1, // Show a value-wise line gradient; default 0
@ -206,7 +206,7 @@
<div id="chart-heatmap" class="border"
style="overflow: scroll; text-align: center; padding: 20px;"></div>
<div class="mt-1 mx-auto" role="group">
<button type="button" class="btn btn-sm btn-secondary active" data-heatmap="discrete">Dicrete</button>
<button type="button" class="btn btn-sm btn-secondary active" data-heatmap="discrete">Discrete</button>
<button type="button" class="btn btn-sm btn-secondary" data-heatmap="continuous">Continuous</button>
</div>
<pre><code class="hljs javascript margin-vertical-px"> let heatmap = new Chart({
@ -249,7 +249,8 @@
</svg>
</a>
<script src="../dist/frappe-charts.min.js"></script>
<!--<script src="../dist/frappe-charts.min.js"></script>-->
<script src="assets/js/frappe-charts.min.js"></script>
<script src="assets/js/index.js"></script>
</body>
</html>

View File

@ -6,13 +6,13 @@ import ScatterChart from './charts/ScatterChart';
import PercentageChart from './charts/PercentageChart';
import Heatmap from './charts/Heatmap';
if (ENV !== 'production') {
// Enable LiveReload
document.write(
'<script src="http://' + (location.host || 'localhost').split(':')[0] +
':35729/livereload.js?snipver=1"></' + 'script>'
);
}
// if (ENV !== 'production') {
// // Enable LiveReload
// document.write(
// '<script src="http://' + (location.host || 'localhost').split(':')[0] +
// ':35729/livereload.js?snipver=1"></' + 'script>'
// );
// }
export default class Chart {
constructor(args) {

View File

@ -331,7 +331,6 @@ export default class AxisChart extends BaseChart {
}
map_tooltip_x_position_and_show(relX) {
console.warn(this.y_min_tops);
if(!this.y_min_tops) return;
for(var i=this.x_axis_positions.length - 1; i >= 0 ; i--) {
let x_val = this.x_axis_positions[i];
@ -570,6 +569,7 @@ export default class AxisChart extends BaseChart {
let type = this.unit_args.type;
d.svg_units.map((unit, i) => {
if(!new_x[i] || !new_y[i]) return;
this.elements_to_animate.push(this.animate[type](
{unit:unit, array:d.svg_units, index: i}, // unit, with info to replace where it came from in the data
new_x[i],

View File

@ -7,7 +7,6 @@
margin-top: 25px;
margin-left: 25px;
text-align: left;
text-transform: uppercase;
font-weight: normal;
font-size: 12px;
color: #6c7680;