Переглянути джерело

relocate script

tags/1.2.0
pratu16x7 7 роки тому
джерело
коміт
6b09bb1f7d
8 змінених файлів з 19 додано та 17 видалено
  1. +1
    -1
      README.md
  2. +1
    -1
      dist/frappe-charts.min.js
  3. +1
    -1
      dist/frappe-charts.min.js.map
  4. +2
    -0
      docs/assets/js/frappe-charts.min.js
  5. +6
    -5
      docs/index.html
  6. +7
    -7
      src/scripts/charts.js
  7. +1
    -1
      src/scripts/charts/AxisChart.js
  8. +0
    -1
      src/styles/charts.less

+ 1
- 1
README.md Переглянути файл

@@ -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



+ 1
- 1
dist/frappe-charts.min.js
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 1
- 1
dist/frappe-charts.min.js.map
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 2
- 0
docs/assets/js/frappe-charts.min.js
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 6
- 5
docs/index.html Переглянути файл

@@ -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>

+ 7
- 7
src/scripts/charts.js Переглянути файл

@@ -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) {


+ 1
- 1
src/scripts/charts/AxisChart.js Переглянути файл

@@ -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],


+ 0
- 1
src/styles/charts.less Переглянути файл

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


Завантаження…
Відмінити
Зберегти