You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/09/20 05:13:22 UTC

[incubator-echarts-examples] branch next updated: examples tweak

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git


The following commit(s) were added to refs/heads/next by this push:
     new a1b5804  examples tweak
a1b5804 is described below

commit a1b580457a4ea8f99b5b42c2e945043260ad6936
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Sep 20 13:13:06 2020 +0800

    examples tweak
---
 public/data/scatter-label-align-top.js        | 1 +
 public/data/scatter-logarithmic-regression.js | 1 -
 tool/build-example.js                         | 7 ++++---
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/public/data/scatter-label-align-top.js b/public/data/scatter-label-align-top.js
index 20dd2d3..91d9cac 100644
--- a/public/data/scatter-label-align-top.js
+++ b/public/data/scatter-label-align-top.js
@@ -28,6 +28,7 @@ option = {
         labelLayout: {
             y: 20,
             align: 'center',
+            hideOverlap: true,
             moveOverlap: 'shiftX'
         },
         labelLine: {
diff --git a/public/data/scatter-logarithmic-regression.js b/public/data/scatter-logarithmic-regression.js
index 2e329a5..02e9a6e 100644
--- a/public/data/scatter-logarithmic-regression.js
+++ b/public/data/scatter-logarithmic-regression.js
@@ -208,7 +208,6 @@ option = {
                 show: true,
                 position: 'left',
                 formatter: myRegression.expression,
-                color: '#333',
                 fontSize: 14
             },
             data: [{
diff --git a/tool/build-example.js b/tool/build-example.js
index 8d2086f..a547ad3 100644
--- a/tool/build-example.js
+++ b/tool/build-example.js
@@ -9,6 +9,7 @@ const minimatch = require('minimatch');
 const {execFile} = require('child_process');
 const cwebpBin = require('cwebp-bin');
 const util = require('util');
+const chalk = require('chalk');
 
 const parser = new argparse.ArgumentParser({
     addHelp: true
@@ -59,7 +60,7 @@ async function convertToWebP(filePath) {
 async function takeScreenshot(browser, theme, rootDir, basename) {
     const thumbFolder = (theme !== 'default') ? ('thumb-' + theme) : 'thumb';
     const page = await browser.newPage();
-    page.exposeFunction('readLocalFile', async (filePath) => {
+    await page.exposeFunction('readLocalFile', async (filePath) => {
         filePath = filePath.replace(/^file:\/*?/, '');
         return new Promise((resolve, reject) => {
             fs.readFile(filePath, 'utf8', (err, text) => {
@@ -90,8 +91,8 @@ async function takeScreenshot(browser, theme, rootDir, basename) {
     //     console.log.apply(console, msg);
     // });
     page.on('pageerror', function (err) {
-        console.error('[pageerror in]', url);
-        console.log(err.toString());
+        console.error(chalk.red('[pageerror in]', url));
+        console.error(chalk.red(err.toString()));
     });
     page.on('console', msg => {
         const text = msg.text();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org