-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #267 from antvis/wthell
👹👺👹👺👹👺
- Loading branch information
Showing
10 changed files
with
97 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
src/plots/ring/component/annotation/central-text-template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import * as _ from '@antv/util'; | ||
|
||
/*tslint:disable*/ | ||
const container_style = | ||
"color:#8c8c8c;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';"; | ||
const containerStyle = | ||
"color:#8c8c8c;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';pointer-events:none;"; | ||
|
||
const name_style = 'font-weight:300;'; | ||
const nameStyle = 'font-weight:300;'; | ||
|
||
const value_style = 'font-size:32px;font-weight:bold;color:#4D4D4D'; | ||
const valueStyle = 'font-size:32px;font-weight:bold;color:#4D4D4D'; | ||
|
||
function getSingleDataTemplate(value, classId) { | ||
return `<div class="ring-guide-html ${classId}" style=${container_style}><span class="ring-guide-value" style=${value_style}>${value}</span></div>`; | ||
function getSingleDataTemplate(value, classId, size) { | ||
const domStyle = `${containerStyle}width:${size}px;`; | ||
return `<div class="ring-guide-html ${classId}" style=${domStyle}><span class="ring-guide-value" style=${valueStyle}>${value}</span></div>`; | ||
} | ||
|
||
function getTwoDataTemplate(name, value, classId) { | ||
return `<div class="ring-guide-html ${classId}" style=${container_style}><span class="ring-guide-name" style=${name_style}>${name}</span><br/><span class="ring-guide-value" style=${value_style}>${value}</span></div>`; | ||
function getTwoDataTemplate(name, value, classId, size) { | ||
const domStyle = `${containerStyle}width:${size}px;`; | ||
return `<div class="ring-guide-html ${classId}" style=${domStyle}><span class="ring-guide-name" style=${nameStyle}>${name}</span><br/><span class="ring-guide-value" style=${valueStyle}>${value}</span></div>`; | ||
} | ||
|
||
export { getSingleDataTemplate, getTwoDataTemplate }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters