Skip to content

Commit

Permalink
remove instance, generates by preset
Browse files Browse the repository at this point in the history
  • Loading branch information
MiRo1310 committed Dec 19, 2023
1 parent 5034d93 commit 39248d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion admin/build/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions admin/build/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin/src/lib/entrys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export const tabValues = [
searchRoot: { root: "echarts", type: ["chart"] },

entrys: [
{ name: "trigger", val: "", headline: "Trigger" },
{ name: "echartInstance", val: "echarts.0", headline: "Echart Instance", width: "40%" },
{ name: "preset", val: "", headline: "Preset", width: "20%", elementGetRows: "preset", search: true },
{ name: "trigger", val: "", headline: "Trigger", width: "20%" },
// { name: "echartInstance", val: "echarts.0", headline: "Echart Instance", width: "40%" },
{ name: "preset", val: "", headline: "Preset", width: "40%", elementGetRows: "preset", search: true },
{ name: "background", val: "#FFFFFF", headline: "Background", width: "10%" },
{ name: "theme", val: "light", headline: "Theme", width: "10%" },
{ name: "filename", val: "echarts-temp-photo.jpg", headline: "Filename", width: "20%" },
Expand Down
6 changes: 4 additions & 2 deletions lib/js/echarts.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const { sendToTelegram } = require("./telegram");
function getChart(_this, echarts, directoryPicture, user, instanceTelegram, userListWithChatID, resize_keyboard, one_time_keyboard) {
try {
if (!echarts && !echarts[0].echartInstance) return;
if (!echarts) return;
for (const echart of echarts) {
const splitted = echart.preset.split(".");
const echartInstance = splitted[0] + "." + splitted[1];
_this.sendTo(
echart.echartInstance,
echartInstance,
{
preset: echart.preset,
renderer: "jpg",
Expand Down

0 comments on commit 39248d1

Please sign in to comment.