Skip to content

Commit

Permalink
fixed error
Browse files Browse the repository at this point in the history
  • Loading branch information
cumany committed Jun 22, 2022
1 parent a51a5e2 commit f80fe5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
14 changes: 0 additions & 14 deletions src/chartsCreator.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Plugin, parseYaml } from 'obsidian'
import Renderer from 'renderer'
import ChartsCreator from 'chartsCreator';
import EchartsModal from 'modal';
import { OptionsType } from './type';
import * as echarts from 'echarts'

Expand All @@ -12,7 +12,7 @@ export default class EchartsPlugin extends Plugin {
id: "echarts-create-charts",
name: "create echarts",
callback: () => {
const creator = new ChartsCreator(this.app)
const creator = new EchartsModal(this.app,"pie")
creator.createPie()
},
});
Expand Down
12 changes: 4 additions & 8 deletions src/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ export default class EchartsModal extends Modal {
chartType: string
constructor(app: App, chartType: string) {
super(app)
this.chartType = 'pie'
this.chartType = chartType
}

pieModal() {
createPie() {
let option = {
source: '',
}
Expand All @@ -33,13 +32,10 @@ export default class EchartsModal extends Modal {
this.close()
})
})
this.open()
}

onOpen() {
if (this.chartType === 'pie') {
this.pieModal()
}
}


onClose() {
let { contentEl } = this
Expand Down

0 comments on commit f80fe5d

Please sign in to comment.