mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 11:40:13 +00:00
Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d2f83169d | ||
|
|
a7c4e24555 | ||
|
|
6fad4fcccc | ||
|
|
95e40c6f1a | ||
|
|
8e30a370b5 | ||
|
|
d94e304058 | ||
|
|
34dc49004e | ||
|
|
61c6d68c4c | ||
|
|
50a666fecc | ||
|
|
626a187758 | ||
|
|
dee06f8d6f | ||
|
|
e6eea34a45 | ||
|
|
76b8146e53 | ||
|
|
240eda0be2 | ||
|
|
6fa093bc80 | ||
|
|
5884fd99dd | ||
|
|
f177799202 | ||
|
|
2d3f5dd51d | ||
|
|
b9ca646e0c | ||
|
|
c157c07b0d | ||
|
|
82d0788905 | ||
|
|
a7ac0277a7 | ||
|
|
3f36c27384 | ||
|
|
e4da5e30dc | ||
|
|
bfa68fd037 | ||
|
|
c002ac071b | ||
|
|
5c2ea52118 | ||
|
|
0e25a23ed2 | ||
|
|
41a9606bee | ||
|
|
6f6248be77 | ||
|
|
2b5275b15d | ||
|
|
ca26fd7c21 | ||
|
|
a2e790561e | ||
|
|
f0e94d35b6 | ||
|
|
76f640f64d | ||
|
|
9d8dc80494 | ||
|
|
bc1d2ac095 | ||
|
|
913c8e1fb2 | ||
|
|
634bb45dc4 | ||
|
|
e4827ac262 | ||
|
|
9ad8a86ffc | ||
|
|
23a8ce52d1 | ||
|
|
38584f618b | ||
|
|
84c47e0d84 | ||
|
|
7ff1405de5 | ||
|
|
acae09bf28 | ||
|
|
b304bd2033 | ||
|
|
72c29235d8 | ||
|
|
5f18f060e3 | ||
|
|
a281028a22 | ||
|
|
fe702f3447 | ||
|
|
6888ba96e3 | ||
|
|
b261ef0573 | ||
|
|
64d0b047b3 | ||
|
|
5c395ade25 | ||
|
|
5149376806 | ||
|
|
d8f739cbdf | ||
|
|
71fb45af9f | ||
|
|
ca63d041b9 | ||
|
|
8fccfdb5fc | ||
|
|
f08ae794ae | ||
|
|
8efa8145b1 | ||
|
|
e247ad9e71 | ||
|
|
645506a6fd | ||
|
|
c5ef7e765b | ||
|
|
3949018555 | ||
|
|
34b0a97198 | ||
|
|
de3e482687 | ||
|
|
8dbbbd7405 | ||
|
|
3316fce8a5 | ||
|
|
f85f96a560 | ||
|
|
8f6f5790b6 |
13
.github/FUNDING.yml
vendored
13
.github/FUNDING.yml
vendored
@@ -1,13 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: ['https://github.com/XCharts-Team/XCharts/blob/master/Documentation~/zh/img/support_alipay.png','https://github.com/XCharts-Team/XCharts/blob/master/Documentation~/zh/img/support_wechat.png']
|
||||
20
.gitignore
vendored
20
.gitignore
vendored
@@ -1,6 +1,26 @@
|
||||
/.vs
|
||||
/.vscode
|
||||
.vs
|
||||
/XCharts-ios
|
||||
/Library
|
||||
/Temp
|
||||
/Logs
|
||||
/obj
|
||||
/UnityPackageManager
|
||||
/Packages
|
||||
/ProjectSettings/XRSettings.asset
|
||||
/Assets/Res
|
||||
/Assets/Res.meta
|
||||
/Assets/Package
|
||||
/Assets/Package.meta
|
||||
/Assets/TextMesh Pro
|
||||
/Assets/TextMesh Pro.meta
|
||||
/Doc/*.meta
|
||||
|
||||
/Assets/XChartsDemo/demo_test.unity
|
||||
/Assets/XChartsDemo/demo_test.unity.meta
|
||||
/Assets/XChartsDemo/empty.unity
|
||||
/Assets/XChartsDemo/empty.unity.meta
|
||||
|
||||
*.sln
|
||||
*.csproj
|
||||
|
||||
10
Assets/XCharts.meta
Normal file
10
Assets/XCharts.meta
Normal file
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e77b3cfd5a4d2646964841d2b14dcb2
|
||||
folderAsset: yes
|
||||
timeCreated: 1536101212
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,416 +1,50 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.8.0](#v380)
|
||||
[v3.7.0](#v370)
|
||||
[v3.6.0](#v360)
|
||||
[v3.5.0](#v350)
|
||||
[v3.4.0](#v340)
|
||||
[v3.3.0](#v330)
|
||||
[v3.2.0](#v320)
|
||||
[v3.1.0](#v310)
|
||||
[v3.0.1](#v301)
|
||||
[v3.0.0](#v300)
|
||||
[v3.0.0-preview9](#v300-preview9)
|
||||
[v3.0.0-preview8](#v300-preview8)
|
||||
[v3.0.0-preview7](#v300-preview7)
|
||||
[v3.0.0-preview6](#v300-preview6)
|
||||
[v3.0.0-preview5](#v300-preview5)
|
||||
[v3.0.0-preview4](#v300-preview4)
|
||||
[v3.0.0-preview3](#v300-preview3)
|
||||
[v3.0.0-preview2](#v300-preview2)
|
||||
[v3.0.0-preview1](#v300-preview1)
|
||||
[v2.8.1](#v281)
|
||||
[v2.8.0](#v280)
|
||||
[v2.7.0](#v270)
|
||||
[v2.6.0](#v260)
|
||||
[v2.5.0](#v250)
|
||||
[v2.4.0](#v240)
|
||||
[v2.3.0](#v230)
|
||||
[v2.2.3](#v223)
|
||||
[v2.2.2](#v222)
|
||||
[v2.2.1](#v221)
|
||||
[v2.2.0](#v220)
|
||||
[v2.1.1](#v211)
|
||||
[v2.1.0](#v210)
|
||||
[v2.0.1](#v201)
|
||||
[v2.0.0](#v200)
|
||||
[v2.0.0-preview.2](#v200-preview2)
|
||||
[v2.0.0-preview.1](#v200-preview1)
|
||||
[v1.6.3](#v163)
|
||||
[v1.6.0](#v160)
|
||||
[v1.5.2](#v152)
|
||||
[v1.5.1](#v151)
|
||||
[v1.5.0](#v150)
|
||||
[v1.4.0](#v140)
|
||||
[v1.3.1](#v131)
|
||||
[v1.3.0](#v130)
|
||||
[v1.2.0](#v120)
|
||||
[v1.1.0](#v110)
|
||||
[v1.0.5](#v105)
|
||||
[v1.0.4](#v104)
|
||||
[v1.0.3](#v103)
|
||||
[v1.0.2](#v102)
|
||||
[v1.0.1](#v101)
|
||||
[v1.0.0](#v100)
|
||||
[v0.8.3](#v083)
|
||||
[v0.8.2](#v082)
|
||||
[v0.8.1](#v081)
|
||||
[v0.8.0](#v080)
|
||||
[v0.5.0](#v050)
|
||||
[v0.1.0](#v010)
|
||||
[branch-2.0](#branch-2.0)
|
||||
[v2.8.2](#v2.8.2)
|
||||
[v2.8.1](#v2.8.1)
|
||||
[v2.8.0](#v2.8.0)
|
||||
[v2.7.0](#v2.7.0)
|
||||
[v2.6.0](#v2.6.0)
|
||||
[v2.5.0](#v2.5.0)
|
||||
[v2.4.0](#v2.4.0)
|
||||
[v2.3.0](#v2.3.0)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
[v2.2.1](#v2.2.1)
|
||||
[v2.2.0](#v2.2.0)
|
||||
[v2.1.1](#v2.1.1)
|
||||
[v2.1.0](#v2.1.0)
|
||||
[v2.0.1](#v2.0.1)
|
||||
[v2.0.0](#v2.0.0)
|
||||
[v2.0.0-preview.2](#v2.0.0-preview.2)
|
||||
[v2.0.0-preview.1](#v2.0.0-preview.1)
|
||||
[v1.6.3](#v1.6.3)
|
||||
[v1.6.1](#v1.6.1)
|
||||
[v1.6.0](#v1.6.0)
|
||||
[v1.5.2](#v1.5.2)
|
||||
[v1.5.1](#v1.5.1)
|
||||
[v1.5.0](#v1.5.0)
|
||||
[v1.4.0](#v1.4.0)
|
||||
[v1.3.1](#v1.3.1)
|
||||
[v1.3.0](#v1.3.0)
|
||||
[v1.2.0](#v1.2.0)
|
||||
[v1.1.0](#v1.1.0)
|
||||
[v1.0.5](#v1.0.5)
|
||||
[v1.0.4](#v1.0.4)
|
||||
[v1.0.3](#v1.0.3)
|
||||
[v1.0.2](#v1.0.2)
|
||||
[v1.0.1](#v1.0.1)
|
||||
[v1.0.0](#v1.0.0)
|
||||
[v0.8.3](#v0.8.3)
|
||||
[v0.8.2](#v0.8.2)
|
||||
[v0.8.1](#v0.8.1)
|
||||
[v0.8.0](#v0.8.0)
|
||||
[v0.5.0](#v0.5.0)
|
||||
[v0.1.0](#v0.1.0)
|
||||
|
||||
## master
|
||||
|
||||
## v3.8.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* Refactoring `Animation` animation system, adding support for `New Animation` and `Interactive animation`
|
||||
* Improved `PieChart` animation interactive representation
|
||||
* Added four new markers for `Symbol` : `EmptyTriangle`, `EmptyDiamond`, `Plus` and `Minus`
|
||||
* Improved `Chart` mouse interaction callback
|
||||
* Added the function of `LabelLine` to fix the horizontal coordinate
|
||||
* Added `GridLayout` grid layout component
|
||||
* Added `Auto` type for `Tooltip`
|
||||
* Optimizes and fixes several other issues
|
||||
|
||||
Log details:
|
||||
|
||||
* (2023.09.03) Release `v3.8.0`
|
||||
* (2023.09.01) Added `Tooltip` Auto to automatically set display type and trigger type
|
||||
* (2023.08.29) Added gridIndex support for `Ring` to set the specified grid
|
||||
* (2023.08.29) Added gridIndex support for Radar to set the specified grid
|
||||
* (2023.08.29) Added gridIndex support for `Pie` to set specified grids
|
||||
* (2023.08.29) Added the GridLayout component for managing multiple GridCoord layouts
|
||||
* (2023.08.25) Fixed display only one Label when there are multiple Marklines
|
||||
* (2023.08.25) Fixed MarkLine drawing outside the coordinate system after opening Clip
|
||||
* (2023.08.24) Optimizes `YAxis` to default 0-1 range when all data is 0
|
||||
* (2023.08.23) Fixed an issue where `Label` of `YAxis` could duplicate
|
||||
* (2023.08.22) Fixed `Bar` display hidden drawing performance exception
|
||||
* (2023.08.22) Improved Zebra histogram rendering performance (#276)
|
||||
* (2023.08.16) Added Daemon daemon to resolve an error after TMP is enabled locally
|
||||
* (2023.08.15) Fixed `Data` displaying axes incorrectly when data is between -1 and 1 (#273) (by __Ambitroc__)
|
||||
* (2023.08.14) Fixed `XCharts` updating error after` TextMeshPro `and` NewInputSystem `are enabled locally (#272)
|
||||
* (2023.08.12) Fixed `Chart` error when deleted at runtime (#269)
|
||||
* (2023.08.11) Fixed an issue where data could not be added when DataZoom was enabled
|
||||
* (2023.08.11) Fixed `itemFormatter` not working when `SerieData` sets ItemStyle separately
|
||||
* (2023.08.10) Improved BarChart`s performance when Tooltip`s Trigger is an Item
|
||||
* (2023.08.09) Added `Axis` to support dynamic icon colors by setting `color` of `IconStyle` to `clear`
|
||||
* (2023.08.08) Added support for `Pie` for `LabelLine`s` lineEndX `
|
||||
* (2023.08.05) Clean up the code for `Examples` and remove unnecessary use cases
|
||||
* (2023.08.04) Added support for `LabelLine`'s `lineEndX` to set the boot line to fixed X position
|
||||
* (2023.08.04) Added support for Ring`s avoidLabelOverlap to avoid text stacking (#247)
|
||||
* (2023.08.03) Improved Chart`s onSerieEnter, onSerieExit, and onSerieClick callbacks
|
||||
* (2023.08.02) Fixed invalid `onSerieEnter` and `onSerieExit` callbacks for `BarChart`
|
||||
* (2023.08.02) Added support for Symbol's `Plus` and `Minus` signs
|
||||
* (2023.07.31) Added support for Symbol's `EmptyTriangle` and `EmptyDiamond`, improved `Symbol` performance
|
||||
* (2023.07.31) Improved the default configuration effect of `Line`
|
||||
* (2023.07.27) Add `Serie` to `minRadius` to set minimum radius
|
||||
* (2023.07.26) Added `MLValue` multiple values
|
||||
* (2023.07.25) Added `XLog` log system
|
||||
* (2023.07.18) Improved the interactive animation effect of `Pie` pie chart
|
||||
* (2023.07.14) Added support for `Animation` `Interaction` interactive animation configuration
|
||||
* (2023.07.11) Added `Animation` `Addition` new animation configuration support
|
||||
* (2023.07.11) Reconstructs `Animation` animation system to improve animation experience
|
||||
* (2023.06.30) Added support for PolarCood`s indicatorLabelOffset setting indicating text offsets
|
||||
* (2023.06.30) Fixed an issue where the background color of Axis `IndicatorLabel` could be abnormal
|
||||
* (2023.06.30) Added support for Axis `IndicatorLabel` customizable `color`
|
||||
* (2023.06.12) Fixed an issue where AxisLabel's formatterFunction had the wrong value on the value axis
|
||||
|
||||
## v3.7.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* Added `HelpDoc` official website help document redirection
|
||||
* Added support for `Clip` for `Line`
|
||||
* Optimize the range Settings of `Axis`
|
||||
* Other optimizations and fixes
|
||||
|
||||
Log details:
|
||||
|
||||
* (2022.06.08) Release v3.7.0
|
||||
* (2023.06.04) Added `HelpDoc` help document skip
|
||||
* (2023.05.30) Fixed Serie name with `_` line causing `Legend` to not fire (#252) (by __svr2kos2__)
|
||||
* (2023.05.10) Added `MinMaxAuto` range type for `Axis`
|
||||
* (2023.05.10) Added support for `Clip` for `Line`
|
||||
* (2023.05.04) Fixed `Axis` setting` CeilRate `not taking effect in range -1 to 1
|
||||
* (2023.05.04) Optimizes MinMax type range calculations for Axis
|
||||
* (2023.05.04) Fixed AxisLabel displaying `Label` formatting incorrectly when the data is all floating point numbers less than 1
|
||||
* (2023.05.04) Fixed `Theme` being reset after modifying default theme parameters
|
||||
* (2023.05.04) Added `Warning` when `Symbol` selects `Custom` type
|
||||
* (2023.04.15) Fixed `DataZoom` may be abnormal in multiple charts (#252)
|
||||
* (2023.04.14) Fixed `Tooltip` may be abnormal when there is only one data
|
||||
* (2023.04.14) Added `BaseChart`s `TriggerTooltip()` interface to try to trigger `ToolTip`
|
||||
* (2023.04.12) Optimizes` RadarCood `setting` startAngle `with text following the adjustment position
|
||||
* (2023.04.12) Added `Radar` support for wildcard `{b}`
|
||||
* (2023.04.11) Fixed an issue where Inspector could be abnormal when dynamically adding components
|
||||
|
||||
## v3.6.0
|
||||
|
||||
* (2023.04.01) Release `v3.6.0` version
|
||||
* (2023.03.14) Fix for Tooltip's `titleFormater` setting `{b}` may not take effect
|
||||
* (2023.03.14) Fix for `BarChart` not drawing bar background when data is 0 (#250) (by __Ambitroc__)
|
||||
* (2023.03.12) Added `LabelStyle` `autoRotate` to set automatic rotation of angled vertical text
|
||||
* (2023.03.10) Added `VR` and other non-mouse input for Point location acquisition (#248) (by __Ambitroc__)
|
||||
* (2023.03.09) Adds callbacks to Chart's `onSerieClick`, `onSerieDown`, `onSerieEnter` and `onSerieExit`
|
||||
* (2023.03.09) Fixed click-check offset for `Pie` not taking effect
|
||||
* (2023.03.04) Added Positions for Legend to customize legend positions
|
||||
* (2023.03.03) Fixed `Animation` changing animation that might not work
|
||||
* (2023.02.28) Fixed issue with Serie's Label not refreshing when `Legend` is clicked
|
||||
* (2023.02.26) Adds DataZoom's `startEndFunction` delegate
|
||||
* (2023.02.12) Refactor the Component code and adjust the API
|
||||
* (2023.02.10) Fix `Axis` with incorrect minimum in `Log` axis in some cases
|
||||
* (2023.02.10) Optimizes the default display format of Axis's value Label
|
||||
* (2023.02.08) Added startLock and endLock for DataZoom
|
||||
* (2023.02.02) Fixed bug where datazoom xaxis label could be displayed off-chart when datazoom is turned on
|
||||
* (2023.02.02) Optimizes the `ignore` setting of `SerieData` to ignore data
|
||||
* (2023.02.01) Fix `XChartsMgr.ContainsChart()` interface exception
|
||||
* (2023.01.31) Added support for `InputSystem` (#242) (by __Bian-Sh__)
|
||||
* (2023.01.11) Fixed chart not refreshing after removing Component from Inspector (#241)
|
||||
* (2023.01.06) Fixed bug with `Pie` displaying abnormal Label when the last few values are 0 (#240)
|
||||
* (2023.01.03) deletes serie `MarkColor` and adds ItemStyle `MarkColor`
|
||||
* (2022.12.29) Added `+` to list editor
|
||||
* (2022.12.29) Fixed `UpdateXYData()` interface affecting data accuracy (#238)
|
||||
* (2022.12.28) Fixed abnormal display when setting `border` when `Pie` has only one data (#237)
|
||||
* (2022.12.22) Adjust `Covert` rename to `Convert`, involving interfaces such as: `ConvertXYAxis()`, `CovertSerie()`, etc
|
||||
* (2022.12.22) Fixed abnormal display of `Label` after `Convert XY Axis`
|
||||
* (2022.12.12) Fixed an issue where the `Value` Axis of `axis` calculated the value range incorrectly in some cases
|
||||
* (2022.12.12) Optimized legend's formatter to support `{h}` wildcards
|
||||
* (2022.12.12) Fixed abnormal display of Legend's formatter when set to a fixed value
|
||||
* (2022.12.08) Added `AreaStyle` `toTop` parameter to set whether the line graph gradient goes to the top or to the actual position
|
||||
* (2022.12.07) Adds text wildcard `{h}` for `Formatter` to support setting current color values
|
||||
|
||||
## v3.5.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* Updated documentation structure, added [Official XCharts Homepage](https://xcharts-team.github.io)
|
||||
* Added support for the DataZoom box selected.
|
||||
* Added support for maximum width Settings for bars.
|
||||
* Other optimizations.
|
||||
|
||||
Upgrade Note:
|
||||
|
||||
* Due to the adjustment of the document directory structure, it is recommended to back up the files before upgrading and delete the original XCharts before upgrading them.
|
||||
|
||||
Log details:
|
||||
|
||||
* (2022.12.01) Release v3.5.0
|
||||
* (2022.11.30) Increase `Serie` `barMaxWidth` can set the maximum width of `Bar`
|
||||
* (2022.11.30) Optimize `Tooltip`s` Shadow `drawing to stay within chart scope
|
||||
* (2022.11.29) Fix an issue with `Serie` data item index exception indicated by `Tooltip`
|
||||
* (2022.11.27) Optimizes the offset Settings for `Axis` `AxisName`
|
||||
* (2022.11.27) Optimize the Position of `Comment` by replacing position with `Location`
|
||||
* (2022.11.27) Optimizes` Tooltip ` `LineStyle` to support setting `Shadow` when using color
|
||||
* (2022.11.27) Adjust the Documentation structure
|
||||
* (2022.11.26) Optimizes LabelLine's `symbol` not to be displayed by default
|
||||
* (2022.11.26) Fixed `LineChart` adding unordered data display exception when `XY` is numeric axis
|
||||
* (2022.11.26) Fixed an exception when selecting `DataZoom` from right to left
|
||||
* (2022.11.20) Rename `UdpateXAxisIcon()` interface to `UpdateXAxisIcon()` (#235)
|
||||
* (2022.11.12) Added `Pie` `LabelLine` support `Symbol`
|
||||
* (2022.11.12) Added `DataZoom` `MarqueeStyle` support box selection area
|
||||
* (2022.11.10) Optimized area color fill effect for `Radar` when type is` Single `
|
||||
* (2022.11.04) Fixed exception after itemFormatter `Tooltip` set wildcard `{d}`
|
||||
|
||||
## v3.4.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* Added `indicatorLabel` of `Axis` to set different indicator text styles separately
|
||||
* Add `markColor` of `Serie` to set the logo color
|
||||
* Add `startAngle` of `RadarCoord` to set the starting Angle of `Radar`
|
||||
* Optimize the numerical interval representation of `Axis`
|
||||
* Added `DataZoom` support for numeric axes
|
||||
* Add `SmoothLimit` of `Line` to control different effects of smoothing curves
|
||||
|
||||
Details:
|
||||
|
||||
* (2022.11.01) Release `v3.4.0` version
|
||||
* (2022.10.30) adds API: `AddData()`, `ClearSerieData()`, `ClearComponentData()`
|
||||
* (2022.10.30) Added `Axis`'s `indicatorLabel`, removed `Tooltip`'s `indicatorLabelStyle` (#226)
|
||||
* (2022.10.29) Add `Serie` `markColor` to set logo colors for display of `Legend` and `Tooltip` (#229)
|
||||
* (2022.10.26) increase the startAngle of RadarCoord to set the startAngle of Radar
|
||||
* (2022.10.21) Fixed `Chart` not displaying `Label` properly when controlled by `Layout` (#231)
|
||||
* (2022.10.21) fixed compatibility issues on Unity2019.2
|
||||
* (2022.10.18) Optimize the numerical performance of `Axis`
|
||||
* (2022.10.15) Fixed an issue where `Axis` `Label` might not appear properly when `DataZoom` is enabled (#227)
|
||||
* (2022.10.14) Added `DataZoom` support for numeric axes
|
||||
* (2022.10.13) Fixed the `Pie` circle with abnormal border Settings (#225)
|
||||
* (2022.10.13) Fixed the `Download` interface causing the `iOS` platform packaging failure
|
||||
* (2022.10.12) Added support for `Animation` `UnscaledTime` to set whether the animation is affected by TimeScale (#223)
|
||||
* (2022.10.10) Optimizes the `Documentation~` format
|
||||
* (2022.10.10) Add `Line` `SmoothLimit` to control different effects of smoothing curves
|
||||
* (2022.10.05) Fixed an issue where `Serie` hid information when `Tooltip` was also displayed
|
||||
* (2022.09.30) Fixed `DivideByZeroException` when Chart `is very small (#230)
|
||||
|
||||
## v3.3.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* Optimized chart details to support more functions
|
||||
* Add lots of Demo examples
|
||||
* Improved documentation and fixed several issues
|
||||
* Added PolarChart support for Bar and Heatmap
|
||||
* Added a HeatmapChart type
|
||||
* Improved Tooltip display
|
||||
|
||||
Details:
|
||||
|
||||
* (2022.09.26) Optimizes the default number of segments for `Axis` at the category Axis
|
||||
* (2022.09.25) Fixed the problem that some interfaces in the `API` document were not exported
|
||||
* (2022.09.24) optimize `FunnelChart`
|
||||
* (2022.09.23) Optimizes `ParallelChart`
|
||||
* (2022.09.22) Added `SaveAsImage()` interface to save charts to images
|
||||
* (2022.09.21) Fixed an issue where the `InsertSerie()` interface did not refresh the graph
|
||||
* (2022.09.21) Optimized `PolarChart` for `Line` thermal map support
|
||||
* (2022.09.20) Added `PolarChart` support for `Heatmap`
|
||||
* (2022.09.19) Added `PolarChart` support for multi-bar graphs and stacked bar graphs
|
||||
* (2022.09.16) Added `PolarChart` support for `Bar` histogram
|
||||
* (2022.09.14) Added support for `PolarCoord` to set ring polar coordinates via `Radius`
|
||||
* (2022.09.09) Fixed an issue where some components of edit parameters in `Editor` might not refresh in real time
|
||||
* (2022.09.08) Added support for `RingChart` settable `LabelLine` bootline
|
||||
* (2022.09.06) Added support for `SerieSymbol` `minSize` and `maxSize` parameters to set maximum and minimum sizes
|
||||
* (2022.09.06) Added support for `showStartLine` and `showEndLine` parameters for `AxisSplitLine` to set whether to display the first splitter
|
||||
* (2022.09.06) Added `Heatmap` support for different patterns via `symbol`
|
||||
* (2022.09.05) Added `Heatmap` `heatmapType` support for setting `Data` and `Count` two different mapping methods of Heatmap
|
||||
* (2022.09.05) Optimizes `Tooltip` when indicating numerical axis in thermograph
|
||||
* (2022.09.02) Added `onPointerEnterPie` callback support
|
||||
* (2022.09.02) Optimize the HeatmapChart `
|
||||
* (2022.08.30) optimizes` RadarChart `
|
||||
* (2022.08.30) Fixed `DataZoom` calculation range inaccuracies in some cases (#221)
|
||||
* (2022.08.29) optimizes the default behavior of `BarChart` when data is too dense
|
||||
* (2022.08.29) optimizes `YAxis` Max/min calculations when `DataZoom` is enabled
|
||||
* (2022.08.29) optimized `CandlestickChart` massive data rendering
|
||||
* (2022.08.28) fixed an issue where `LineChart` does not appear properly in the case of stacking and custom Y-axis range
|
||||
* (2022.08.26) Added `Legend` new icon type `Candlestick`
|
||||
* (2022.08.26) optimizes` CandlestickChart `performance and adjusts related` AddData() `interface parameters
|
||||
* (2022.08.26) Added support for setting different display positions in Tooltip's `position` parameter
|
||||
* (2022.08.26) Delete the `fixedXEnable` and `fixedYEnable` arguments of Tooltip
|
||||
* (2022.08.25) EmphasisStyle `EmphasisStyle` has emphasised the support for `label`
|
||||
* (2022.08.25) Added support for `formatter` for `{d3}` specified percentage of dimension data
|
||||
* (2022.08.24) fixed the `label` of the `ScatterChart` not refreshing
|
||||
* (2022.08.24) fixed abnormal display of `label` of `MarkLine` in some cases
|
||||
|
||||
## v3.2.0
|
||||
|
||||
Highlights:
|
||||
|
||||
* `Serie` supports highlighting, EmphasisStyle, EmphasisStyle, BlurStyle, and SelectStyle
|
||||
* `Axis` supports sub-scale and sub-partition of coordinate axes:`MinorTick` and `MinorSplitLine`
|
||||
* `Serie` supports different color selection strategies: `colorBy`
|
||||
* `Radar` supports smooth curves: `smooth`
|
||||
* `Line` supports filling as a convex polygon: `AreaStyle` `innerFill`
|
||||
* `DataZoom` supports timeline
|
||||
* Other optimizations and issue fixes
|
||||
|
||||
Details:
|
||||
|
||||
* (2022.08.16) Release `v3.2.0` version
|
||||
* (2022.08.15) optimized `Smooth` Bezier curve algorithm
|
||||
* (2022.08.13) Fixed an issue where the `DataZoom` component might not display correctly when opened
|
||||
* (2022.08.11) Optimized Tooltip supports `ignoreDataDefaultContent`
|
||||
* (2022.08.10) fixed abnormal display of some components of `Chart` under 3D camera
|
||||
* (2022.08.10) Fix `RemoveSerie()` interface not working (#219)
|
||||
* (2022.08.10) Optimized font synchronization for Theme
|
||||
* (2022.08.10) optimizes the default `layer` of Chart to `UI`
|
||||
* (2022.08.09) optimizes the `Time` timeline of `Axis`
|
||||
* (2022.08.09) Added AreaStyle `innerFill` parameter to support filling convex polygons
|
||||
* (2022.08.08) Optimized the maintenance of data item indexes in `Serie`, added detection and repair functions, and fixed related problems
|
||||
* (2022.07.29) Fixed `Unity` version compatibility: Chart creation exception after some versions import
|
||||
* (2022.07.29) Add `Axis` to` Time `timeline, support sub-scale and sub-divider
|
||||
* (2022.07.28) optimizes the `Radar` image
|
||||
* (2022.07.28) increase `Serie` `colorBy` parameter configuration color taking strategy
|
||||
* (2022.07.27) Adds StateStyle `Symbol` to configure the Symbol style in the state
|
||||
* (2022.07.27) remove selectedSize from SerieSymbol
|
||||
* (2022.07.24) adds default state Settings for `Serie` and `SerieData`
|
||||
* (2022.07.22) add three states` EmphasisStyle `, `EmphasisStyle`, `SelectStyle` of `Serie`
|
||||
* (2022.07.22) remove `highlightColor` and `highlightToColor` arguments from `AreaStyle`
|
||||
* (2022.07.22) Omit the `Emphasis`,` EmphasisItemStyle `, `EmphasisLabelStyle`, `EmphasisLabelLine` component
|
||||
* (2022.07.20) Added `Since` feature support for classes
|
||||
* (2022.07.20) fixed the `showStartLabel` and `showEndLabel` parameter Settings for `AxisLabel` not taking effect when `Axis` is on the` Value `Axis
|
||||
* (2022.07.19) Added `Axis` to` MinorSplitLine `to set the Axis degree divider
|
||||
* (2022.07.19) Added `Axis` `MinorTick` to set the Axis sub-scale
|
||||
* (2022.07.17) Add the `smooth` parameter for Radar to set the smooth curve
|
||||
* (2022.07.15) Added DataZoom support for the `Time` timeline
|
||||
|
||||
## v3.1.0
|
||||
|
||||
* (2022.07.12) Release `v3.1.0` version
|
||||
* (2022.07.12) Fixed `Serie` `ignoreLineBreak` not working
|
||||
* (2022.07.07) Optimized `Axis` `minMaxType` to support precision to decimals when specified as `MinMax`
|
||||
* (2022.07.05) Fixed drawing exception when there are multiple coordinate systems in `Chart` (#210)
|
||||
* (2022.07.04) Added the axisMaxSplitNumber parameter of `Settings` to set the maximum number of partitions for `Axis`
|
||||
* (2022.07.04) Fixed Axis` Tick `drawing position after setting `offset`(#209)
|
||||
* (2022.07.03) Optimize the `AxisLabel` formatterFunction custom delegate
|
||||
* (2022.07.03) Added the `onZero` parameter of `AxisName` to support setting the coordinate AxisName and position to match the Y-axis 0 scale (#207)
|
||||
* (2022.07.02) Fixed bug where `Legend` was not working when `PieChart` was being created dynamically with code (#206)
|
||||
* (2022.07.02) Fixed `YAxis` AxisLabel setting `onZero` not working
|
||||
* (2022.07.02) Fixed `AxisLabel` code refreshing after setting `distance` property
|
||||
* (2022.06.30) Fixed an issue where components could not be initialized when creating diagrams under `Runtime` code
|
||||
* (2022.06.29) Added `itemFormatter` support for `{c0}` in `Tooltip` to display dimension data (#205)
|
||||
* (2022.06.28) Optimize text performance when `Pie` sets up `avoidLabelOverlap` (#56)
|
||||
* (2022.06.25) Optimize smooth curve representation of `Line` (#169)
|
||||
* (2022.06.25) Fixed inconsistent display of `Tooltip` when `DataZoom` is enabled (#203)
|
||||
* (2022.06.25) Fixed `Toolip` drawing exception when there is no data in the category axis (#204)
|
||||
* (2022.06.25) Optimize `Serie` setting `PlaceHolder` for `Tooltip` performance
|
||||
* (2022.06.25) Added `Since` to identify the version from which the configuration parameter is supported
|
||||
* (2022.06.24) Optimize `Painter` drawing layer, `Top` layer is subdivided into `Upper` and `Top` layers
|
||||
* (2022.06.24) Added `Legend` support for `Background` and `Padding`
|
||||
* (2022.06.21) Added `TextStyle` support for `Sprite Asset` of `TextMeshPro` (#201)
|
||||
* (2022.06.20) Optimize boundary limits for `Tooltip` (#202)
|
||||
* (2022.06.20) Fixes compilation error when `TextMeshPro` is turned on
|
||||
* (2022.06.20) Fixed issue where the fade Animation of `Animation` would not work
|
||||
|
||||
## v3.0.1
|
||||
|
||||
* (2022.06.16) Release `v3.0.1` version
|
||||
* (2022.06.16) Fixed an issue where the `foldout` arrow on `Inspector` could not be expanded
|
||||
* (2022.06.15) Optimized `Doc` auto-generation, improved code comments and configuration item manual documentation
|
||||
* (2022.06.14) Optimized `SerieLabelStyle` to support dynamic adjustment of `Icon`
|
||||
* (2022.06.13) Optimized `Background` setting
|
||||
* (2022.06.10) Added `Legend` AxisLabel support for `autoColor`
|
||||
* (2022.06.08) Fixed issue where `Axis` `AxisLabel` still shows the first and last two labels when not displayed
|
||||
|
||||
## v3.0.0
|
||||
|
||||
* More robust underlying framework.
|
||||
* More powerful performance.
|
||||
* Smaller serialized files.
|
||||
* Better interactive experience.
|
||||
* More component support.
|
||||
* More powerful ability to self-report text.
|
||||
* More reasonable component adjustments.
|
||||
* More flexible component insertion and removal.
|
||||
* More efficient secondary development.
|
||||
* Richer Demo examples.
|
||||
* Added `Time` axis.
|
||||
* Added `SingleAxis`.
|
||||
* Added multiple coordinate systems: `Grid`, `Polar`, `Radar`, `SingleAxis`.
|
||||
* Added multiple animation methods.
|
||||
* Added multiple chart interactions.
|
||||
* Added internationalization support.
|
||||
* Added `Widgets`.
|
||||
* Added multiple extension charts.
|
||||
|
||||
## v3.0.0-preview9
|
||||
|
||||
## v3.0.0-preview8
|
||||
|
||||
## v3.0.0-preview7
|
||||
|
||||
## v3.0.0-preview6
|
||||
|
||||
## v3.0.0-preview5
|
||||
|
||||
## v3.0.0-preview4
|
||||
|
||||
## v3.0.0-preview3
|
||||
|
||||
## v3.0.0-preview2
|
||||
|
||||
## v3.0.0-preview1
|
||||
## branch-2.0
|
||||
|
||||
## v2.8.2
|
||||
|
||||
@@ -467,13 +101,13 @@ Details:
|
||||
|
||||
## v2.4.0
|
||||
|
||||
Highlights:
|
||||
### Main points
|
||||
|
||||
* LineChart support the line of ignore data is disconnected or connected
|
||||
* LineChart support animation at a constant speed
|
||||
* Other optimizations and bug fixes
|
||||
|
||||
Details:
|
||||
### Details
|
||||
|
||||
* (2021.08.31) Release `v2.4.0` version
|
||||
* (2021.08.31) Optimized the gradient effect of `RingChart`
|
||||
@@ -492,7 +126,7 @@ Details:
|
||||
|
||||
## v2.3.0
|
||||
|
||||
Highlights:
|
||||
### Main points
|
||||
|
||||
* Data store upgraded from `float` to `double`
|
||||
* Added `MarkLine`
|
||||
@@ -502,11 +136,11 @@ Highlights:
|
||||
* `PieChart` optimization
|
||||
* Problem fixes
|
||||
|
||||
Upgrade Note:
|
||||
### Upgrade Note
|
||||
|
||||
* Since the data type is upgraded to `double`, the implicit conversion of `float` to `double` may have precision problems, so it is recommended that all previous data types of `float` be manually changed to `double`.
|
||||
Since the data type is upgraded to `double`, the implicit conversion of `float` to `double` may have precision problems, so it is recommended that all previous data types of `float` be manually changed to `double`.
|
||||
|
||||
Details:
|
||||
### Details
|
||||
|
||||
* (2021.07.24) Release `v2.3.0` version
|
||||
* (2021.07.22) Improved `SerieSymbol` to support `PictorialBarchart` extension
|
||||
@@ -524,7 +158,7 @@ Details:
|
||||
* (2021.06.27) Added `DataZoom`'s `orient` parameter to set horizontal or vertical styles
|
||||
* (2021.06.21) Added `iconStyle`'s `AutoHideWhenLabelEmpty` to set whether the icon is automatically hidden when `label` is empty
|
||||
|
||||
## v2.2.3
|
||||
# # v2.2.3
|
||||
|
||||
* (2021.06.20) Release `v2.2.3` version
|
||||
* (2021.06.20) Fixed the default display of `Icon` in `Axis`
|
||||
@@ -657,7 +291,7 @@ Details:
|
||||
## v1.6.0
|
||||
|
||||
* (2020.08.24) Release `v1.6.0` version
|
||||
* (2020.08.23) Refactor code, replace `Color` with `Color32` for reduce implicit conversion (Can cause custom colors to lose, reference [FAQ 29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation~/fqa.md) to upgrade)
|
||||
* (2020.08.23) Refactor code, replace `Color` with `Color32` for reduce implicit conversion (Can cause custom colors to lose, reference [Q&A 29](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Documentation/xcharts-questions-and-answers-EN.md) to upgrade)
|
||||
* (2020.08.15) Optimized `PieChart` drawing performance effect #85
|
||||
* (2020.08.11) Added `LiquidChart` data change animation#83
|
||||
* (2020.08.11) Optimized `PieChart` text stack and lead line effects#85
|
||||
@@ -705,7 +339,7 @@ Details:
|
||||
* (2020.05.30) 优化`PieChart`支持设置`ignoreValue`不显示指定数据
|
||||
* (2020.05.30) 修复`RadarChart`为`Circle`时不绘制`SplitArea`的问题
|
||||
* (2020.05.30) 优化`RadarChart`在设置`max`为`0`时可自动刷新最大值
|
||||
* (2020.05.29) 修复`PieChart`设置`gap`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.29) 修复`PieChart`设置`space`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.27) 修复调用`UpdateDataName()`接口时不会自动刷新的问题
|
||||
* (2020.05.27) 优化`柱状图`的渐变色效果
|
||||
* (2020.05.24) 修复`Axis`同时设置`boundaryGap`和`alignWithLabel`时`Tick`绘制异常的问题
|
||||
@@ -732,7 +366,7 @@ Details:
|
||||
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
|
||||
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
|
||||
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
|
||||
* (2020.04.18) 增加`Convert XY Axis`互换XY轴配置
|
||||
* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
|
||||
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
|
||||
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
|
||||
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c7e32dee55f747fdba157f6230f52b2
|
||||
guid: 042c85734494346adab5b3233234d261
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,493 +1,53 @@
|
||||
---
|
||||
sidebar_position: 61
|
||||
slug: /changelog
|
||||
---
|
||||
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.8.0](#v380)
|
||||
[v3.7.0](#v370)
|
||||
[v3.6.0](#v360)
|
||||
[v3.5.0](#v350)
|
||||
[v3.4.0](#v340)
|
||||
[v3.3.0](#v330)
|
||||
[v3.2.0](#v320)
|
||||
[v3.1.0](#v310)
|
||||
[v3.0.1](#v301)
|
||||
[v3.0.0](#v300)
|
||||
[v3.0.0-preivew9](#v300-preivew9)
|
||||
[v3.0.0-preivew8](#v300-preivew8)
|
||||
[v3.0.0-preivew7](#v300-preivew7)
|
||||
[v3.0.0-preivew6](#v300-preivew6)
|
||||
[v3.0.0-preivew5](#v300-preivew5)
|
||||
[v3.0.0-preivew4](#v300-preivew4)
|
||||
[v3.0.0-preivew3](#v300-preivew3)
|
||||
[v3.0.0-preivew2](#v300-preivew2)
|
||||
[v3.0.0-preivew1](#v300-preivew1)
|
||||
[v2.8.1](#v281)
|
||||
[v2.8.0](#v280)
|
||||
[v2.7.0](#v270)
|
||||
[v2.6.0](#v260)
|
||||
[v2.5.0](#v250)
|
||||
[v2.4.0](#v240)
|
||||
[v2.3.0](#v230)
|
||||
[v2.2.3](#v223)
|
||||
[v2.2.2](#v222)
|
||||
[v2.2.1](#v221)
|
||||
[v2.2.0](#v220)
|
||||
[v2.1.1](#v211)
|
||||
[v2.1.0](#v210)
|
||||
[v2.0.1](#v201)
|
||||
[v2.0.0](#v200)
|
||||
[v2.0.0-preview.2](#v200-preview2)
|
||||
[v2.0.0-preview.1](#v200-preview1)
|
||||
[v1.6.3](#v163)
|
||||
[v1.6.1](#v161)
|
||||
[v1.6.0](#v160)
|
||||
[v1.5.2](#v152)
|
||||
[v1.5.1](#v151)
|
||||
[v1.5.0](#v150)
|
||||
[v1.4.0](#v140)
|
||||
[v1.3.1](#v131)
|
||||
[v1.3.0](#v130)
|
||||
[v1.2.0](#v120)
|
||||
[v1.1.0](#v110)
|
||||
[v1.0.5](#v105)
|
||||
[v1.0.4](#v104)
|
||||
[v1.0.3](#v103)
|
||||
[v1.0.2](#v102)
|
||||
[v1.0.1](#v101)
|
||||
[v1.0.0](#v100)
|
||||
[v0.8.3](#v083)
|
||||
[v0.8.2](#v082)
|
||||
[v0.8.1](#v081)
|
||||
[v0.8.0](#v080)
|
||||
[v0.5.0](#v050)
|
||||
[v0.1.0](#v010)
|
||||
[branch-2.0](#branch-2.0)
|
||||
[v2.8.2](#v2.8.2)
|
||||
[v2.8.1](#v2.8.1)
|
||||
[v2.8.0](#v2.8.0)
|
||||
[v2.7.0](#v2.7.0)
|
||||
[v2.6.0](#v2.6.0)
|
||||
[v2.5.0](#v2.5.0)
|
||||
[v2.4.0](#v2.4.0)
|
||||
[v2.3.0](#v2.3.0)
|
||||
[v2.2.3](#v2.2.3)
|
||||
[v2.2.2](#v2.2.2)
|
||||
[v2.2.1](#v2.2.1)
|
||||
[v2.2.0](#v2.2.0)
|
||||
[v2.1.1](#v2.1.1)
|
||||
[v2.1.0](#v2.1.0)
|
||||
[v2.0.1](#v2.0.1)
|
||||
[v2.0.0](#v2.0.0)
|
||||
[v2.0.0-preview.2](#v2.0.0-preview.2)
|
||||
[v2.0.0-preview.1](#v2.0.0-preview.1)
|
||||
[v1.6.3](#v1.6.3)
|
||||
[v1.6.1](#v1.6.1)
|
||||
[v1.6.0](#v1.6.0)
|
||||
[v1.5.2](#v1.5.2)
|
||||
[v1.5.1](#v1.5.1)
|
||||
[v1.5.0](#v1.5.0)
|
||||
[v1.4.0](#v1.4.0)
|
||||
[v1.3.1](#v1.3.1)
|
||||
[v1.3.0](#v1.3.0)
|
||||
[v1.2.0](#v1.2.0)
|
||||
[v1.1.0](#v1.1.0)
|
||||
[v1.0.5](#v1.0.5)
|
||||
[v1.0.4](#v1.0.4)
|
||||
[v1.0.3](#v1.0.3)
|
||||
[v1.0.2](#v1.0.2)
|
||||
[v1.0.1](#v1.0.1)
|
||||
[v1.0.0](#v1.0.0)
|
||||
[v0.8.3](#v0.8.3)
|
||||
[v0.8.2](#v0.8.2)
|
||||
[v0.8.1](#v0.8.1)
|
||||
[v0.8.0](#v0.8.0)
|
||||
[v0.5.0](#v0.5.0)
|
||||
[v0.1.0](#v0.1.0)
|
||||
|
||||
## master
|
||||
## branch-2.0
|
||||
|
||||
## v3.8.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 重构`Animation`动画系统,增加`新增动画`和`交互动画`的支持
|
||||
* 完善`PieChart`的动画交互表现
|
||||
* 增加`Symbol`的`EmptyTriangle`、`EmptyDiamond`、`Plus`、`Minus`四种新标记
|
||||
* 完善`Chart`的鼠标交互回调
|
||||
* 增加`LabelLine`可固定横坐标的功能
|
||||
* 增加`GridLayout`网格布局组件
|
||||
* 增加`Tooltip`的`Auto`类型
|
||||
* 优化和修复若干其他问题
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2023.09.03) 发布`v3.8.0`版本
|
||||
* (2023.09.01) 增加`Tooltip`的`Auto`自动设置显示类型和触发类型
|
||||
* (2023.08.29) 增加`Ring`的`gridIndex`支持设置指定网格
|
||||
* (2023.08.29) 增加`Radar`的`gridIndex`支持设置指定网格
|
||||
* (2023.08.29) 增加`Pie`的`gridIndex`支持设置指定网格
|
||||
* (2023.08.29) 增加`GridLayout`网格布局组件用于管理多个`GridCoord`的布局
|
||||
* (2023.08.25) 修复`MarkLine`多个时只显示一个`Label`的问题
|
||||
* (2023.08.25) 修复`MarkLine`在开启`Clip`后还绘制在坐标系外的问题
|
||||
* (2023.08.24) 优化`YAxis`在数据全为0时默认设置0-1的范围
|
||||
* (2023.08.23) 修复`YAxis`的`Label`可能会重复的问题
|
||||
* (2023.08.22) 修复`Bar`显示隐藏时绘制表现异常的问题
|
||||
* (2023.08.22) 优化`Zebra`斑马柱图的绘制表现 (#276)
|
||||
* (2023.08.16) 增加`Daemon`守护程序,解决本地开启TMP后更新版本报错问题
|
||||
* (2023.08.15) 修复`Data`数据在-1到1之间时坐标轴显示错误的问题 (#273) (by __Ambitroc__)
|
||||
* (2023.08.14) 修复`XCharts`本地开启`TextMeshPro`和 `NewInputSystem`后更新版本会报错的问题 (#272)
|
||||
* (2023.08.12) 修复`Chart`在运行时被删除时会异常报错的问题 (#269)
|
||||
* (2023.08.11) 修复`DataZoom`开启时可能会导致无法添加数据的问题
|
||||
* (2023.08.11) 修复`SerieData`单独设置`ItemStyle`的`itemFormatter`不生效的问题
|
||||
* (2023.08.10) 优化`BarChart`在`Tooltip`的`Trigger`为`Item`时的表现
|
||||
* (2023.08.09) 增加`Axis`可通过设置`IconStyle`的`color`为`clear`来实现动态图标颜色的支持
|
||||
* (2023.08.08) 增加`Pie`对`LabelLine`的`lineEndX`的支持
|
||||
* (2023.08.05) 整理`Examples`的代码,删除不必要的用例
|
||||
* (2023.08.04) 增加`LabelLine`的`lineEndX`可设置引导线固定X位置的支持
|
||||
* (2023.08.04) 增加`Ring`的`avoidLabelOverlap`避免文本堆叠的支持 (#247)
|
||||
* (2023.08.03) 完善`Chart`的`onSerieEnter`,`onSerieExit`和`onSerieClick`回调
|
||||
* (2023.08.02) 修复`BarChart`的`onSerieEnter`和`onSerieExit`回调无效的问题
|
||||
* (2023.08.02) 增加`Symbol`的`Plus`加号和`Minus`减号的支持
|
||||
* (2023.07.31) 增加`Symbol`的`EmptyTriangle`和`EmptyDiamond`的支持,优化`Symbol`表现效果
|
||||
* (2023.07.31) 优化`Line`的默认配置效果
|
||||
* (2023.07.27) 增加`Serie`的`minRadius`可设置最小半径
|
||||
* (2023.07.26) 增加`MLValue`多样式数值
|
||||
* (2023.07.25) 增加`XLog`日志系统
|
||||
* (2023.07.18) 完善`Pie`饼图的交互动画效果
|
||||
* (2023.07.14) 增加`Animation`的`Interaction`交互动画配置支持
|
||||
* (2023.07.11) 增加`Animation`的`Addition`新增动画配置支持
|
||||
* (2023.07.11) 重构`Animation`动画系统,完善动画体验
|
||||
* (2023.06.30) 增加`PolarCood`的`indicatorLabelOffset`设置指示文本偏移的支持
|
||||
* (2023.06.30) 修复`Axis`的`IndicatorLabel`的背景颜色可能不正常的问题
|
||||
* (2023.06.30) 增加`Axis`的`IndicatorLabel`可自定义`color`的支持
|
||||
* (2023.06.12) 修复`AxisLabel`的`formatterFunction`在数值轴时`value`不对的问题
|
||||
|
||||
## v3.7.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 增加`HelpDoc`官网帮助文档跳转
|
||||
* 增加`Line`对`Clip`的支持
|
||||
* 优化`Axis`的范围设置
|
||||
* 其他优化和修复
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2023.06.08) 发布`v3.7.0`版本
|
||||
* (2023.06.04) 增加`HelpDoc`帮助文档跳转
|
||||
* (2023.05.30) 修复`Serie`的名字带`_`线导致`Legend`无法触发的问题 (#259) (by __svr2kos2__)
|
||||
* (2023.05.10) 增加`Axis`的`MinMaxAuto`范围类型
|
||||
* (2023.05.10) 增加`Line`对`Clip`的支持
|
||||
* (2023.05.04) 优化`Axis`在-1到1范围时设置`CeilRate`不生效的问题
|
||||
* (2023.05.04) 优化`Axis`的`MinMax`类型范围计算
|
||||
* (2023.05.04) 修复`AxisLabel`在数据都是小于1的浮点数时显示`Label`格式不对的问题
|
||||
* (2023.05.04) 修复`Theme`在修改默认主题的参数后运行被重置的问题
|
||||
* (2023.05.04) 增加`Symbol`选择`Custom`类型时的`Warning`提示
|
||||
* (2023.04.15) 修复`DataZoom`在多个图表时可能异常的问题 (#252)
|
||||
* (2023.04.14) 修复`Tooltip`在只有一个数据时可能异常的问题
|
||||
* (2023.04.14) 增加`BaseChart`的`TriggerTooltip()`接口尝试触发`ToolTip`
|
||||
* (2023.04.12) 优化`RadarCood`设置`startAngle`时文本也跟随调整位置
|
||||
* (2023.04.12) 增加`Radar`对通配符`{b}`的支持
|
||||
* (2023.04.11) 修复`Inspector`在动态添加组件时可能异常的问题
|
||||
|
||||
## v3.6.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 增加`InputSystem`支持 (by __Bian-Sh__)
|
||||
* 增加官网[在线示例](https://xcharts-team.github.io/examples/)多版本支持 (by __SHL-COOL__)
|
||||
* 完善对`VR`的支持 (by __Ambitroc__)
|
||||
* 增加`UITable`,`UIStatistic`等[扩展UI组件](https://xcharts-team.github.io/docs/ui)
|
||||
* 增加`ItemStyle`的`MarkColor`
|
||||
* 增加通配符`{h}`的支持
|
||||
* 优化`Tooltip`,`Legend`,`DataZoom`,`Axis`等组件
|
||||
* 重构相关`API`接口,完善回调接口
|
||||
* 修复若干问题
|
||||
|
||||
升级注意:
|
||||
|
||||
* 部分接口有调整,可根据提示更换下接口即可。
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2023.04.01) 发布`v3.6.0`版本
|
||||
* (2023.03.14) 修复`Tooltip`的`titleFormater`设置`{b}`可能不生效的问题
|
||||
* (2023.03.14) 修复`BarChart`在数据为0时不绘制柱条背景的问题 (#250) (by __Ambitroc__)
|
||||
* (2023.03.12) 增加`LabelStyle`的`autoRotate`可设置有角度的竖版文本的自动旋转
|
||||
* (2023.03.10) 增加`VR`等其他非鼠标输入方式的Point位置获取 (#248) (by __Ambitroc__)
|
||||
* (2023.03.09) 增加`Chart`的`onSerieClick`,`onSerieDown`,`onSerieEnter`和`onSerieExit`回调
|
||||
* (2023.03.09) 修复`Pie`的点击选中偏移不生效的问题
|
||||
* (2023.03.04) 增加`Legend`的`Positions`可自定义图例的位置
|
||||
* (2023.03.03) 修复`Animation`变更动画可能无效的问题
|
||||
* (2023.02.28) 修复`Legend`点击时`Serie`的`Label`不刷新的问题
|
||||
* (2023.02.26) 增加`DataZoom`的`startEndFunction`委托
|
||||
* (2023.02.12) 重构`Component`相关代码,调整API接口
|
||||
* (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题
|
||||
* (2023.02.10) 优化`Axis`的数值`Label`的默认显示格式
|
||||
* (2023.02.08) 增加`DataZoom`的`startLock`和`endLock`参数支持锁定
|
||||
* (2023.02.02) 修复`DataZoom`开启时`X轴`的`Label`可能会显示在图表外的问题
|
||||
* (2023.02.02) 优化`SerieData`的`ignore`设置时的忽略数据判断
|
||||
* (2023.02.01) 修复`XChartsMgr.ContainsChart()`接口异常
|
||||
* (2023.01.31) 增加`InputSystem`的支持 (#242) (by __Bian-Sh__)
|
||||
* (2023.01.11) 修复`Inspector`上移除`Component`后图表没有及时刷新的问题 (#241)
|
||||
* (2023.01.06) 修复`Pie`在最后的几个数据都为0时`Label`显示不正常的问题 (#240)
|
||||
* (2023.01.03) 删除`Serie`的`MarkColor`,增加`ItemStyle`的`MarkColor`
|
||||
* (2022.12.29) 增加`Editor`对`List`的`+`添加编辑功能
|
||||
* (2022.12.29) 修复`UpdateXYData()`接口影响数据精度的问题 (#238)
|
||||
* (2022.12.28) 修复`Pie`只有一个数据时设置`border`后显示异常的问题 (#237)
|
||||
* (2022.12.22) 调整`Covert`重命名为`Convert`,涉及的接口有:`ConvertXYAxis()`,`CovertSerie()`等
|
||||
* (2022.12.22) 修复`Convert XY Axis`后Y轴的`Label`显示异常的问题
|
||||
* (2022.12.12) 修复`Axis`的`Value`轴在某些情况下计算数值范围不准确的问题
|
||||
* (2022.12.12) 优化`Legend`的`formatter`支持`{h}`通配符
|
||||
* (2022.12.12) 修复`Legend`的`formatter`设置为固定值时显示不正常的问题
|
||||
* (2022.12.08) 增加`AreaStyle`的`toTop`参数可设置折线图渐变色是到顶部还是到实际位置
|
||||
* (2022.12.07) 增加`Formatter`的文本通配符`{h}`支持设置当前颜色值
|
||||
|
||||
## v3.5.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 调整文档结构,增加[XCharts官方主页](https://xcharts-team.github.io)
|
||||
* 增加DataZoom框选支持
|
||||
* 增加Bar的最大宽度设置支持
|
||||
* 其他优化
|
||||
|
||||
升级注意:
|
||||
|
||||
* 由于调整了文档目录结构,升级前建议先备份,再删除原XCharts后再升级
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2022.12.01) 发布`v3.5.0`版本
|
||||
* (2022.11.30) 增加`Serie`的`barMaxWidth`可设置`Bar`的最大宽度
|
||||
* (2022.11.30) 优化`Tooltip`的`Shadow`绘制不超出图表范围
|
||||
* (2022.11.29) 修复`Tooltip`指示的`Serie`数据项索引异常的问题
|
||||
* (2022.11.27) 优化`Axis`的`AxisName`的偏移设置
|
||||
* (2022.11.27) 优化`Comment`的位置,用`Location代替Position`
|
||||
* (2022.11.27) 优化`Tooltip`的`LineStyle`支持设置`Shadow`时的颜色
|
||||
* (2022.11.27) 调整`Documentation`文档结构
|
||||
* (2022.11.26) 优化`LabelLine`的`symbol`默认不显示
|
||||
* (2022.11.26) 修复`LineChart`在`XY`都为数值轴时添加无序数据显示异常的问题
|
||||
* (2022.11.26) 修复`DataZoom`从右往左框选时异常的问题
|
||||
* (2022.11.20) 调整`UdpateXAxisIcon()`接口重命名为`UpdateXAxisIcon()` (#235)
|
||||
* (2022.11.12) 增加`Pie`的`LabelLine`支持`Symbol`
|
||||
* (2022.11.12) 增加`DataZoom`的`MarqueeStyle`支持框选区域
|
||||
* (2022.11.10) 优化`Radar`在类型为`Single`时的区域颜色填充效果
|
||||
* (2022.11.04) 修复`Tooltip`的`itemFormatter`设置通配符`{d}`后异常的问题
|
||||
|
||||
## v3.4.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 增加`Axis`的`indicatorLabel`,可单独设置不同的指示文本样式
|
||||
* 增加`Serie`的`markColor`可设置标识颜色
|
||||
* 增加`RadarCoord`的`startAngle`可设置`Radar`起始角度
|
||||
* 优化`Axis`的数值间隔表现
|
||||
* 增加`DataZoom`对数值轴的支持
|
||||
* 增加`Line`的`SmoothLimit`可控制平滑曲线不同效果
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2022.11.01) 发布`v3.4.0`版本
|
||||
* (2022.10.30) 增加`API`:`AddData()`、`ClearSerieData()`、`ClearComponentData()`
|
||||
* (2022.10.30) 增加`Axis`的`indicatorLabel`,移除`Tooltip`的`indicatorLabelStyle` (#226)
|
||||
* (2022.10.29) 增加`Serie`的`markColor`可设置标识颜色用于`Legend`和`Tooltip`的展示 (#229)
|
||||
* (2022.10.26) 增加`RadarCoord`的`startAngle`可设置`Radar`起始角度
|
||||
* (2022.10.21) 修复`Chart`在受`Layout`控制时`Label`显示不正常的问题 (#231)
|
||||
* (2022.10.21) 修复`Unity2019.2`上的兼容问题
|
||||
* (2022.10.18) 优化`Axis`的数值表现
|
||||
* (2022.10.15) 修复`Axis`的`Label`在`DataZoom`开启时可能显示不正常的问题 (#227)
|
||||
* (2022.10.14) 增加`DataZoom`对数值轴的支持
|
||||
* (2022.10.13) 修复`Pie`的环形饼图设置边框时效果异常的问题 (#225)
|
||||
* (2022.10.13) 修复`Download`的接口造成`iOS`平台打包失败的问题
|
||||
* (2022.10.12) 增加`Animation`的`UnscaledTime`支持设置动画是否受TimeScale的影响 (#223)
|
||||
* (2022.10.10) 优化`Documentation~`文档格式
|
||||
* (2022.10.10) 增加`Line`的`SmoothLimit`可控制平滑曲线不同效果
|
||||
* (2022.10.05) 修复`Serie`隐藏时`Tooltip`还显示信息的问题
|
||||
* (2022.09.30) 修复`Chart`在很小尺寸时出现`DivideByZeroException`异常的问题 (#230)
|
||||
|
||||
## v3.3.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 优化图表细节,支持更多功能
|
||||
* 增加大量的Demo示例
|
||||
* 完善文档,修复若干问题
|
||||
* 新增PolarChart对Bar、Heatmap的支持
|
||||
* 新增HeatmapChart热力图类型
|
||||
* 完善Tooltip显示
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2022.09.28) 发布`v3.3.0`版本
|
||||
* (2022.09.26) 优化`Axis`在类目轴时的默认分割段数
|
||||
* (2022.09.25) 修复`API`文档中部分接口没有导出的问题
|
||||
* (2022.09.24) 优化`FunnelChart`
|
||||
* (2022.09.23) 优化`ParallelChart`
|
||||
* (2022.09.22) 增加`SaveAsImage()`接口保存图表到图片
|
||||
* (2022.09.21) 修复`InsertSerie()`接口不刷新图表的问题
|
||||
* (2022.09.21) 优化`PolarChart`对`Line`热力图的支持
|
||||
* (2022.09.20) 增加`PolarChart`对`Heatmap`热力图的支持
|
||||
* (2022.09.19) 增加`PolarChart`对多柱图和堆叠柱图的支持
|
||||
* (2022.09.16) 增加`PolarChart`对`Bar`柱图的支持
|
||||
* (2022.09.14) 增加`PolarCoord`可通过`radius`设置环形极坐标的支持
|
||||
* (2022.09.09) 修复`Editor`下编辑参数部分组件可能不会实时刷新的问题
|
||||
* (2022.09.08) 增加`RingChart`可设置`LabelLine`引导线的支持
|
||||
* (2022.09.06) 增加`SerieSymbol`的`minSize`和`maxSize`参数设置最大最小尺寸的支持
|
||||
* (2022.09.06) 增加`AxisSplitLine`的`showStartLine`和`showEndLine`参数设置是否显示首位分割线的支持
|
||||
* (2022.09.06) 增加`Heatmap`通过`symbol`设置不同的图案的支持
|
||||
* (2022.09.05) 增加`Heatmap`的`heatmapType`支持设置`Data`和`Count`两种不同映射方式的热力图
|
||||
* (2022.09.05) 优化`Tooltip`在热力图为数值轴时的指示
|
||||
* (2022.09.02) 增加`onPointerEnterPie`回调支持
|
||||
* (2022.09.02) 优化`HeatmapChart`
|
||||
* (2022.08.30) 优化`RadarChart`
|
||||
* (2022.08.30) 修复`DataZoom`在某些情况下计算范围不准确的问题 (#221)
|
||||
* (2022.08.29) 优化`BarChart`在数据过密时的默认表现
|
||||
* (2022.08.29) 优化`YAxis`在开启`DataZoom`时的最大最小值计算
|
||||
* (2022.08.29) 优化`CandlestickChart`大量数据绘制
|
||||
* (2022.08.28) 修复`LineChart`在堆叠和自定义Y轴范围的情况下显示不正常的问题
|
||||
* (2022.08.26) 增加`Legend`新图标类型`Candlestick`
|
||||
* (2022.08.26) 优化`CandlestickChart`表现,调整相关的`AddData()`接口参数
|
||||
* (2022.08.26) 增加`Tooltip`的`position`参数支持设置移动平台不同的显示位置
|
||||
* (2022.08.26) 删除`Tooltip`的`fixedXEnable`和`fixedYEnable`参数
|
||||
* (2022.08.25) 优化`EmphasisStyle`对`label`的支持
|
||||
* (2022.08.25) 增加`formatter`对`{d3}`指定维度数据百分比的支持
|
||||
* (2022.08.24) 修复`ScatterChart`的`label`不刷新的问题
|
||||
* (2022.08.24) 修复`MarkLine`的`label`某些情况下显示异常的问题
|
||||
|
||||
## v3.2.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* `Serie`支持高亮,淡出和选中三状态配置:`EmphasisStyle`,`BlurStyle`和`SelectStyle`
|
||||
* `Axis`支持坐标轴次刻度和次分割线:`MinorTick`和`MinorSplitLine`
|
||||
* `Serie`支持不同的取色策略:`colorBy`
|
||||
* `Radar`支持平滑曲线:`smooth`
|
||||
* `Line`支持当作凸多边形填充:`AreaStyle`的`innerFill`
|
||||
* `DataZoom`支持时间轴
|
||||
* 其他优化和修复
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2022.08.16) 发布`v3.2.0`版本
|
||||
* (2022.08.15) 优化`Smooth`贝塞尔曲线算法
|
||||
* (2022.08.13) 修复`DataZoom`组件开启时图表显示效果可能不正确的问题
|
||||
* (2022.08.11) 优化`Tooltip`支持`ignoreDataDefaultContent`
|
||||
* (2022.08.10) 修复`Chart`在3D相机下部分组件显示异常的问题
|
||||
* (2022.08.10) 修复`RemoveSerie()`接口不生效的问题 (#219)
|
||||
* (2022.08.10) 优化`Theme`的字体同步操作
|
||||
* (2022.08.10) 优化`Chart`的默认`layer`设置为`UI`
|
||||
* (2022.08.09) 优化`Axis`的`Time`时间轴的次分割线
|
||||
* (2022.08.09) 增加`AreaStyle`的`innerFill`参数支持填充凸多边形
|
||||
* (2022.08.08) 优化`Serie`的数据项索引维护,增加检测和修复功能,修复相关问题
|
||||
* (2022.07.29) 修复`Unity`版本兼容:在某些版本导入后图表创建异常的问题
|
||||
* (2022.07.29) 增加`Axis`为`Time`时间轴时,支持次刻度和次分割线
|
||||
* (2022.07.28) 优化`Radar`雷达图效果
|
||||
* (2022.07.28) 增加`Serie`的`colorBy`参数配置取色策略
|
||||
* (2022.07.27) 增加`StateStyle`的`Symbol`用于配置状态下的标记样式
|
||||
* (2022.07.27) 去掉`SerieSymbol`的`selectedSize`参数
|
||||
* (2022.07.24) 增加`Serie`和`SerieData`的`state`设置默认状态
|
||||
* (2022.07.22) 增加`Serie`的三种状态`EmphasisStyle`,`BlurStyle`,`SelectStyle`
|
||||
* (2022.07.22) 去掉`AreaStyle`的`highlightColor`和`highlightToColor`参数
|
||||
* (2022.07.22) 去掉`Emphasis`,`EmphasisItemStyle`,`EmphasisLabelStyle`,`EmphasisLabelLine`组件
|
||||
* (2022.07.20) 增加`Since`特性对类的支持
|
||||
* (2022.07.20) 修复`Axis`在`Value`轴时,`AxisLabel`的`showStartLabel`和`showEndLabel`参数设置不生效的问题
|
||||
* (2022.07.19) 增加`Axis`的`MinorSplitLine`设置坐标轴次分割线
|
||||
* (2022.07.19) 增加`Axis`的`MinorTick`设置坐标轴次刻度
|
||||
* (2022.07.17) 增加`Radar`的`smooth`参数设置平滑曲线
|
||||
* (2022.07.15) 增加`DataZoom`对`Time`时间轴的支持
|
||||
|
||||
## v3.1.0
|
||||
|
||||
版本要点:
|
||||
|
||||
* 优化`Axis`
|
||||
* 优化`Tooltip`
|
||||
* 优化平滑曲线算法
|
||||
* 优化代码动态创建图表
|
||||
* 完善配置项手册
|
||||
* 修复若干问题
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2022.07.12) 发布`v3.1.0`版本
|
||||
* (2022.07.12) 修复`Serie`的`ignoreLineBreak`不生效的问题
|
||||
* (2022.07.07) 优化`Axis`的`minMaxType`指定为`MinMax`时支持精确到小数
|
||||
* (2022.07.05) 修复`Chart`里有多个坐标系时绘制异常的问题 (#210)
|
||||
* (2022.07.04) 增加`Settings`的`axisMaxSplitNumber`参数设置`Axis`的最大分隔段数
|
||||
* (2022.07.04) 修复`Axis`在设置`offset`后`Tick`绘制位置异常的问题 (#209)
|
||||
* (2022.07.03) 优化`AxisLabel`的`formatterFunction`自定义委托
|
||||
* (2022.07.03) 增加`AxisName`的`onZero`参数支持设置坐标轴名称位置是否和Y轴0刻度一致 (#207)
|
||||
* (2022.07.02) 修复`PieChart`用代码动态创建时`Legend`不正常的问题 (#206)
|
||||
* (2022.07.02) 修复`YAxis`的`AxisLabel`设置`onZero`不生效的问题
|
||||
* (2022.07.02) 修复`AxisLabel`代码设置`distance`属性后一直刷新的问题
|
||||
* (2022.06.30) 修复`Runtime`下代码创建图表时组件无法初始化的问题
|
||||
* (2022.06.29) 增加`Tooltip`的`itemFormatter`支持`{c0}`显示各维度数据 (#205)
|
||||
* (2022.06.28) 优化`Pie`设置`avoidLabelOverlap`时的文本表现 (#56)
|
||||
* (2022.06.25) 优化`Line`的平滑曲线表现 (#169)
|
||||
* (2022.06.25) 修复`DataZoom`开启时`Tooltip`显示数据不一致的问题 (#203)
|
||||
* (2022.06.25) 修复`Toolip`在类目轴无数据时绘制异常的问题 (#204)
|
||||
* (2022.06.25) 优化`Serie`设置`PlaceHolder`时的`Tooltip`表现
|
||||
* (2022.06.25) 增加`Since`特效用于标识配置参数从哪个版本开始支持
|
||||
* (2022.06.24) 优化`Painter`绘制层,`Top`层细分为`Upper`和`Top`层
|
||||
* (2022.06.24) 增加`Legend`对`Background`和`Padding`的支持
|
||||
* (2022.06.21) 增加`TextStyle`对`TextMeshPro`的`Sprite Asset`支持 (#201)
|
||||
* (2022.06.20) 优化`Tooltip`的边界限制 (#202)
|
||||
* (2022.06.20) 修复`TextMeshPro`开启时编译错误
|
||||
* (2022.06.20) 修复`Animation`的渐出动画不生效的问题
|
||||
|
||||
## v3.0.1
|
||||
|
||||
* (2022.06.16) 发布`v3.0.1`版本
|
||||
* (2022.06.16) 修复`Inspector`上部分`foldout`箭头点击无法展开的问题
|
||||
* (2022.06.15) 优化`Doc`自动生成,完善代码注释和配置项手册文档
|
||||
* (2022.06.14) 优化`SerieLabelStyle`,支持动态调整`Icon`
|
||||
* (2022.06.13) 优化`Background`背景设置
|
||||
* (2022.06.10) 增加`Legend`的`AxisLabel`支持`autoColor`
|
||||
* (2022.06.08) 修复`Axis`的`AxisLabel`在设置不显示时还显示首尾两个`label`的问题
|
||||
|
||||
## v3.0.0
|
||||
|
||||
* 更健壮的底层框架。
|
||||
* 更强大的性能。
|
||||
* 更小的序列化文件。
|
||||
* 更好的交互体验。
|
||||
* 更多的组件支持。
|
||||
* 更强大的文本自述能力。
|
||||
* 更合理的组件调整。
|
||||
* 更灵活的组件插拔。
|
||||
* 更高效的二次开发。
|
||||
* 更丰富的Demo示例。
|
||||
* 增加`Time`时间轴。
|
||||
* 增加`SingleAxis`单轴。
|
||||
* 增加`Comment`文本组件。
|
||||
* 增加`Widgets`小组件。
|
||||
* 增加多种坐标系:`Grid`、`Polar`、`Radar`、`SingleAxis`。
|
||||
* 增加多种动画方式。
|
||||
* 增加多种图表交互。
|
||||
* 增加国际化支持。
|
||||
* 增加多种扩展图表。
|
||||
|
||||
## v3.0.0-preivew9
|
||||
|
||||
* (2022.05.06) 发布`v3.0.0-preivew9`版本
|
||||
* (2022.05.05) 优化`ItemStyle`设置`color`时的一致性
|
||||
* (2022.05.05) 增加`Line`对`Dash`,`Dot`等的支持 (#197)
|
||||
* (2022.05.04) 增加`Legend`的委托回调
|
||||
* (2022.05.04) 优化`Symbol`和`Label`
|
||||
* (2022.05.01) 增加`Bar`对`clip`的支持 (#196)
|
||||
* (2022.05.01) 修复`RingChart`的`Label`不刷新的问题 (#195)
|
||||
* (2022.04.29) 增加`Tooltip`支持自定义背景图
|
||||
* (2022.04.27) 修复`ItemStyle`代码修改`color`不刷新的问题
|
||||
|
||||
## v3.0.0-preivew8
|
||||
|
||||
* (2022.04.26) 发布`v3.0.0-preivew8`版本
|
||||
* (2022.04.23) 移除`Serie`的`IconStyle`组件
|
||||
* (2022.04.23) 强化`LabelStyle`,所有组件的`TextStyle`都升级为`LabelStyle`
|
||||
* (2022.04.19) 增加`Label`的`rotate`支持设置旋转
|
||||
* (2022.04.17) 修复`Bar`在数值为负数时动画无效的问题
|
||||
* (2022.04.17) 增加`ItemStyle`的`BorderGap`支持设置边框间距
|
||||
* (2022.04.16) 优化`Bar`的`Border`和`Capsule`胶囊柱图
|
||||
* (2022.04.15) 增加`Liquid`对`Round Rect`圆角矩形水位图的支持
|
||||
* (2022.04.14) 增加`Line`对`EndLabel`的支持
|
||||
* (2022.04.13) 增加`VisualMap`的`workOnLine`和`workOnArea`支持折线和区域映射功能 (#191)
|
||||
* (2022.04.12) 优化`Radar`支持`Area`区域触发`Tooltip`
|
||||
* (2022.04.09) 优化`VisualMap`
|
||||
* (2022.04.09) 优化`Tooltip`
|
||||
|
||||
## v3.0.0-preivew7
|
||||
|
||||
* (2022.04.07) 发布`v3.0.0-preivew7`版本
|
||||
* (2022.04.07) 修复`Pie`颜色不刷新的问题
|
||||
* (2022.03.31) 修复`Add Main Component`添加组件异常的问题
|
||||
* (2022.03.30) 修复`Axis`无法自定义`Label`颜色的问题
|
||||
|
||||
## v3.0.0-preivew6
|
||||
|
||||
* (2022.03.30) 发布`v3.0.0-preivew6`版本
|
||||
|
||||
## v3.0.0-preivew5
|
||||
|
||||
* (2022.03.26) 发布`v3.0.0-preivew5`版本
|
||||
|
||||
## v3.0.0-preivew4
|
||||
|
||||
* (2022.03.21) 发布`v3.0.0-preivew4`版本
|
||||
|
||||
## v3.0.0-preivew3
|
||||
|
||||
* (2022.03.09) 发布`v3.0.0-preivew3`版本
|
||||
|
||||
## v3.0.0-preivew2
|
||||
|
||||
* (2022.01.08) 发布`v3.0.0-preivew2`版本
|
||||
|
||||
## v3.0.0-preivew1
|
||||
|
||||
* (2022.01.07) 发布`v3.0.0-preivew1`版本
|
||||
|
||||
## v2.8.2
|
||||
|
||||
@@ -546,13 +106,13 @@ slug: /changelog
|
||||
|
||||
## v2.4.0
|
||||
|
||||
版本要点:
|
||||
### 版本要点
|
||||
|
||||
* 折线图支持忽略数据的连线是断开还是连接
|
||||
* 折线图支持轨迹匀速动画
|
||||
* 其他优化和问题修复
|
||||
|
||||
日志详情:
|
||||
### 日志详情
|
||||
|
||||
* (2021.08.31) 发布`v2.4.0`版本
|
||||
* (2021.08.31) 优化`RingChart`的渐变效果
|
||||
@@ -571,7 +131,7 @@ slug: /changelog
|
||||
|
||||
## v2.3.0
|
||||
|
||||
版本要点:
|
||||
### 版本要点
|
||||
|
||||
* 数据存储由`float`升级为`double`
|
||||
* 新增`MarkLine`标线
|
||||
@@ -581,11 +141,11 @@ slug: /changelog
|
||||
* `PieChart`优化
|
||||
* 问题修复
|
||||
|
||||
升级注意:
|
||||
### 升级注意
|
||||
|
||||
* 由于数据类型升级为了`double`,`float`隐式转`double`可能有精度问题,所以建议之前为`float`的数据类型都手动改为`double`类型。
|
||||
由于数据类型升级为了`double`,`float`隐式转`double`可能有精度问题,所以建议之前为`float`的数据类型都手动改为`double`类型。
|
||||
|
||||
日志详情:
|
||||
### 日志详情
|
||||
|
||||
* (2021.07.24) 发布`v2.3.0`版本
|
||||
* (2021.07.22) 完善`SerieSymbol`以支持象形柱图`PictorialBarChart`扩展
|
||||
@@ -738,7 +298,7 @@ slug: /changelog
|
||||
## v1.6.0
|
||||
|
||||
* (2020.08.24) 发布`v1.6.0`版本
|
||||
* (2020.08.23) 重构代码,将与绘制相关的`Color`改为`Color32`,减少隐式转换(更新后会导致自定义的颜色丢失,可参考[问答29](https://github.com/XCharts-Team/XCharts/blob/master/Assets/XCharts/Documentation~/fqa.md)进行升级)
|
||||
* (2020.08.23) 重构代码,将与绘制相关的`Color`改为`Color32`,减少隐式转换(更新后会导致自定义的颜色丢失,可参考[问答29](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Documentation/XCharts问答.md)进行升级)
|
||||
* (2020.08.15) 优化`PieChart`绘制表现效果#85
|
||||
* (2020.08.11) 增加`LiquidChart`数据变更动画#83
|
||||
* (2020.08.11) 优化`PieChart`文本堆叠和引线效果#85
|
||||
@@ -788,7 +348,7 @@ slug: /changelog
|
||||
* (2020.05.30) 优化`PieChart`支持设置`ignoreValue`不显示指定数据
|
||||
* (2020.05.30) 修复`RadarChart`为`Circle`时不绘制`SplitArea`的问题
|
||||
* (2020.05.30) 优化`RadarChart`在设置`max`为`0`时可自动刷新最大值
|
||||
* (2020.05.29) 修复`PieChart`设置`gap`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.29) 修复`PieChart`设置`space`时只有一个数据时绘制异常的问题
|
||||
* (2020.05.27) 修复调用`UpdateDataName()`接口时不会自动刷新的问题
|
||||
* (2020.05.27) 优化`柱状图`的渐变色效果
|
||||
* (2020.05.24) 修复`Axis`同时设置`boundaryGap`和`alignWithLabel`时`Tick`绘制异常的问题
|
||||
@@ -813,7 +373,7 @@ slug: /changelog
|
||||
* (2020.04.19) 优化`LineChart`折线图的区域填充渐变效果
|
||||
* (2020.04.19) 增加`AxisLabel`的`onZero`参数可将`Label`显示在`0`刻度上
|
||||
* (2020.04.19) 增加`Serie`和`AxisLabel`的`showAsPositiveNumber`参数将负数数值显示为正数
|
||||
* (2020.04.18) 增加`Convert XY Axis`互换XY轴配置
|
||||
* (2020.04.18) 增加`Covert XY Axis`互换XY轴配置
|
||||
* (2020.04.17) 增加`Axis`可通过`inverse`参数设置坐标轴反转
|
||||
* (2020.04.16) 修复`Check warning`在`Unity2019.3`上的显示问题
|
||||
* (2020.04.16) 修复`PieChart`在设置`Space`参数后动画绘制异常的问题
|
||||
7
Assets/XCharts/CHANGELOG.md.meta
Normal file
7
Assets/XCharts/CHANGELOG.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e66d91d4c396b46bf87034c47ca3b43d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e7c19967ca244147b0fcbb129201b46
|
||||
guid: 0793c29ff7adb422fb93f9f4e29d5a06
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
151
Assets/XCharts/Documentation/XChartsAPI.md
Normal file
151
Assets/XCharts/Documentation/XChartsAPI.md
Normal file
@@ -0,0 +1,151 @@
|
||||
# XCharts API
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
## `BaseChart`
|
||||
|
||||
* `BaseChart.theme`:主题组件`ThemeInfo`。
|
||||
* `BaseChart.title`:标题组件`Title`。
|
||||
* `BaseChart.legend`:图例组件`Legend`。
|
||||
* `BaseChart.tooltip`:提示框组件`Tooltip`。
|
||||
* `BaseChart.series`:系列列表`Series`。
|
||||
* `BaseChart.chartName`:图表的别称。
|
||||
* `BaseChart.chartWidth`:图表的宽。
|
||||
* `BaseChart.chartHeight`:图表的高。
|
||||
* `BaseChart.forceOpenRaycastTarget`:强制开启鼠标事件检测。一般不用手动设置,内部会自动判断是否需要检测。
|
||||
* `BaseChart.onCustomDraw`:自定义底部绘制回调。在绘制Serie前调用。
|
||||
* `BaseChart.onCustomDrawBeforeSerie`:自定义Serie绘制回调。在每个Serie绘制完前调用。
|
||||
* `BaseChart.onCustomDrawAfterSerie`:自定义Serie绘制回调。在每个Serie绘制完后调用。
|
||||
* `BaseChart.onCustomDrawTop`:自定义顶部绘制回调。在绘制Tooltip前调用。
|
||||
* `BaseChart.onPointerClick`:鼠标点击回调。
|
||||
* `BaseChart.onPointerDown`:鼠标按下回调。
|
||||
* `BaseChart.onPointerUp`:鼠标弹起回调。
|
||||
* `BaseChart.onPointerEnter`:鼠标进入图表回调。
|
||||
* `BaseChart.onPointerExit`:鼠标退出图表回调。
|
||||
* `BaseChart.onBeginDrag`:鼠标开始拖拽回调。
|
||||
* `BaseChart.onDrag`:鼠标拖拽回调。
|
||||
* `BaseChart.onEndDrag`:鼠标结束拖拽回调。
|
||||
* `BaseChart.onScroll`:鼠标滚动回调。
|
||||
* `BaseChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex`
|
||||
* `BaseChart.SetSize(float width, float height)`: 设置图表的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)。
|
||||
* `BaseChart.ClearData()`:清除所有数据,系列列表会保留,只是移除列表中系列的数据。
|
||||
* `BaseChart.RemoveData()`:清除所有系列和图例数据,系列列表也会被清除。
|
||||
* `BaseChart.RemoveData(string serieName)`:清除指定系列名称的数据。
|
||||
* `BaseChart.AddSerie(SerieType type, string serieName = null, bool show = true)`:添加一个系列到系列列表中。
|
||||
* `BaseChart.AddData(string serieName, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, float xValue, float yValue, string dataName)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float xValue, float yValue, string dataName = null)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.UpdateData(string serieName,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(int serieIndex,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateDataName(string serieName,int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.UpdateDataName(int serieIndex, int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.SetActive(string serieName, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.SetActive(int serieIndex, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.IsActive(string serieName)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActive(int serieIndex)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActiveByLegend(string legendName)`:获得指定图例名字的系列是否显示。
|
||||
* `BaseChart.RefreshChart()`:在下一帧刷新图表。
|
||||
* `BaseChart.RefreshLabel()`:在下一帧刷新文本标签。
|
||||
* `BaseChart.RefreshTooltip()`:立即刷新`Tooltip`组件。
|
||||
* `BaseChart.UpdateTheme(Theme theme)`:切换图表主题。
|
||||
* `BaseChart.AnimationEnable(bool flag)`:启用或关闭动画。
|
||||
* `BaseChart.AnimationFadeIn()`:渐入动画。
|
||||
* `BaseChart.AnimationFadeOut()`:渐出动画。
|
||||
* `BaseChart.AnimationPause()`:暂停动画。
|
||||
* `BaseChart.AnimationResume()`:继续动画。
|
||||
* `BaseChart.AnimationReset()`:重置动画。
|
||||
* `BaseChart.ClickLegendButton(int legendIndex, string legendName, bool show)`:点击图例按钮。
|
||||
* `BaseChart.IsInChart(Vector2 local)`:坐标是否在图表范围内。
|
||||
* `BaseChart.IsInChart(float x, float y)`:坐标是否在图表范围内。
|
||||
* `BaseChart.EnableBackground(bool flag)`:开启背景组件。背景组件在`chart`受上层布局控制时无法开启。
|
||||
* `BaseChart.SetBasePainterMaterial(Material material)`:设置Base Painter的材质球。
|
||||
* `BaseChart.SetSeriePainterMaterial(Material material)`:设置Serie Painter的材质球。
|
||||
* `BaseChart.SetTopPainterMaterial(Material material)`:设置Top Painter的材质球。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
* `CoordinateChart.grid`:网格组件 `Grid`。
|
||||
* `CoordinateChart.xAxes`:左右两个 `X` 轴组件 `XAxis`。
|
||||
* `CoordinateChart.yAxes`:左右两个 `Y` 轴组件 `YAxis`。
|
||||
* `CoordianteChart.xAxis0`:X轴(下)。
|
||||
* `CoordianteChart.xAxis1`:X轴(上)。
|
||||
* `CoordianteChart.xAxis0`:Y轴(左)。
|
||||
* `CoordianteChart.yAxis1`:Y轴(右)。
|
||||
* `CoordinateChart.dataZoom`:区域缩放组件 `DataZoom`。
|
||||
* `CoordinateChart.ClearAxisData()`:清除所有x轴和y轴的类目数据。
|
||||
* `CoordinateChart.AddXAxisData(string category, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisData(string category, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。
|
||||
* `CoordinateChart.AddXAxisIcon(Sprite icon, int xAxisIndex = 0)`:添加一个图标到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisIcon(Sprite icon, int yAxisIndex = 0)`:添加一个图标到指定的 `Y` 轴。
|
||||
* `CoordinateChart.UpdateXAxisData(int index, string category, int xAxisIndex = 0)`:更新 `X` 轴的类目数据。
|
||||
* `CoordinateChart.UpdateYAxisData(int index, string category, int yAxisIndex = 0)`:更新 `Y` 轴的类目数据。
|
||||
* `CoordinateChart.UpdateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)`:更新 `X` 轴的图标。
|
||||
* `CoordinateChart.UpdateYAxisIcon(int index, Sprite icon, int yAxisIndex = 0)`:更新 `Y` 轴的图标。
|
||||
|
||||
* `CoordinateChart.IsValue()`:是否是纯数值坐标。
|
||||
* `CoordinateChart.RefreshDataZoom()`:在下一帧刷新DataZoom组件。
|
||||
* `CoordinateChart.RefreshAxisMinMaxValue()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector3 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(float x, float y)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.ClampInGrid(grid, Vector3 pos)`:将坐标限制在坐标系内。
|
||||
* `CoordinateChart.CovertXYAxis(int index)`:转换X轴和Y轴的配置。
|
||||
* `CoordinateChart.UpdateCoordinate()`:更新坐标系原点和宽高。一般内部会自动更新,也可强制更新。
|
||||
* `CoordinateChart.SetMaxCache(int maxCache)`:设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。
|
||||
|
||||
## `LineChart`
|
||||
|
||||
* 继承 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `BarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
* `BarChart.onPointerClickBar`:点击柱条回调。参数:`eventData`, `dataIndex`
|
||||
|
||||
|
||||
## `RadarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RadarChart.radars`:雷达坐标系组件列表 `Radar`。
|
||||
* `RadarChart.RemoveRadar()`:移除所有雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar radar)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar.Shape shape, Vector2 center, float radius, int splitNumber = 5,float lineWidth = 0.6f, bool showIndicator = true, bool showSplitArea = true)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddIndicator(int radarIndex, string name, float min, float max)`:添加指示器。
|
||||
* `RadarChart.UpdateIndicator(int radarIndex, int indicatorIndex, string name, float min, float max)`:更新指示器。
|
||||
* `RadarChart.GetRadar(int radarIndex)`:获得指定索引的雷达坐标系组件。
|
||||
* `RadarChart.GetIndicator(int radarIndex, int indicatorIndex)`:获得指定雷达坐标系组件指定索引的指示器。
|
||||
|
||||
## `ScatterChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `HeatmapChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `RingChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RingChart.UpdateMax(int serieIndex, int dataIndex, float value)`:更新指定系列执行数据项的最大值。
|
||||
* `RingChart.UpdateMax(int serieIndex, float value)`:更新指定系列的所有数据项的最大值。
|
||||
* `RingChart.UpdateMax(float value)`:更新第一个系列第一个数据项的最大值。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
7
Assets/XCharts/Documentation/XChartsAPI.md.meta
Normal file
7
Assets/XCharts/Documentation/XChartsAPI.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81071e0166b9e49958800af4678e69ae
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1070
Assets/XCharts/Documentation/XCharts配置项手册.md
Normal file
1070
Assets/XCharts/Documentation/XCharts配置项手册.md
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/XCharts/Documentation/XCharts配置项手册.md.meta
Normal file
7
Assets/XCharts/Documentation/XCharts配置项手册.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f74b65f3be5d64689a5db6bdbc91df3e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,55 +1,52 @@
|
||||
---
|
||||
sidebar_position: 41
|
||||
slug: /faq
|
||||
---
|
||||
# XCharts问答
|
||||
|
||||
# 常见问题
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
|
||||
[QA 1:如何调整坐标轴与背景的边距?](#如何调整坐标轴与背景的边距)
|
||||
[QA 2:如何让初始动画重新播放?](#如何让初始动画重新播放)
|
||||
[QA 3:如何自定义折线图饼图的颜色?](#如何自定义折线图饼图的颜色)
|
||||
[QA 4:如何给坐标轴上的文本加上单位?](#如何给坐标轴上的文本加上单位)
|
||||
[QA 3:如何自定义折线图、饼图等数据项的颜色?](#如何自定义折线图_饼图等数据项的颜色)
|
||||
[QA 4:如何格式化文字,如我想给坐标轴标签加上单位?](#如何格式化文字_如我想给坐标轴标签加上单位)
|
||||
[QA 5:如何让柱形图的柱子堆叠显示?](#如何让柱形图的柱子堆叠显示)
|
||||
[QA 6:如何让柱形图的柱子同柱但不重叠?](#如何让柱形图的柱子同柱但不重叠)
|
||||
[QA 7:如何调整柱形图的柱子宽度和间距?](#如何调整柱形图的柱子宽度和间距)
|
||||
[QA 8:如何调整柱形图单个柱子的颜色?](#如何调整柱形图单个柱子的颜色)
|
||||
[QA 9:如何调整图表的对齐方式?](#如何调整图表的对齐方式)
|
||||
[QA 10:可以显示超过1000以上的大数据吗?](#可以显示超过1000以上的大数据吗)
|
||||
[QA 11:折线图可以画虚线、点线、点划线吗?](#折线图可以画虚线点线点划线吗)
|
||||
[QA 12:如何限定Y轴的值范围?](#如何限定Y轴的值范围)
|
||||
[QA 11:折线图可以画虚线、点线、点划线吗?](#折线图可以画虚线_点线_点划线吗)
|
||||
[QA 12:如何限定Y轴(Value轴)的值范围?](#如何限定Y轴的值范围)
|
||||
[QA 13:如何自定义数值轴刻度大小?](#如何自定义数值轴刻度大小)
|
||||
[QA 14:如何在数据项顶上显示文本?](#如何在数据项顶上显示文本)
|
||||
[QA 15:如何给数据项自定义图标?](#如何给数据项自定义图标)
|
||||
[QA 16:锯齿太严重,如何让图表更顺滑?](#锯齿太严重如何让图表更顺滑)
|
||||
[QA 16:锯齿太严重,如何让图表更顺滑?](#锯齿太严重_如何让图表更顺滑)
|
||||
[QA 17:为什么鼠标移上图表 Tooltip 不显示?](#为什么鼠标移上图表Tooltip不显示)
|
||||
[QA 18:如何取消 Tooltip 的竖线?](#如何取消Tooltip的竖线)
|
||||
[QA 19:如何自定义 Tooltip 的显示内容?](#如何自定义Tooltip的显示内容)
|
||||
[QA 20:如何让Y轴显示多位小数?](#如何让Y轴显示多位小数)
|
||||
[QA 20:如何让Y轴(数值轴)显示多位小数?](#如何让Y轴显示多位小数)
|
||||
[QA 21:如何用代码动态更新数据?](#如何用代码动态更新数据)
|
||||
[QA 22:如何显示图例?为什么有时候图例无法显示?](#如何显示图例为什么有时候图例无法显示)
|
||||
[QA 22:如何显示图例?为什么有时候图例无法显示?](#如何显示图例_为什么有时候图例无法显示)
|
||||
[QA 23:如何做成预设?](#如何做成预设)
|
||||
[QA 24:如何在图表上画点画线等自定义内容?](#如何在图表上画点画线等自定义内容)
|
||||
[QA 25:如何实现心电图类似的数据移动效果?](#如何实现心电图类似的数据移动效果)
|
||||
[QA 26:如何使用背景组件?有什么条件限制?](#如何使用背景组件有什么条件限制)
|
||||
[QA 26:如何使用背景组件?有什么条件限制?](#如何使用背景组件_有什么条件限制)
|
||||
[QA 27:Mesh can not have more than 65000 vertices?](#Mesh_cannot_have_more_than_65000_vertices)
|
||||
[QA 28:为什么serie里设置的参数运行后又被重置了?](#为什么serie里设置的参数运行后又被重置了)
|
||||
[QA 29:如何修改Serie的Symbol的颜色?](#如何修改Serie的Symbol的颜色)
|
||||
[QA 30:导入或更新XCharts时TMP报错如何处理?](#导入或更新XCharts时TMP报错怎么办)
|
||||
[QA 31:支持空数据吗?如何实现折线图断开的效果?](#支持空数据吗如何实现折线图断开的效果)
|
||||
[QA 29:为什么升级到1.6.0版本后很多自定义颜色丢失了?应该如何升级?](#为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级)
|
||||
|
||||
## 如何调整坐标轴与背景的边距
|
||||
|
||||
答:调整`Grid`组件,可调整上下左右边距。
|
||||
答:`Grid`组件,可调整上下左右边距。
|
||||
|
||||
## 如何让初始动画重新播放
|
||||
|
||||
答:调用`chart.AnimationReset()`接口。
|
||||
答:调用`AnimationReset()`接口。
|
||||
|
||||
## 如何自定义折线图饼图的颜色
|
||||
## 如何自定义折线图_饼图等数据项的颜色
|
||||
|
||||
答:通过`Theme`的`colorPalette`调整,或者部分`Serie`下的`LineStyle`和`ItemStyle`。
|
||||
|
||||
## 如何给坐标轴上的文本加上单位
|
||||
## 如何格式化文字_如我想给坐标轴标签加上单位
|
||||
|
||||
答:通过`formatter`和`numericFormatter`参数,在`Legend`、`Axis`的`AxisLabel`、`Tooltop`、`Serie`的`Label`都提供该参数的配置。
|
||||
|
||||
@@ -71,13 +68,13 @@ slug: /faq
|
||||
|
||||
## 如何调整图表的对齐方式
|
||||
|
||||
答:调整RectTransform的锚点,和UGUI的其他组件的用法一致。
|
||||
答:默认为左下角对齐,暂不支持调整。可以通过包一层parent来辅助控制。(最新版本`1.5.0`及以上已支持任意锚点,可和做UI一样任意调整对其方式)。
|
||||
|
||||
## 可以显示超过1000以上的大数据吗
|
||||
|
||||
答:可以。但`UGUI`对单个`Graphic`限制`65000`个顶点,所以太多的数据不一定能显示完全。可通过设置采样距离`sampleDist`开启采样简化过密曲线。也可以通过设置一些参数来减少图表的顶点数有助于显示更多数据。如缩小图表的尺寸,关闭或减少坐标轴的客户端绘制,关闭`Serie`的`symbol`和`label`显示等。折线图的普通线图`Normal`比平滑线图`Smooth`占用顶点数更少。`1.5.0`以上版本可以设置`large`和`largeThreshold`参数来开启性能模式。
|
||||
|
||||
## 折线图可以画虚线点线点划线吗
|
||||
## 折线图可以画虚线_点线_点划线吗
|
||||
|
||||
答:可以。通过`Serie`下的`lineType`选择线条样式。当要显示的数据过多(成千以上)数据间过密时建议使用`Normal`或者`Step`样式。
|
||||
|
||||
@@ -91,13 +88,13 @@ slug: /faq
|
||||
|
||||
## 如何在数据项顶上显示文本
|
||||
|
||||
答:通过设置`Serie`下的`Label`。3.0版本需要先添加`LabelStyle`组件。
|
||||
答:通过设置`Serie`下的`Label`。
|
||||
|
||||
## 如何给数据项自定义图标
|
||||
|
||||
答:通过设置`Serie`的`data`下的数据项可单独设置`icon`相关参数。
|
||||
|
||||
## 锯齿太严重如何让图表更顺滑
|
||||
## 锯齿太严重_如何让图表更顺滑
|
||||
|
||||
答:开启抗锯齿设置(在`Unity`里设置)。调整UI渲染模式为`Camera`模式,开启`MSAA`,设置`4`倍或更高抗锯齿。
|
||||
|
||||
@@ -111,7 +108,7 @@ slug: /faq
|
||||
|
||||
## 如何自定义Tooltip的显示内容
|
||||
|
||||
答:自定义总的内容可以通过`Tooltip`的`formatter`。如果只是想调整所有的`serie`的显示格式可以用`itemFormatter`和`titleFormatter`结合。如果想每个`serie`的显示格式不一样,可以定制`serie`的`itemStyle`里的`tooltipFormatter`。具体的用法请查阅[XCharts配置项手册](https://xcharts-team.github.io/docs/configuration#Tooltip-itemFormatter)。
|
||||
答:自定义总的内容可以通过`Tooltip`的`formatter`。如果只是想调整所有的`serie`的显示格式可以用`itemFormatter`和`titleFormatter`结合。如果想每个`serie`的显示格式不一样,可以定制`serie`的`itemStyle`里的`tooltipFormatter`。具体的用法请查阅[XCharts配置项手册](XCharts配置项手册.md)。
|
||||
|
||||
## 如何让Y轴显示多位小数
|
||||
|
||||
@@ -119,15 +116,15 @@ slug: /faq
|
||||
|
||||
## 如何用代码动态更新数据
|
||||
|
||||
答:请查阅`Example`下的代码,`Example13_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能,相关API请查看文档:[XChartsAPI接口](api.md) 。
|
||||
答:请查阅`Example`下的代码,`Example13_LineSimple.cs`就是一个简单添加数据构建折线图的例子,其他`Demo`也都是通过代码控制不同的组件实现不同的功能,相关API请查看文档:[XChartsAPI接口](XChartsAPI.md) 。
|
||||
|
||||
## 如何显示图例为什么有时候图例无法显示
|
||||
## 如何显示图例_为什么有时候图例无法显示
|
||||
|
||||
答:首先,你的`serie`里的`name`需有值不为空。然后开启`Legend`显示,里面的`data`可以默认为空,表示显示所有的图例。如果你只想显示部分`serie`的图例,在`data`中填入要显示的图例的`name`即可。如果`data`中的值都不是系列的`name`,那图例就不会显示。
|
||||
|
||||
## 如何做成预设
|
||||
|
||||
答:做成prefab前,执行一下`Rebuild Chart Object`重新刷新节点,避免有冗余的节点存在。
|
||||
答:请删除chart下所有的子组件再拖成预设。
|
||||
|
||||
## 如何在图表上画点画线等自定义内容
|
||||
|
||||
@@ -137,7 +134,7 @@ slug: /faq
|
||||
|
||||
答:参考`Example`目录下的`Example_Dynamic.cs`。主要通过设置`maxCache`参数实现。`axis`和`serie`都设置相同的`maxCache`。`maxCache`可固定数据个数,当数据超过设定时会先删除第一个在添加新数据,实现数据移动效果。
|
||||
|
||||
## 如何使用背景组件有什么条件限制
|
||||
## 如何使用背景组件_有什么条件限制
|
||||
|
||||
答:设置`background`组件的`show`为`true`。
|
||||
|
||||
@@ -153,19 +150,18 @@ slug: /faq
|
||||
|
||||
答:检测下代码里是否调用了`RemoveData()`并重新添加`Serie`了。如果想保留`Serie`的配置可以只`ClearData()`,然后重新添加数据。
|
||||
|
||||
## 如何修改Serie的Symbol的颜色
|
||||
## 为什么升级到1_6_0版本后很多自定义颜色丢失了_应该如何升级
|
||||
|
||||
答:`Symbol` 的颜色是使用的 `ItemStyle` 的 `color`。
|
||||
答:1.6.0版本为了减少隐式转换,将所有的绘制相关的`Color`都改为了`Color32`,所以会导致一些自定义的颜色的丢失。影响到的主要组件有:`ItemStyle`,`LineStyle`,`AreaStyle`,`Vessel`,`VisualMap`,`AxisSplitArea`,`AxisSplitLine`,`GaugeAxis`,`SerieLabel`等。可以用脚本[UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)进行升级。
|
||||
升级步骤如下:
|
||||
1. 备份好你的项目。
|
||||
2. 先不升级`XCharts`,只下载或拷贝脚本[UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs)放到旧项目的`Editor`下,由于旧版本可能不存在某些新版本才有的图表或者属性配置,可能会编译错误,需要处理按3,4步骤处理一下。
|
||||
3. 若是由`itemStyle.toColor2`引起的编译报错,可将导出地方的`itemStyle.toColor2`改为`Color.clear`;导入的地方注释掉即可。
|
||||
4. 若是由`LiquidChart`引起的编译报错,将所有涉及`LiquidChart`的地方都注释掉即可。
|
||||
5. 编译通过后,通过`菜单栏->XCharts->ExportColorConfig`导出旧版本的颜色配置文件(配置文件默认保存到`Assets`下的`color.config`)。
|
||||
6. 升级`XCharts`到最新版本。
|
||||
7. 通过`菜单栏->XCharts->ImportColorConfig`将`color.config`导入即可恢复自定义的颜色(如果`color.config`不在升级后的项目的`Assets`下的话需要拷贝到此目录下)。
|
||||
|
||||
## 导入或更新XCharts时TMP报错怎么办
|
||||
|
||||
答:XCharts默认时不开启TMP,所以asmdef上没有TMP的引用。当本地开启TMP后再更新XCharts可能会出现这个问题。可通过以下两种方式解决:
|
||||
|
||||
1. 找到`XCharts.Runtime.asmdef`和`XCharts.Editor.asmdef`,手动加上 `TextMeshPro`的引用
|
||||
2. 移除`PlayerSetting`中`Scripting Define Symbols`的`dUI_TextMeshPro`宏
|
||||
|
||||
`3.8.0`版本后增加[XCharts-Daemon](https://github.com/XCharts-Team/XCharts-Daemon)守护程序,将XCharts-Daemon导入项目后,在更新XCharts时守护程序会自动根据本地开启的TMP情况刷新asmdef,确保编译正常。
|
||||
|
||||
## 支持空数据吗如何实现折线图断开的效果
|
||||
|
||||
答:`Serie`的`data`是`double`类型,所以无法表示空数据。可通过开启`Serie`的`ignore`和指定`ignoreValue`来达到空数据的效果。也可以每个`SerieData`设置`ignore`参数。忽略数据后断开还是连接可设置`ignoreLineBreak`参数。
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
7
Assets/XCharts/Documentation/XCharts问答.md.meta
Normal file
7
Assets/XCharts/Documentation/XCharts问答.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a4780a4fbaf446cc9d948b6b2c803d6
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
148
Assets/XCharts/Documentation/xcharts-api-EN.md
Normal file
148
Assets/XCharts/Documentation/xcharts-api-EN.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# XCharts API
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
## `BaseChart`
|
||||
|
||||
* `BaseChart.theme`:主题组件`ThemeInfo`。
|
||||
* `BaseChart.title`:标题组件`Title`。
|
||||
* `BaseChart.legend`:图例组件`Legend`。
|
||||
* `BaseChart.tooltip`:提示框组件`Tooltip`。
|
||||
* `BaseChart.series`:系列列表`Series`。
|
||||
* `BaseChart.chartName`:图表的别称。
|
||||
* `BaseChart.chartWidth`:图表的宽。
|
||||
* `BaseChart.chartHeight`:图表的高。
|
||||
* `BaseChart.forceOpenRaycastTarget`:强制开启鼠标事件检测。一般不用手动设置,内部会自动判断是否需要检测。
|
||||
* `BaseChart.onCustomDraw`:自定义底部绘制回调。在绘制Serie前调用。
|
||||
* `BaseChart.onCustomDrawBeforeSerie`:自定义Serie绘制回调。在每个Serie绘制完前调用。
|
||||
* `BaseChart.onCustomDrawAfterSerie`:自定义Serie绘制回调。在每个Serie绘制完后调用。
|
||||
* `BaseChart.onCustomDrawTop`:自定义顶部绘制回调。在绘制Tooltip前调用。
|
||||
* `BaseChart.onPointerClick`:鼠标点击回调。
|
||||
* `BaseChart.onPointerDown`:鼠标按下回调。
|
||||
* `BaseChart.onPointerUp`:鼠标弹起回调。
|
||||
* `BaseChart.onPointerEnter`:鼠标进入图表回调。
|
||||
* `BaseChart.onPointerExit`:鼠标退出图表回调。
|
||||
* `BaseChart.onBeginDrag`:鼠标开始拖拽回调。
|
||||
* `BaseChart.onDrag`:鼠标拖拽回调。
|
||||
* `BaseChart.onEndDrag`:鼠标结束拖拽回调。
|
||||
* `BaseChart.onScroll`:鼠标滚动回调。
|
||||
* `BaseChart.SetSize(float width, float height)`: 设置图表的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)。
|
||||
* `BaseChart.ClearData()`:清除所有数据,系列列表会保留,只是移除列表中系列的数据。
|
||||
* `BaseChart.RemoveData()`:清除所有系列和图例数据,系列列表也会被清除。
|
||||
* `BaseChart.RemoveData(string serieName)`:清除指定系列名称的数据。
|
||||
* `BaseChart.AddSerie(SerieType type, string serieName = null, bool show = true)`:添加一个系列到系列列表中。
|
||||
* `BaseChart.AddData(string serieName, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float data, string dataName = null)`:添加一个数据到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(int serieIndex, List<float> multidimensionalData, string dataName = null)`:添加多维数据`(x,y,z...)`到指定的系列中。
|
||||
* `BaseChart.AddData(string serieName, float xValue, float yValue, string dataName)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.AddData(int serieIndex, float xValue, float yValue, string dataName = null)`:添加`(x,y)`数据到指定系列中。
|
||||
* `BaseChart.UpdateData(string serieName,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(int serieIndex,int dataIndex, float value)`:更新指定系列中的指定索引数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, List<float> multidimensionalData)`:更新指定系列指定索引的数据项的多维数据。
|
||||
* `BaseChart.UpdateData(string serieName, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateData(int serieIndex, int dataIndex, int dimension, float value)`:更新指定系列指定索引指定维数的数据。维数从0开始。
|
||||
* `BaseChart.UpdateDataName(string serieName,int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.UpdateDataName(int serieIndex, int dataIndex, string dataName)`:更新指定系列中的指定索引数据名称。
|
||||
* `BaseChart.SetActive(string serieName, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.SetActive(int serieIndex, bool active)`:设置指定系列是否显示。
|
||||
* `BaseChart.IsActive(string serieName)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActive(int serieIndex)`:获取指定系列是否显示。
|
||||
* `BaseChart.IsActiveByLegend(string legendName)`:获得指定图例名字的系列是否显示。
|
||||
* `BaseChart.RefreshChart()`:在下一帧刷新图表。
|
||||
* `BaseChart.RefreshLabel()`:在下一帧刷新文本标签。
|
||||
* `BaseChart.RefreshTooltip()`:立即刷新`Tooltip`组件。
|
||||
* `BaseChart.UpdateTheme(Theme theme)`:切换图表主题。
|
||||
* `BaseChart.AnimationEnable(bool flag)`:启用或关闭动画。
|
||||
* `BaseChart.AnimationFadeIn()`:渐入动画。
|
||||
* `BaseChart.AnimationFadeOut()`:渐出动画。
|
||||
* `BaseChart.AnimationPause()`:暂停动画。
|
||||
* `BaseChart.AnimationResume()`:继续动画。
|
||||
* `BaseChart.AnimationReset()`:重置动画。
|
||||
* `BaseChart.ClickLegendButton(int legendIndex, string legendName, bool show)`:点击图例按钮。
|
||||
* `BaseChart.IsInChart(Vector2 local)`:坐标是否在图表范围内。
|
||||
* `BaseChart.IsInChart(float x, float y)`:坐标是否在图表范围内。
|
||||
* `BaseChart.EnableBackground(bool flag)`:开启背景组件。背景组件在`chart`受上层布局控制时无法开启。
|
||||
* `BaseChart.SetBasePainterMaterial(Material material)`:设置Base Painter的材质球。
|
||||
* `BaseChart.SetSeriePainterMaterial(Material material)`:设置Serie Painter的材质球。
|
||||
* `BaseChart.SetTopPainterMaterial(Material material)`:设置Top Painter的材质球。
|
||||
|
||||
## `CoordinateChart`
|
||||
|
||||
* `CoordinateChart.grid`:网格组件 `Grid`。
|
||||
* `CoordinateChart.xAxes`:左右两个 `X` 轴组件 `XAxis`。
|
||||
* `CoordinateChart.yAxes`:左右两个 `Y` 轴组件 `YAxis`。
|
||||
* `CoordianteChart.xAxis0`:X轴(下)。
|
||||
* `CoordianteChart.xAxis1`:X轴(上)。
|
||||
* `CoordianteChart.xAxis0`:Y轴(左)。
|
||||
* `CoordianteChart.yAxis1`:Y轴(右)。
|
||||
* `CoordinateChart.dataZoom`:区域缩放组件 `DataZoom`。
|
||||
* `CoordinateChart.ClearAxisData()`:清除所有x轴和y轴的类目数据。
|
||||
* `CoordinateChart.AddXAxisData(string category, int xAxisIndex = 0)`:添加一个类目数据到指定的 `X` 轴。
|
||||
* `CoordinateChart.AddYAxisData(string category, int yAxisIndex = 0)`:添加一个类目数据到指定的 `Y` 轴。
|
||||
* `CoordinateChart.IsValue()`:是否是纯数值坐标。
|
||||
* `CoordinateChart.RefreshDataZoom()`:在下一帧刷新DataZoom组件。
|
||||
* `CoordinateChart.RefreshAxisMinMaxValue()`:立即刷新数值坐标轴的最大最小值(更新坐标轴标签并触发重绘)。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector3 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(float x, float y)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.IsInCooridate(Vector2 local)`:坐标是否在坐标轴内。
|
||||
* `CoordinateChart.ClampInGrid(grid, Vector3 pos)`:将坐标限制在坐标系内。
|
||||
* `CoordinateChart.CovertXYAxis(int index)`:转换X轴和Y轴的配置。
|
||||
* `CoordinateChart.UpdateCoordinate()`:更新坐标系原点和宽高。一般内部会自动更新,也可强制更新。
|
||||
* `CoordinateChart.SetMaxCache(int maxCache)`:设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。
|
||||
|
||||
## `LineChart`
|
||||
|
||||
* 继承 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `BarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
* `BarChart.onPointerClickBar`:点击柱条回调。参数:`eventData`, `dataIndex`
|
||||
|
||||
## `PieChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
|
||||
* `PieChart.onPointerClickPie`:点击柱条回调。参数:`eventData`, `serieIndex`, `dataIndex`
|
||||
|
||||
## `RadarChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RadarChart.radars`:雷达坐标系组件列表 `Radar`。
|
||||
* `RadarChart.RemoveRadar()`:移除所有雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar radar)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddRadar(Radar.Shape shape, Vector2 center, float radius, int splitNumber = 5,float lineWidth = 0.6f, bool showIndicator = true, bool showSplitArea = true)`:添加雷达坐标系组件。
|
||||
* `RadarChart.AddIndicator(int radarIndex, string name, float min, float max)`:添加指示器。
|
||||
* `RadarChart.UpdateIndicator(int radarIndex, int indicatorIndex, string name, float min, float max)`:更新指示器。
|
||||
* `RadarChart.GetRadar(int radarIndex)`:获得指定索引的雷达坐标系组件。
|
||||
* `RadarChart.GetIndicator(int radarIndex, int indicatorIndex)`:获得指定雷达坐标系组件指定索引的指示器。
|
||||
|
||||
## `ScatterChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `HeatmapChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* 继承自 `CoordinateChart`。
|
||||
|
||||
## `RingChart`
|
||||
|
||||
* 继承自 `BaseChart`。
|
||||
* `RingChart.UpdateMax(int serieIndex, int dataIndex, float value)`:更新指定系列执行数据项的最大值。
|
||||
* `RingChart.UpdateMax(int serieIndex, float value)`:更新指定系列的所有数据项的最大值。
|
||||
* `RingChart.UpdateMax(float value)`:更新第一个系列第一个数据项的最大值。
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts配置项手册](XCharts配置项手册.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
|
||||
7
Assets/XCharts/Documentation/xcharts-api-EN.md.meta
Normal file
7
Assets/XCharts/Documentation/xcharts-api-EN.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 529e55126e1d04a629b14d857f76fffd
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
963
Assets/XCharts/Documentation/xcharts-configuration-EN.md
Normal file
963
Assets/XCharts/Documentation/xcharts-configuration-EN.md
Normal file
@@ -0,0 +1,963 @@
|
||||
# XCharts Configuration
|
||||
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Q&A](xcharts-questions-and-answers-EN.md)
|
||||
|
||||
The translation work is still in progress.
|
||||
|
||||
__Main component:__
|
||||
|
||||
* [Axis](#XAxis)
|
||||
* [Background](#Background)
|
||||
* [DataZoom](#DataZoom)
|
||||
* [Grid](#Grid)
|
||||
* [Legend](#Legend)
|
||||
* [Polar](#Polar)
|
||||
* [Radar](#Radar)
|
||||
* [Series](#Series)
|
||||
* [Serie-Line](#Serie-Line)
|
||||
* [Serie-Bar](#Serie-Bar)
|
||||
* [Serie-Pie](#Serie-Pie)
|
||||
* [Serie-Radar](#Serie-Radar)
|
||||
* [Serie-Scatter](#Serie-Scatter)
|
||||
* [Serie-Heatmap](#Serie-Heatmap)
|
||||
* [Serie-Gauge](#Serie-Gauge)
|
||||
* [Serie-Ring](#Serie-Ring)
|
||||
* [Serie-Liquid](#Serie-Liquid)
|
||||
* [Serie-Candlestick](#Serie-Candlestick)
|
||||
* [Serie-Gantt](#Serie-Gantt)
|
||||
* [Settings](#Settings)
|
||||
* [Theme](#Theme)
|
||||
* [Title](#Title)
|
||||
* [Tooltip](#Tooltip)
|
||||
* [Vessel](#Vessel)
|
||||
* [VisualMap](#VisualMap)
|
||||
|
||||
__Sub component:__
|
||||
|
||||
* [AreaStyle](#AreaStyle)
|
||||
* [AxisLabel](#AxisLabel)
|
||||
* [AxisLine](#AxisLine)
|
||||
* [AxisName](#AxisName)
|
||||
* [AxisSplitLine](#AxisSplitLine)
|
||||
* [AxisSplitArea](#AxisSplitArea)
|
||||
* [AxisTick](#AxisTick)
|
||||
* [Emphasis](#Emphasis)
|
||||
* [ItemStyle](#ItemStyle)
|
||||
* [LineArrow](#LineArrow)
|
||||
* [LineStyle](#LineStyle)
|
||||
* [Location](#Location)
|
||||
* [MarkLine](#MarkLine)
|
||||
* [SerieAnimation](#SerieAnimation)
|
||||
* [SerieData](#SerieData)
|
||||
* [SerieLabel](#SerieLabel)
|
||||
* [SerieSymbol](#SerieSymbol)
|
||||
* [TextLimit](#TextLimit)
|
||||
* [TextStyle](#TextStyle)
|
||||
* [IconStyle](#IconStyle)
|
||||
|
||||
## `Theme`
|
||||
|
||||
Theme components. Topics are used to configure other parameters such as the global color scheme for the chart.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `theme`: Built-in theme types. There are `Default`, `Light`, `Dark` three optional built-in theme.
|
||||
* `font`: A common font for all text.
|
||||
* `backgroundColor`: Chart background color.
|
||||
* `titleTextColor`: The text color of the main title.
|
||||
* `titleSubTextColor`: The text color of the sub title.
|
||||
* `legendTextColor`: Legend text color when actived.
|
||||
* `legendUnableColor`: Legend text color when unactived.
|
||||
* `axisTextColor`: The text color of axis label.
|
||||
* `axisLineColor`: The color of axis line.
|
||||
* `axisSplitLineColor`: The color of the dividing line of the coordinate axis is the same as the default color of the axis.
|
||||
* `tooltipBackgroundColor`: The background color of the tooltip.
|
||||
* `tooltipFlagAreaColor`: The color of the shadow indicator for the tooltip.
|
||||
* `tooltipTextColor`: The text color of Tooltip.
|
||||
* `tooltipLabelColor`: The cross indicator in the tooltip coordinates the background color of the label.
|
||||
* `tooltipLineColor`: The color of the indicator line in the tooltip.
|
||||
* `dataZoomTextColor`: The text color of dataZoom.
|
||||
* `dataZoomLineColor`: The line color of dataZoom.
|
||||
* `dataZoomSelectedColor`: The selected area color of dataZoom.
|
||||
* `colorPalette`: Palette color list. The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series.
|
||||
|
||||
API:
|
||||
|
||||
* `GetColor(int index)`: Gets the color of the specified index from the palette.
|
||||
* `GetColorStr(int index)`: Gets the hexadecimal color string of the specified index from the palette.
|
||||
* `GetColor(string hexColorStr)`: Convert the html string to color.
|
||||
|
||||
## `Title`
|
||||
|
||||
Title component, including main title and subtitle.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether to show title component.Set this to false to prevent the title component from showing.
|
||||
* `text`: The content of main title, supporting `\n` for newlines.
|
||||
* `textStyle`: The text style of main title [TextStyle](#TextStyle).
|
||||
* `subText`: The content of sub title, supporting `\n` for newlines.
|
||||
* `subTextStyle`: The text style of sub title [TextStyle](#TextStyle).
|
||||
* `itemGap`: The gap between the main title and sub title.
|
||||
* `location`: The location of title component [Location](#Location).
|
||||
|
||||
## `TitleStyle`
|
||||
|
||||
Sub component for serie title.
|
||||
|
||||
* `show`: Whether to show serie title.
|
||||
* `textStyle`: The text style of title [TextStyle](#TextStyle).
|
||||
|
||||
## `Legend`
|
||||
|
||||
Legend component.The legend component shows different sets of symbol, colors, and names. You can control which series are not displayed by clicking on the legend.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether show legend component.
|
||||
* `iconType`: the legend icon symbol type:
|
||||
* `Auto` : Auto match.
|
||||
* `Custom` : Custom icon.
|
||||
* `EmptyCircle` : hollow circle.
|
||||
* `Circle` : solid Circle.
|
||||
* `Rect` : square.
|
||||
* `Triangle` :
|
||||
* `Diamond` :
|
||||
* `selectedMode`: Selected mode of legend, which controls whether series can be toggled displaying by clicking legends:
|
||||
* `Multiple`: multi-select.
|
||||
* `Single`: single select.
|
||||
* `None`: can’t select.
|
||||
* `orient`: horizontal or vertical layout:
|
||||
* `Horizonal`: horizontal layout.
|
||||
* `Vertical`: vertical layout.
|
||||
* `location`: the localtion of legend in chart [Location](#Location).
|
||||
* `itemWidth`: the width of legend icon.
|
||||
* `itemHeight`: the height of legend icon.
|
||||
* `itemGap`: The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout.
|
||||
* `itemAutoColor`: Whether the legend symbol matches the color automatically.
|
||||
* `formatter`: Legend content string template formatter. Support for wrapping lines with `\n`. Template:`{name}`.
|
||||
* `data`: Data array of legend. An array item is usually a name representing string. (If it is a pie chart, it could also be the name of a single data in the pie chart) of a series. If data is not specified, it will be auto collected from series.
|
||||
* `icons`: The list of cunstomize icons.
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
API:
|
||||
|
||||
* `ClearData()`: Clear legend data.
|
||||
* `ContainsData(string name)`: Whether include in legend data by the specified name.
|
||||
* `RemoveData(string name)`: Remove legend from data.
|
||||
* `AddData(string name)`: Add legend.
|
||||
* `GetData(int index)`: Get legend.
|
||||
* `GetIndex(string legendName)`: Get the index of legend.
|
||||
|
||||
## `Polar`
|
||||
|
||||
Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis.
|
||||
|
||||
Parameters:
|
||||
|
||||
* `show`: Whether to show the polor component.
|
||||
* `center`: The center of ploar. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between 0 and 1 represents a percentage relative to the chart.
|
||||
* `radius`: the radius of polar.
|
||||
* `backgroundColor`: Background color of polar, which is transparent by default.
|
||||
|
||||
## `Radar`
|
||||
|
||||
Radar coordinate conponnet for radar charts.
|
||||
|
||||
* `shape`: Radar render type, in which `Polygon` and `Circle` are supported.
|
||||
* `Polygon`: Polygon.
|
||||
* `Circle`: Circle.
|
||||
* `positionType`: The position type of radar indicator label display.
|
||||
* `Vertice`: Display at the vertex.
|
||||
* `Between`: Display at the middle of line.
|
||||
* `radius`: The radius of radar.[default:0.3f].
|
||||
* `center`: the center of radar chart. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between 0 and 1 represents a percentage relative to the chart.[default:[0.5f,0.4f]].
|
||||
* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated.[default:0].
|
||||
* `splitNumber`: Segments of indicator axis.[default:5].
|
||||
* `isAxisTooltip`: Tooltip displays all the data on the axis.[default:false].
|
||||
* `outRangeColor`: The color displayed when data out of range.[default:red]
|
||||
* `connectCenter`: Whether serie data connect to radar center with line.[default:false]
|
||||
* `lineGradient`: Whether need gradient for data line..[default:true]
|
||||
* `splitLine`: The split line style of radar [AxisSplitLine](#AxisSplitLine).
|
||||
* `splitArea`: The split area style of radar [AxisSplitArea](#AxisSplitArea).
|
||||
* `indicator`: Whether to show indicator.
|
||||
* `indicatorGap`: The gap of indicator and radar.
|
||||
* `indicatorList`: The indicator list [Radar.Indicator](#Radar.Indicator).
|
||||
|
||||
## `Radar.Indicator`
|
||||
|
||||
Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart.
|
||||
|
||||
* `name`: The name of indicator.
|
||||
* `max`: The maximum value of indicator, with default value of 0, but we recommend to set it manually.
|
||||
* `min`: The minimum value of indicator, with default value of 0.
|
||||
* `min`: Normal range. When the value is outside this range, the display color is automatically changed.
|
||||
* `textStyle`: The text style of indicator [TextStyle](#TextStyle).
|
||||
|
||||
## `TextLimit`
|
||||
|
||||
Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end. Only valid in the category axis.
|
||||
|
||||
* `enable`: Whether to enable text limit. [default: `true`].
|
||||
* `maxWidth`: Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. Clipping occurs when the width of the text is greater than this value. [default: `0f`].
|
||||
* `gap`: White pixel distance at both ends. [default: `10f`].
|
||||
* `suffix`: Suffixes when the length exceeds. [default: `"..."`].
|
||||
|
||||
## `TextStyle`
|
||||
|
||||
The component of settings related to text.
|
||||
|
||||
* `rotate`: rotate of text. [default: `0f`].
|
||||
* `offset`: offset of text position. [default: `Vector2.zero`].
|
||||
* `color`: color of text. [default: `Color.clear`].
|
||||
* `backgroundColor`: color of text background. [default: `Color.clear`].
|
||||
* `font`: the font of text. When `null`, the theme's font is used by default. [default: `null`].
|
||||
* `fontSize`: the size of text. [default: `18`].
|
||||
* `fontStyle`: the font style of text. [default: `FontStyle.Normal`].
|
||||
* `lineSpacing`: the space of text line. [default: `1f`].
|
||||
* `autoWrap`: Whether to wrap lines.
|
||||
* `autoAlign`: Whether to let the system automatically set alignment. If true, the system automatically selects alignment, and if false, use alignment.
|
||||
|
||||
## `Tooltip`
|
||||
|
||||
Tooltip component.
|
||||
|
||||
* `show`: Whether to show the tooltip component.
|
||||
* `type`: Indicator type. Indicator types are:
|
||||
* `Line`: line indicator.
|
||||
* `Shadow`: shadow crosshair indicator.
|
||||
* `None`: no indicator displayed.
|
||||
* `Corss`: crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes.
|
||||
* `formatter`: A string template formatter for the total content of the prompt box. Support for wrapping lines with `\n`. When formatter is not null, use formatter first, otherwise use itemFormatter.
|
||||
* Template variables are `{.}`, `{a}`, `{b}`, `{c}`, `{d}`.
|
||||
* `{.}` is the dot of the corresponding color of `serie` that is currently indicated or whose `index` is `0`.`
|
||||
* `{a}` is the `name` of the `serie` that is currently indicated or whose `index` is `0`.
|
||||
* `{b}` is the `name` of the `serieData` that is currently indicated or whose `index` is `0`, or a `category` value (such as the X-axis of a line chart).
|
||||
* `{c}` is the value of a Y-dimension (`dimesion` is 1) from the `serie` that is currently indicated or whose `index` is `0`.
|
||||
* `{d}` is the percentage value of Y-dimensions (`dimesion` is 1) from the `serie` that is currently indicated or whose `index` is `0`, with no `%` sign.
|
||||
* `{e}` is the `name` of the `serieData` that is currently indicated or whose `index` is `0`.
|
||||
* `{.1}` represents a dot from serie corresponding color that specifies `index` as `1`.
|
||||
* `1` in `{a1}`, `{b1}`, `{c1}` represents a `serie` that specifies an `index` of `1`.
|
||||
* `{c1:2}` represents the third data from `serie`'s current indication data item indexed to `1` (a data item has multiple data, `index` 2 represents the third data).
|
||||
* `{c1:2-2}` represents the third data item from `serie`'s third data item indexed to `1` (i.e., which data item must be specified to specify).
|
||||
* `{d1:2: F2}` indicates that a formatted string with a value specified separately is `F2` (`numericFormatter` is used when not specified).
|
||||
* Example: `"{a}, {c}"`, `"{a1}, {c1: f1}"`, `"{a1}, {c1:0: f1}"`, `"{a1} : {c1:1-1: f1}"`
|
||||
* `titleFormatter`: The string template formatter for the tooltip title content. Support for wrapping lines with `\n`. This is only valid if the `itemFormatter` is in effect. The placeholder `{I}` can be set separately to indicate that the title is ignored and not displayed.
|
||||
* `itemFormatter`: a string template formatter for a single Serie or data item content. Support for wrapping lines with `\n`. When `formatter` is not null, use `formatter` first, otherwise use `itemFormatter`.
|
||||
* `numericFormatter`: Standard numeric format string. Used to format numeric values to display as strings. Using `Axx` form: `A` is the single character of the format specifier, supporting `C` currency, `D` decimal, `E` exponent, `F` number of vertices, `G` regular, `N` digits, `P` percentage, `R` round tripping, `X` hex etc. `XX` is the precision specification, from `0` - `99`. see: <https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings>
|
||||
* `fixedWidth`: Fixed width. Higher priority than `minWidth`.
|
||||
* `fixedHeight`: Fixed height. Higher priority than `minHeight`.
|
||||
* `minWidth`: Minimum width. If `fixedWidth` has a value, get `fixedWidth` first.
|
||||
* `minHeight`: Minimum height. If `fixedHeight` has a value, get `fixedHeight` first.
|
||||
* `paddingLeftRight`: the text padding of left and right. [defaut: `5f`].
|
||||
* `paddingTopBottom`: the text padding of top and bottom. [defaut: `5f`].
|
||||
* `backgroundImage`: The image of icon.
|
||||
* `ignoreDataShow`: Whether to show ignored data on tooltip. [defaut: `false`].
|
||||
* `ignoreDataDefaultContent`: The default display character information for ignored data.
|
||||
* `alwayShow`: Whether to trigger after always display.
|
||||
* `offset`: `(since v1.5.3)`The position offset of tooltip relative to the mouse position.
|
||||
* `lineStyle`: the line style of indicator line [LineStyle](#LineStyle).
|
||||
* `textStyle`: the text style of content [TextStyle](#TextStyle).
|
||||
|
||||
## `Vessel`
|
||||
|
||||
Vessel component for liquid chart. There can be multiple vessels in a Chart, which can be matched by vesselIndex in Serie.
|
||||
|
||||
* `show`: Whether to show the vessel. [defaut: `true`]
|
||||
* `shape`: The shape of vessel. [default: `Shape.Circle`]
|
||||
* `shapeWidth`: Thickness of vessel. [defaut: `5f`]
|
||||
* `gap`: The gap between the vessel and the liquid. [defaut: `10f`]
|
||||
* `center`: The center of vessel. The `center[0]` is the x-coordinate, and the `center[1]` is the y-coordinate. When value between `0` and `1` represents a percentage relative to the chart. [default: `[0.5f,0.45f]`]
|
||||
* `radius`: The radius of vessel. When value between 0 and 1 represents a percentage relative to the chart. [default: `0.35f`]
|
||||
* `smoothness`: The smoothness of wave. [default: `1f`]
|
||||
* `backgroundColor`: Background color of polar, which is transparent by default. [default: `Color.clear`]
|
||||
* `color`: Vessel color. The default is consistent with Serie. [default: `Color32(70, 70, 240, 255)`]
|
||||
* `autoColor`: Whether automatic color. If true, the color matches serie. [default: `true`]
|
||||
* `width`:The width of vessel. This value is valid when `shape` is `Rect`.
|
||||
* `height`:The height of vessel. This value is valid when `shape` is `Rect`.
|
||||
* `cornerRadius`: The radius of rounded corner. This value is valid when `shape` is `Rect`.
|
||||
|
||||
## `DataZoom`
|
||||
|
||||
DataZoom component is used for zooming a specific area, which enables user to investigate data in detail, or get an overview of the data, or get rid of outlier points.
|
||||
Currently only the control `X` axis is supported.
|
||||
|
||||
* `enable`: Whether to show dataZoom.
|
||||
* `supportInside`: Whether built-in support is supported. Built into the coordinate system to allow the user to zoom in and out of the coordinate system by mouse dragging, mouse wheel, finger swiping (on the touch screen).
|
||||
* `supportSlider`: Whether a slider is supported. There are separate sliders on which the user zooms or roams.
|
||||
* ~~`filterMode`: The mode of data filter, not support yet.~~
|
||||
* ~~`Filter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered if one of the relevant dimensions is out of the window.~~
|
||||
* ~~`WeakFilter`: data that outside the window will be filtered, which may lead to some changes of windows of other axes. For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window.~~
|
||||
* ~~`Empty`: data that outside the window will be set to NaN, which will not lead to changes of windows of other axes.~~
|
||||
* ~~`None`: Do not filter data.~~
|
||||
* ~~`xAxisIndex`: Specify which xAxis is controlled by the dataZoom.~~
|
||||
* ~~`yAxisIndex`: Specify which yAxis is controlled by the dataZoom.~~
|
||||
* `showDataShadow`: Whether to show data shadow, to indicate the data tendency in brief. [default: `true`]
|
||||
* `showDetail`: Whether to show detail, that is, show the detailed data information when dragging. [default: `false`]
|
||||
* `zoomLock`: Specify whether to lock the size of window (selected area). [default: `false`]
|
||||
* ~~`realtime`: Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. [default: `true`]~~
|
||||
* `backgroundColor`: The background color of the component.
|
||||
* `selectedAreaColor`: The color of the selected area.
|
||||
* `bottom`: Distance between dataZoom component and the bottom side of the container. [default: `10f`]
|
||||
* `top`: Distance between dataZoom component and the top side of the container. [default: `0`]
|
||||
* `left`: Distance between dataZoom component and the left side of the container. [default: `0`]
|
||||
* `right`: Distance between dataZoom component and the right side of the container. [default: `0`]
|
||||
* `height`: The height of dataZoom component. height value is a instant pixel value like 10. [default: `50f`]
|
||||
* `rangeMode`: Use absolute value or percent value in `DataZoom.start` and `DataZoom.end`. [default: `RangeMode.Percent`].
|
||||
* `Percent`: percent.
|
||||
* `start`: The start percentage of the window out of the data extent, in the range of `0 ~ 100`. [default: `30f`]
|
||||
* `end`: The end percentage of the window out of the data extent, in the range of 0 ~ 100. [default: `70f`]
|
||||
* `scrollSensitivity`: The sensitivity of dataZoom scroll. The larger the number, the more sensitive it is. [default: `10f`]
|
||||
* `textStyle`: style of datazoom label.
|
||||
* `minShowNum`: Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. [default: `1`]
|
||||
|
||||
## `VisualMap`
|
||||
|
||||
VisualMap component. mapping data to visual elements such as colors.
|
||||
|
||||
* `enable`: Whether enable visualMap component. [default: false]
|
||||
* `show`: Whether to display components. If set to false, it will not show up, but the data mapping function still exists. [default: true]
|
||||
* `type`: the type of visualmap component.
|
||||
* `Continuous`: Continuous.
|
||||
* ~~`Piecewise`: Piecewise.~~
|
||||
* ~~`selectedMode`: the selected mode for Piecewise visualMap.~~
|
||||
* ~~`Multiple`: Multiple.~~
|
||||
* ~~`Single`: Single.~~
|
||||
|
||||
* `autoMinMax`: Automatically set min, Max value.
|
||||
* `min`: The minimum allowed. `min` must be user specified. `[min, max]` forms the domain of the visualMap.
|
||||
* `max`: The maximum allowed. `max` must be user specified. `[min, max]` forms the domain of the visualMap.
|
||||
* `range`: Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max].
|
||||
* ~~`text`: Text on both ends. such as [`High`, `Low`].~~
|
||||
* ~~`textGap`: The distance between the two text bodies.~~
|
||||
* `splitNumber`: For continuous data, it is automatically evenly divided into several segments and automatically matches the size of inRange color list when the default is 0.
|
||||
* `calculable`: Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range).
|
||||
* ~~`realtime`: Whether to update in real time while dragging.~~
|
||||
* `itemWidth`: The width of the figure, that is, the width of the color bar.
|
||||
* `itemHeight`: The height of the figure, that is, the height of the color bar.
|
||||
* `borderWidth`: 边框线宽,单位px。
|
||||
* `dimension`: Specifies which `dimension` of the `Data` to map to the visual element. `Data` is series.data. Starting at 1, the default is 0 to take the last dimension in data.
|
||||
* `hoverLink`: When the hoverLink function is turned on, when the mouse hovers over the visualMap component, the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position.
|
||||
* `orient`: Is the layout horizontal or vertical.
|
||||
* `location`: The location of component.
|
||||
* `inRange`: Defines the visual color in the selected range.
|
||||
* ~~`outOfRange`: Defines a visual color outside of the selected range.~~
|
||||
|
||||
## `Grid`
|
||||
|
||||
Grid component. Drawing grid in rectangular coordinate. In a single grid, at most two X and Y axes each is allowed. Line chart, bar chart, and scatter chart can be drawn in grid. There is only one single grid component at most in a single echarts instance.
|
||||
|
||||
* `show`: Whether to show the grid in rectangular coordinate.
|
||||
* `left`: Distance between grid component and the left side of the container.
|
||||
* `right`: Distance between grid component and the right side of the container.
|
||||
* `top`: Distance between grid component and the top side of the container.
|
||||
* `bottom`: Distance between grid component and the bottom side of the container.
|
||||
* `backgroundColor`: Background color of grid, which is transparent by default.
|
||||
|
||||
## `GaugeAxis`
|
||||
|
||||
GaugeAxis sub component. Settings related to gauge axis line.
|
||||
|
||||
* `axisLine`: axis line style.
|
||||
* `splitLine`: slit line style.
|
||||
* `axisTick`: axis tick style.
|
||||
* `axisLabel`: axis label style.
|
||||
* `axisLabelText`: Coordinate axis scale label custom content. When the content is empty, `axisLabel` automatically displays the content according to the scale; otherwise, the content is taken from the list definition.
|
||||
|
||||
## `GaugePointer`
|
||||
|
||||
GaugePointer sub component. Settings related to gauge pointer.
|
||||
|
||||
* `show`: Whether to display a pointer.
|
||||
* `width`: Pointer width.
|
||||
* `length`: Pointer length. It can be an absolute value, or it can be a percentage relative to the radius (0-1).
|
||||
|
||||
## `XAxis`
|
||||
|
||||
The x axis in cartesian(rectangular) coordinate. a grid component can place at most 2 x axis, one on the bottom and another on the top.
|
||||
|
||||
* `show`: Whether to show axis. By default `xAxes[0]` is `true` and `xAxes[1]` is `false`.
|
||||
* `gridIndex`: The index of the grid on which the axis are located, by default, is in the first grid.
|
||||
* `type`: the type of axis. The default is `Category`.
|
||||
* `Value`: Numerical axis for continuous data.
|
||||
* `Category`: Category axis, applicable to discrete category data, category data must be set through `data` for this type.
|
||||
* `Log`: Log axis, it applies to logarithmic data.
|
||||
* `position`: the position of axis in grid.
|
||||
* `Left`: left of grid.
|
||||
* `Right`: right of grid.
|
||||
* `Bottom`: bottom of grid.
|
||||
* `Top`: top of grid.
|
||||
* `offset`: the offset of axis from the default position. Useful when the same position has multiple axes.
|
||||
* `logBaseE`: On the log axis, if base e is the natural number, and is true, logBase fails.
|
||||
* `logBase`: Base of logarithm, which is valid only for numeric axes with type: `Log`.
|
||||
* `minMaxType`: the type of axis minmax.The default is `Default`.
|
||||
* `Default`: 0 - max.
|
||||
* `MinMax`: min - max.
|
||||
* `Custom`: Custom min - max.
|
||||
* `min`: The minimun value of axis. Valid when `minMaxType` is `Custom`.
|
||||
* `max`: The maximum value of axis. Valid when `minMaxType` is `Custom`.
|
||||
* `ceilRate`: The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated.
|
||||
* `splitNumber`: Number of segments that the axis is split into. The default is `5`, When `splitNumber` is set to `0`, it draws all the category data.
|
||||
* `interval`: Compulsively set segmentation interval for axis.This is unavailable for category axis. The `splitNumber` is invalid when set.
|
||||
* `boundaryGap`: The boundary gap on both sides of a coordinate axis.
|
||||
* `maxCache`: The max number of axis data cache. The first data will be remove when the size of axis data is larger then `maxCache`.
|
||||
* `inverse`: Whether the axis are reversed or not. Invalid in `Category` axis.
|
||||
* `insertDataToHead`: Whether to add new data at the head or at the end of the list.
|
||||
* `data`: Category data, valid in the `Category` axis.
|
||||
* `icons`: icon list.
|
||||
* `axisLine`: the style of axis line [AxisLine](#AxisLine).
|
||||
* `axisName`: the style of axis name [AxisName](#AxisName).
|
||||
* `axisTick`: the style of axis tick [AxisTick](#AxisTick).
|
||||
* `axisLabel`: the style of axis label [AxisLabel](#AxisLabel).
|
||||
* `splitLine`: the style of axis split line [AxisSplitLine](#SplitLine).
|
||||
* `splitArea`: the style of axis split area [AxisSplitArea](#AxisSplitArea).
|
||||
* `iconStyle`: the style of the axis scale icon [IconStyle](#IconStyle).
|
||||
|
||||
## `Background`
|
||||
|
||||
Background component.Due to the limitations of the framework, there are two limitations to the use of background component:
|
||||
1: The parent node of chart cannot have a layout control class component.
|
||||
2: The parent node of Chart can only have one child node of the current chart.
|
||||
|
||||
* `show`: Whether to enable the background component. However, the ability to activate the background component is subject to other conditions.
|
||||
* `image`: the image of background.
|
||||
* `imageType`: the fill type of background image.
|
||||
* `imageColor`: the color of background image, The default is `white`.
|
||||
* `hideThemeBackgroundColor`: Whether to hide the background color set in the `theme` when the background component is on.
|
||||
|
||||
## `YAxis`
|
||||
|
||||
The y axis in cartesian(rectangular) coordinate. a grid component can place at most 2 y axis, one on the left and another on the right.
|
||||
|
||||
The parameters are the same as XAxis.
|
||||
|
||||
## `Series`
|
||||
|
||||
Serie list. Each serie determines its own chart type by `type`.
|
||||
|
||||
Check each serie for parameters.
|
||||
|
||||
## `Serie-Line`
|
||||
|
||||
Line chart serie.
|
||||
|
||||
* `show`: Whether to show serie in chart.
|
||||
* `type`: `Line`.
|
||||
* `name`: Series name used for displaying in tooltip and filtering with legend.
|
||||
* `stack`: If stack the value. On the same category axis, the series with the same stack name would be put on top of each other.
|
||||
* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `minShow`: The min number of data to show in chart.
|
||||
* `maxShow`: The max number of data to show in chart.
|
||||
* `maxCache`: The max number of serie data cache. The first data will be remove when the size of serie data is larger then maxCache.
|
||||
* `sampleDist`: The minimum horizontal pixel distance of sampling, which defaults to `0` without sampling. When the horizontal pixel distance between two data points is less than this value, start sampling to ensure that the horizontal pixel distance between two points is not less than this value.
|
||||
* `sampleType`: Sample type. This is valid when `sampleDist` is greater than `0`. The following five sampling types are supported:
|
||||
* `Peak`: Take a peak. When the average value of the filter point is greater than or equal to `sampleAverage`, take the maximum value; If you do it the other way around, you get the minimum.
|
||||
* `Average`: Take the average of the filter points.
|
||||
* `Max`: Take the maximum value of the filter point.
|
||||
* `Min`: Take the minimum value of the filter point.
|
||||
* `Sum`: Take the sum of the filter points.
|
||||
* `sampleAverage`: Set the sampling average. When `sampleType` is `Peak`, is the maximum or minimum value used to compare the average value of the filtered data. The default of `0` is to calculate the average of all data in real time.
|
||||
* `clip`: 是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineType`: 折线图样式类型。支持以下十种类型:
|
||||
* `Normal`: 普通折线图。
|
||||
* `Smooth`: 平滑曲线。
|
||||
* `SmoothDash`: 平滑虚线。
|
||||
* `StepStart`: 阶梯线图: 当前点。
|
||||
* `StepMiddle`: 阶梯线图: 当前点和下一个点的中间。
|
||||
* `StepEnd`: 阶梯线图: 下一个拐点。
|
||||
* `Dash`: 虚线。
|
||||
* `Dot`: 点线。
|
||||
* `DashDot`: 点划线。
|
||||
* `DashDotDot`: 双点划线。
|
||||
* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `lineArrow`: 折线图的箭头 [LineArrow](#LineArrow)。
|
||||
* `insertDataToHead`: Whether to add new data at the head or at the end of the list.
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Bar`
|
||||
|
||||
折线图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Bar`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `stack`: 数据堆叠。同个类目轴上系列配置相同的 `stack` 值后,后一个系列的值会在前一个系列的值上相加。
|
||||
* `xAxisIndex`: Index of x axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `yAxisIndex`: Index of y axis to combine with, which is useful for multiple axes in one chart.
|
||||
* `minShow`: 系列显示数据的最小索引。
|
||||
* `maxShow`: 系列显示数据的最大索引。
|
||||
* `maxCache`: 系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `barType`: 柱状图类型。以下几种类型:
|
||||
* `Normal`: 普通柱状图。
|
||||
* `Zebra`: 斑马柱状图。
|
||||
* `Capsule`: 胶囊柱状图。
|
||||
* `barPercentStack`: 是否百分比堆叠柱状图,相同 `stack` 的 `serie` 只要有一个 `barPercentStack` 为 `true`,则就显示成百分比堆叠柱状图。
|
||||
* `barWidth`: 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。
|
||||
* `barGap`: 不同系列的柱间距离。为百分比(如 `'0.3f'`,表示柱子宽度的 `30%`)。如果想要两个系列的柱子重叠,可以设置 `barGap` 为 `'-1f'`。这在用柱子做背景的时候有用。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barCategoryGap`: 同一系列的柱间距离,默认为类目间距的20%,可设固定值。在同一坐标系上,此属性会被多个 `'bar'` 系列共享。此属性应设置于此坐标系中最后一个 `'bar'` 系列上才会生效,并且是对此坐标系中所有 `'bar'` 系列生效。
|
||||
* `barZebraWidth`: 斑马线的粗细。`barType` 为 `Zebra` 时有效。
|
||||
* `barZebraGap`: 斑马线的间距。`barType` 为 `Zebra` 时有效。
|
||||
* `clip`: 是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`: 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点: 优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`: 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `itemStyle`: 柱条样式 [ItemStyle](#ItemStyle)。
|
||||
* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Pie`
|
||||
|
||||
饼图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Pie`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `pieRoseType`: 南丁格尔玫瑰图类型,支持以下类型:
|
||||
* `None`: 不展示成南丁格尔玫瑰图。
|
||||
* `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。
|
||||
* `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。
|
||||
* `space`: 扇区间隙。
|
||||
* `center`: 中心点坐标。当值为`0-1`的浮点数时表示百分比。
|
||||
* `radius`: 半径。`radius[0]`为内径,`radius[1]`为外径。当内径大于0时即为圆环图。
|
||||
* `minAngle`: The minimum angle of sector(0-360). It prevents some sector from being too small when value is small.
|
||||
* `roundCap`: 是否启用圆弧效果。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制,对应的`Label`和`Legend`也不会显示。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `avoidLabelOverlap`: 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Radar`
|
||||
|
||||
雷达图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Radar`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `radarType`: 雷达图类型`RadarType`,支持以下类型:
|
||||
* `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个`serieData`就可组成一个圈(多维数据)。
|
||||
* `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个`serieData`组成一个圈,数据取自`data[1]`。
|
||||
* `radarIndex`: 雷达图所使用的 `radar` 组件的 `index`。
|
||||
* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。
|
||||
* `itemStyle`: 标记样式 [ItemStyle](#ItemStyle)。
|
||||
* `areaStyle`: 区域填充样式 [AreaStyle](#AreaStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Scatter`
|
||||
|
||||
散点图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Scatter`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `clip`: 是否裁剪超出坐标系部分的图形。
|
||||
* `symbol`: 标记的图形 [SerieSymbol](#SerieSymbol)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Heatmap`
|
||||
|
||||
热力图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Scatter`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `ignore`: 是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`: 忽略数据的默认值。默认值默认为`0`,当 `ignore` 为 `true` 才有效。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。
|
||||
|
||||
## `Serie-Gauge`
|
||||
|
||||
仪表盘系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Gauge`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `gaugeType`: 仪表盘类型,支持以下类型:
|
||||
* `Pointer`: 指针类型。
|
||||
* `ProgressBar`: 进度条类型。
|
||||
* `center`: 中心点坐标。当值为0-1的浮点数时表示百分比。
|
||||
* `radius`: 仪表盘半径。
|
||||
* `min`: 最小的数据值。映射到`startAngle`。
|
||||
* `max`: 最大的数据值。映射到`endAngle`。
|
||||
* `startAngle`: 仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。
|
||||
* `endAngle`: 仪表盘结束角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。
|
||||
* `splitNumber`: 仪表盘刻度分割段数。
|
||||
* `roundCap`: 是否启用圆弧效果。
|
||||
* `titleStyle`: 仪表盘标题 [TitleStyle](#TitleStyle)。
|
||||
* `gaugeAxis`: 仪表盘坐标轴 [GaugeAxis](#GaugeAxis)。
|
||||
* `gaugePointer`: 仪表盘指针 [GaugePointer](#GaugePointer)。
|
||||
* `itemStyle`: 仪表盘指针样式 [ItemStyle](#ItemStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。仪表盘的数据一般只有一个,值通过`label`样式显示,`name`通过`titleStyle`样式显示。
|
||||
|
||||
## `Serie-Ring`
|
||||
|
||||
环形图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Ring`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `center`: 中心点坐标。当值为`0-1`的浮点数时表示百分比。
|
||||
* `radius`: 仪表盘半径。
|
||||
* `startAngle`: 仪表盘起始角度。和时钟一样,`12`点钟位置是`0`度,顺时针到`360`度。
|
||||
* `ringGap`: 环形图的环间隙。
|
||||
* `roundCap`: 是否启用圆弧效果。
|
||||
* `clockwise`: 是否顺时针,默认为`true`。
|
||||
* `titleStyle`: 环形图中心标题 [TitleStyle](#TitleStyle)。
|
||||
* `itemStyle`: 环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `emphasis`: 高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。环形图的数据只有二维,`data[0]`表示当前值,`data[1]`表示最大值。
|
||||
|
||||
## `Serie-Liquid`
|
||||
|
||||
水位图系列。
|
||||
|
||||
* `show`: 系列是否显示在图表上。
|
||||
* `type`: `Liquid`。
|
||||
* `name`: 系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `vesselIndex`: 水位图所使用的`vessel`组件的`index`。
|
||||
* `min`: 最小值。
|
||||
* `max`: 最大值。
|
||||
* `waveLength`: 水波长。
|
||||
* `waveHeight`: 水波高。
|
||||
* `waveSpeed`: 水波移动速度。正数时左移,负数时右移。
|
||||
* `waveOffset`: 水波偏移。
|
||||
* `itemStyle`: 环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `label`: 图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。
|
||||
|
||||
## `Serie-Candlestick`
|
||||
|
||||
K线图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Candlestick`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `xAxisIndex`:使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
|
||||
* `yAxisIndex`:使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
|
||||
* `minShow`:系列显示数据的最小索引。
|
||||
* `maxShow`:系列显示数据的最大索引。
|
||||
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制,大于0时超过指定值会移除旧数据再插入新数据。
|
||||
* `clip`:是否裁剪超出坐标系部分的图形。
|
||||
* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
|
||||
* `ignoreValue`:忽略数据的默认值。默认值默认为0,当 `ignore` 为 `true` 才有效。
|
||||
* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
|
||||
* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点:优化后不能自定义设置单个数据项的样式,不能显示Label,折线图不绘制Symbol。
|
||||
* `largeThreshold`:开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
|
||||
* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,K线图至少需要4个维度的数组`[open, close, lowest, highest]`。
|
||||
|
||||
## `Settings`
|
||||
|
||||
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
|
||||
|
||||
* `reversePainter`:Painter是否逆序。逆序时index大的serie最先绘制。
|
||||
* `maxPainter`:默认最大Painter数据,当Serie数量大于maxPainter时会平均分配Painter。
|
||||
* `basePainterMaterial`:Base Pointer 材质球,设置后会影响Axis等。
|
||||
* `seriePainterMaterial`:Serie Pointer 材质球,设置后会影响所有Serie。
|
||||
* `topPainterMaterial`:Top Pointer 材质球,设置后会影响Tooltip等。
|
||||
* `lineSmoothStyle`: 曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。
|
||||
* `lineSmoothness`: 曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `lineSegmentDistance`: 线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。
|
||||
* `cicleSmoothness`: 圆形(包括扇形、环形等)的平滑度。数越小圆越平滑,但顶点数也会随之增加。
|
||||
|
||||
## `SerieAnimation`
|
||||
|
||||
* `enable`: 是否开启动画系统。
|
||||
* ~~`threshold`: 是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。~~
|
||||
* `fadeInDelay`: 设定的渐入动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeInDelay`。
|
||||
* `fadeInDuration`: 设定的渐入动画时长,单位毫秒。如果要设置单个数据项的渐入时长,可以用代码定制: `customFadeInDuration`。
|
||||
* `fadeOutDelay`: 设定的渐出动画延时,单位毫秒。如果要设置单个数据项的延时,可以用代码定制: `customFadeOutDelay`。
|
||||
* `fadeOutDuration`: 设定的渐出动画时长,单位毫秒。如果要设置单个数据项的渐出时长,可以用代码定制: `customFadeOutDuration`。
|
||||
* `dataChangeEnable`: 是否开启数据变更动画。
|
||||
* `dataChangeDuration`: 数据变更动画时长,单位毫秒。
|
||||
|
||||
## `AreaStyle`
|
||||
|
||||
* `show`: 是否显示区域填充。
|
||||
* `origin`: 区域填充的起始位置 `AreaOrigin`。有以下三种填充方式:
|
||||
* `Auto`: 填充坐标轴轴线到数据间的区域。
|
||||
* `Start`: 填充坐标轴底部到数据间的区域。
|
||||
* `End`: 填充坐标轴顶部到数据间的区域。
|
||||
* `color`: 区域填充的颜色,默认取 `serie` 对应的颜色。如果 `toColor` 不是默认值,则表示渐变色的起点颜色。
|
||||
* `toColor`: 区域填充的渐变色的终点颜色。
|
||||
* `highlightColor`: 高亮时区域填充的颜色,默认取 `serie` 对应的颜色。如果 `highlightToColor` 不是默认值,则表示渐变色的起点颜色。
|
||||
* `highlightToColor`: 高亮时区域填充的渐变色的终点颜色。
|
||||
* `opacity`: 图形透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。
|
||||
* `tooltipHighlight`: 鼠标悬浮时是否高亮之前的区域。
|
||||
|
||||
## `AxisLabel`
|
||||
|
||||
* `show`: 是否显示刻度标签。
|
||||
* `interval`: 坐标轴刻度标签的显示间隔,在类目轴中有效。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。
|
||||
* `inside`: 刻度标签是否朝内,默认朝外。
|
||||
* `margin`: 刻度标签与轴线之间的距离。
|
||||
* `formatter`: 图例内容字符串模版格式器。支持用 `\n` 换行。模板变量为图例名称 `{value}`,数值格式化通过`numericFormatter`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。
|
||||
* `showAsPositiveNumber`: 将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。
|
||||
* `onZero`: 刻度标签显示在`0`刻度上。
|
||||
* `width`:刻度标签的宽。当为0时系统自动设置。
|
||||
* `height`:刻度标签的高。当为0时系统自动设置。
|
||||
|
||||
* `textLimit`: 文本自适应 [TextLimit](#TextLimit)。只在类目轴中有效。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `AxisLine`
|
||||
|
||||
* `show`: 是否显示坐标轴轴线。
|
||||
* `onZero`: `X` 轴或者 `Y` 轴的轴线是否在另一个轴的 `0` 刻度上,只有在另一个轴为数值轴且包含 `0` 刻度时有效。
|
||||
* `width`: 坐标轴线线宽。
|
||||
* `symbol`: 是否显示箭头。
|
||||
* `symbolWidth`: 箭头宽。
|
||||
* `symbolHeight`: 箭头高。
|
||||
* `symbolOffset`: 箭头偏移。
|
||||
* `symbolDent`: 箭头的凹陷程度。
|
||||
|
||||
## `AxisName`
|
||||
|
||||
* `show`: 是否显示坐标名称。
|
||||
* `name`: 坐标轴名称。
|
||||
* `location`: 坐标轴名称的位置。支持以下类型:
|
||||
* `Start`: 坐标轴起始处。
|
||||
* `Middle`: 坐标轴中间。
|
||||
* `End`: 坐标轴末端。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `AxisSplitLine`
|
||||
|
||||
* `show`: 是否显示坐标分割线。
|
||||
* `interval`: 分割线的显示间隔。`0` 表示显示所有分割线,`1` 表示隔一个隔显示一个分割线,以此类推。
|
||||
* `lineStyle`: 线条样式 [LineStyle](#LineStyle)。
|
||||
|
||||
## `AxisSplitArea`
|
||||
|
||||
* `show`: 是否显示坐标分割区域。
|
||||
* `color`: 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
|
||||
|
||||
## `AxisTick`
|
||||
|
||||
* `show`: 是否显示坐标轴刻度。
|
||||
* `alignWithLabel`: 类目轴中在 `boundaryGap` 为 `true` 的时候有效,可以保证刻度线和标签对齐。
|
||||
* `inside`: 坐标轴刻度是否朝内,默认朝外。
|
||||
* `length`: 坐标轴刻度的长度。
|
||||
* `width`: 坐标轴刻度的宽度。默认为0时宽度和坐标轴一致。
|
||||
* `showStartTick`:是否显示第一个刻度。
|
||||
* `showEndTick`:是否显示最后一个刻度。
|
||||
|
||||
## `Emphasis`
|
||||
|
||||
* `show`: 是否启用高亮样式。
|
||||
* `label`: 图形文本标签样式 [SerieLabel](#SerieLabel)。
|
||||
* `itemStyle`: 图形样式 [ItemStyle](#ItemStyle)。
|
||||
|
||||
## `ItemStyle`
|
||||
|
||||
* `show`: 是否启用。
|
||||
* `color`: 颜色。对于K线图,对应阳线的颜色。
|
||||
* `color0`: 颜色。对于K线图,对应阴线的颜色。
|
||||
* `toColor`: 渐变颜色1。
|
||||
* `toColor2`: 渐变颜色2。只在折线图中有效。
|
||||
* `backgroundColor`: 背景颜色。
|
||||
* `backgroundWidth`: 背景的宽。
|
||||
* `centerColor`: 中心区域的颜色。如环形图的中心区域。
|
||||
* `centerGap`: 中心区域的间隙。如环形图的中心区域于最内环的间隙。
|
||||
* `borderType`: 边框的类型。
|
||||
* `borderColor`: 边框的颜色。对于K线图,对应阳线的边框颜色。
|
||||
* `borderColor0`: 边框的颜色。对于K线图,对应阴线的边框颜色。
|
||||
* `borderWidth`: 边框宽。
|
||||
* `opacity`: 透明度。
|
||||
* `tooltipFormatter`: 提示框单项的字符串模版格式器。具体配置参考`Tooltip`的`formatter`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。此字段优先于`SerieLabel`和`Tooltip`的`numericFormatter`。
|
||||
* `cornerRadius`: 圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。支持用0-1的浮点数设置百分比。
|
||||
|
||||
## `LineArrow`
|
||||
|
||||
* `show`: 是否显示箭头。
|
||||
* `position`: 箭头显示位置。支持以下两种位置:
|
||||
* `End`: 末端显示。最后一个数据上显示箭头。
|
||||
* `Start`: 起始端显示。第一个数据上显示箭头。
|
||||
* `width`: 箭头宽。
|
||||
* `height`: 箭头长。
|
||||
* `offset`: 箭头偏移。默认箭头的中心点和数据坐标点一致,可通过 `offset` 调整偏移。
|
||||
* `dent`: 箭头的凹度。
|
||||
|
||||
## `LineStyle`
|
||||
|
||||
* `show`: 是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。
|
||||
* `type`: 线条类型。支持以下五种类型:
|
||||
* `None`: 不显示分割线。
|
||||
* `Solid`: 实线。
|
||||
* `Dashed`: 虚线。
|
||||
* `Dotted`: 点线。
|
||||
* `DashDot`: 点划线。
|
||||
* `DashDotDot`: 双点划线。
|
||||
* `color`: 线条颜色。默认和 `serie` 一致。
|
||||
* `toColor`: 线的渐变颜色(需要水平方向渐变时)。
|
||||
* `toColor2`: 线的渐变颜色2(需要水平方向三个渐变色的渐变时)。
|
||||
* `width`: 线条宽。
|
||||
* `opacity`: 线条的透明度。支持从 `0` 到 `1` 的数字,为 `0` 时不绘制该图形。
|
||||
|
||||
## `Location`
|
||||
|
||||
* `align`: 对齐方式。有以下对齐方式。
|
||||
* `TopLeft`: 左上角对齐。
|
||||
* `TopRight`: 右上角对齐。
|
||||
* `TopCenter`: 置顶居中对齐。
|
||||
* `BottomLeft`: 左下对齐。
|
||||
* `BottomRight`: 右下对齐。
|
||||
* `BottomCenter`: 底部居中对齐。
|
||||
* `Center`: 居中对齐。
|
||||
* `CenterLeft`: 中部靠左对齐。
|
||||
* `CenterRight`: 中部靠右对齐。
|
||||
* `left`: 离容器左侧的距离。
|
||||
* `right`: 离容器右侧的距离。
|
||||
* `top`: 离容器上侧的距离。
|
||||
* `bottom`: 离容器下侧的距离。
|
||||
|
||||
## `MarkLine`
|
||||
|
||||
* `show`:是否显示标线。
|
||||
* `animation`:标线的动画样式。
|
||||
* `data`:标线的数据项[MarkLineData](#MarkLineData)列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。
|
||||
|
||||
## `MarkLineData`
|
||||
|
||||
* `name`:标注名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。
|
||||
* `type`:特殊的标注类型,用于标注最大值最小值等。。有以下标注类型:
|
||||
* `None`:无类型。此时通过
|
||||
* `Min`:最小值。`dimension`维度上数据的最小值。
|
||||
* `Max`:最大值。`dimension`维度上数据的最大值。
|
||||
* `Average`:平均值。`dimension`维度上数据的平均值。
|
||||
* `Median`:中位数。`dimension`维度上数据的中位数。
|
||||
* `dimension`:当type为特殊类型时,指示从哪个维度的数据上计算特殊值。
|
||||
* `xPosition`:相对原点的 x 坐标,单位像素。当type为None时有效。
|
||||
* `yPosition`:相对原点的 y 坐标,单位像素。当type为None时有效。
|
||||
* `xValue`:X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。
|
||||
* `yValue`:Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。
|
||||
|
||||
## `SerieData`
|
||||
|
||||
* `name`: 数据项名称。
|
||||
* `selected`: 该数据项是否被选中。
|
||||
* `radius`: 自定义半径。可用在饼图中自定义某个数据项的半径。
|
||||
* `enableIconStyle`: 是否启用单个数据项的图标设置。
|
||||
* `iconStyle`: 数据项图标样式。
|
||||
* `enableLabel`: 是否启用单个数据项的标签设置。
|
||||
* `label`: 单个数据项的标签设置。
|
||||
* `enableItemStyle`: 是否启用单个数据项的样式。
|
||||
* `itemStyle`: 单个数据项的样式设置。
|
||||
* `enableEmphasis`: 是否启用单个数据项的高亮样式。
|
||||
* `emphasis`: 单个数据项的高亮样式设置。
|
||||
* `enableSymbol`: 是否启用单个数据项的标记设置。
|
||||
* `symbol`: 单个数据项的标记设置。
|
||||
* `data`: 可指定任意维数的数值列表。对于折线图和柱状图,`data`其实是`size`为`2`的数组,`data[0]`是x的编号,`data[1]`是`y`的数值,默认显示`data[1]`。其他图表看需求而定是长度大于`2`的数组。可通过`Serie`的`showDataDimension`指定数据长度。
|
||||
|
||||
## `SerieLabel`
|
||||
|
||||
* `show`: 是否显示文本标签。
|
||||
* `position`: 标签的位置。折线图时强制默认为 `Center`,支持以下 `5` 种位置:
|
||||
* `Outside`: 饼图扇区外侧,通过视觉引导线连到相应的扇区。只在饼图种可用。
|
||||
* `Inside`: 饼图扇区内部。只在饼图可用。
|
||||
* `Center`: 在中心位置(折线图,柱状图,饼图)。
|
||||
* `Top`: 顶部(柱状图)。
|
||||
* `Bottom`: 底部(柱状图)。
|
||||
* `formatter`: 标签内容字符串模版格式器。支持用 `\n` 换行。模板变量有: `{a}`: 系列名;`{b}`: 数据名;`{c}`: 数据值;`{d}`: 百分比。示例: `{b}:{c}`。
|
||||
* `numericFormatter`: 标准数字格式字符串。用于将数值格式化显示为字符串。使用`Axx`的形式: `A`是格式说明符的单字符,支持`C`货币、`D`十进制、`E`指数、`F`顶点数、`G`常规、`N`数字、`P`百分比、`R`往返过程、`X`十六进制等九种。`xx`是精度说明,从`0`-`99`。
|
||||
* `offset`: 距离图形元素的偏移。
|
||||
* `autoOffset`: 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。
|
||||
* `backgroundWidth`: 标签的背景宽度。一般不用指定,不指定时则自动是文字的宽度。
|
||||
* `backgroundHeight`: 标签的背景高度。一般不用指定,不指定时则自动是文字的高度。
|
||||
* `paddingLeftRight`: 标签文字和边框的左右边距。
|
||||
* `paddingTopBottom`: 标签文字和边框的上下边距。
|
||||
* `line`: 是否显示视觉引导线。在 `label` 位置 设置为 `'Outside'` 的时候会显示视觉引导线。
|
||||
* `lineType`: 视觉引导线类型。支持以下几种类型:
|
||||
* `BrokenLine`: 折线。
|
||||
* `Curves`: 曲线。
|
||||
* `HorizontalLine`: 水平线。
|
||||
* `lineColor`: 视觉引导线自定义颜色。
|
||||
* `lineWidth`: 视觉引导线的宽度。
|
||||
* `lineLength1`: 视觉引导线第一段的长度。
|
||||
* `lineLength2`: 视觉引导线第二段的长度。
|
||||
* `border`: 是否显示边框。
|
||||
* `borderWidth`: 边框宽度。
|
||||
* `borderColor`: 边框颜色。
|
||||
* `textStyle`: The style of text [TextStyle](#TextStyle).
|
||||
|
||||
## `SerieSymbol`
|
||||
|
||||
* `show`: 是否显示标记。
|
||||
* `type`: 标记类型。支持以下六种类型:
|
||||
* `EmptyCircle`: 空心圆。
|
||||
* `Circle`: 实心圆。
|
||||
* `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。
|
||||
* `Triangle`: 三角形。
|
||||
* `Diamond`: 菱形。
|
||||
* `None`: 不显示标记。
|
||||
* `gap`: 图形标记的外留白距离。
|
||||
* `sizeType`: 标记图形的大小获取方式。支持以下三种类型:
|
||||
* `Custom`: 自定义大小。
|
||||
* `FromData`: 通过 `dataIndex` 从数据中获取,再乘以一个比例系数 `dataScale` 。
|
||||
* `Callback`: 通过回调函数 `sizeCallback` 获取。
|
||||
* `size`: 标记的大小。
|
||||
* `selectedSize`: 被选中的标记的大小。
|
||||
* `dataIndex`: 当 `sizeType` 指定为 `FromData` 时,指定的数据源索引。
|
||||
* `dataScale`: 当 `sizeType` 指定为 `FromData` 时,指定的倍数系数。
|
||||
* `selectedDataScale`: 当 `sizeType` 指定为 `FromData` 时,指定的高亮倍数系数。
|
||||
* `sizeCallback`: 当 `sizeType` 指定为 `Callback` 时,指定的回调函数。
|
||||
* `selectedSizeCallback`: 当 `sizeType` 指定为 `Callback` 时,指定的高亮回调函数。
|
||||
* `color`: 标记图形的颜色,默认和系列一致。
|
||||
* `opacity`: 图形标记的透明度。
|
||||
* `startIndex`: 开始显示图形标记的索引。
|
||||
* `interval`: 显示图形标记的间隔。`0`表示显示所有标签,`1`表示隔一个隔显示一个标签,以此类推。
|
||||
* `forceShowLast`: 是否强制显示最后一个图形标记。默认为 `false`。
|
||||
|
||||
## `IconStyle`
|
||||
|
||||
* `show` : whether to show the icon.
|
||||
* `Layer` : Shows on top or bottom.
|
||||
* `Sprite` : Icon.
|
||||
* `color` : color.
|
||||
* `width` : The width of the icon.
|
||||
* `height` : the height of the icon.
|
||||
* `Offset` : Offset.
|
||||
|
||||
[返回首页](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XChartsAPI接口](XChartsAPI.md)
|
||||
[XCharts问答](XCharts问答.md)
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fa7a80a30cd846139159beaadba05f2
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +1,8 @@
|
||||
# XCharts FAQ
|
||||
# XCharts Q&A
|
||||
|
||||
[XCharts Homepage](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts API](XChartsAPI-EN.md)<br/>
|
||||
[XCharts Configuration](XChartsConfiguration-EN.md)
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Configuration](xcharts-configuration-EN.md)
|
||||
|
||||
[QA 1: How to adjust the margin between the axis and the background?](#How-to-adjust-the-margin-between-the-axis-and-the=-background)
|
||||
[QA 2: How to play agian the fadeIn animation?](#How-to-play-agian-the-fadeIn-animation)
|
||||
@@ -32,6 +32,7 @@
|
||||
[QA 26: How do I use the background component? What are the conditions?](#How-do-I-use-the-background-component-What-are-the-conditions)
|
||||
[QA 27: Mesh can not have more than 65000 vertices?](#Mesh-cannot-have-more-than-65000-vertices)
|
||||
[QA 28: Why are the parameters set in Serie reset after they run?](#Why-are-the-parameters-set-in-Serie-reset-after-they-run)
|
||||
[QA 29: Why are many custom colors lost after upgrading to 1.6.0? How should I upgrade?](#Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade)
|
||||
|
||||
## How-to-adjust-the-margin-between-the-axis-and-the=-background
|
||||
|
||||
@@ -145,6 +146,16 @@ A: This is the limit of `UGUI` on the number of vertices for a single `Graphic`.
|
||||
|
||||
A: Check whether `RemoveData()` and add new `Serie` in the code. If you want to keep the configuration of `Serie`, you can only `ClearData()` which just clear data and then readd the data to the old serie.
|
||||
|
||||
[XCharts Homepage](https://github.com/XCharts-Team/XCharts)<br/>
|
||||
[XCharts API](XChartsAPI-EN.md)<br/>
|
||||
[XCharts Configuration](XChartsConfiguration-EN.md)
|
||||
## Why_are_many_custom_colors_lost_after_upgrading_to_1_6_0_How_should_I_upgrade
|
||||
|
||||
A: In version `1.6.0`, in order to reduce implicit conversion, all drawing related `Color` was changed to `Color32`, so some custom colors were lost. The main components affected are: `ItemStyle`, `LineStyle`, `AreaStyle`, `Vessel`, `VisualMap`, `AxisSplitArea`, `AxisSplitLine`, `GaugeAxis`,`SerieLabel`, etc. Can use the script [UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) to upgrade.
|
||||
The upgrade steps are as follows:
|
||||
1. Back up the project.
|
||||
2. Download or copy the script [UpgradeChartColor.cs](https://github.com/monitor1394/unity-ugui-XCharts/blob/2.0/Assets/XCharts/Editor/Tools/UpgradeChartColor.cs) in the old project `Editor`, Change the `color` field inside to `color.clear` (because some fields may not exist in the old version).
|
||||
3. After compilation, the old version of color configuration file is exported through `menu bar -> XCharts-> ExportColorConfig` (the configuration file is saved by default to `color.config` under `Assets`).
|
||||
4. Upgrade `XCharts` to the latest version.
|
||||
5. The custom color can be restored by importing `color.config` through `menu bar -> XCharts-> ImportColorConfig` (if `color.config` is not under `Assets` of the upgraded project, copy it to this directory).
|
||||
|
||||
[XCharts Homepage](https://github.com/monitor1394/unity-ugui-XCharts)
|
||||
[XCharts API](xcharts-api-EN.md)
|
||||
[XCharts Configuration](xcharts-configuration-EN.md)
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca54a17a3a60f4b36b0be43df9f1c33d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
35
Assets/XCharts/Editor/BarChartEditor.cs
Normal file
35
Assets/XCharts/Editor/BarChartEditor.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BarChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(BarChart), false)]
|
||||
public class BarChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (BarChart)target;
|
||||
}
|
||||
|
||||
protected override void OnEndInspectorGUI()
|
||||
{
|
||||
base.OnEndInspectorGUI();
|
||||
if (m_Chart == null && target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d485d6a729a1449cdb5032f380fba70f
|
||||
guid: 5acea6fd06c0e9c498c434f941e4cba9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
341
Assets/XCharts/Editor/BaseChartEditor.cs
Normal file
341
Assets/XCharts/Editor/BaseChartEditor.cs
Normal file
@@ -0,0 +1,341 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Text;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BaseChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(BaseChart), false)]
|
||||
public class BaseChartEditor : Editor
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
private const float k_IconWidth = 14;
|
||||
private const float k_IconGap = 0f;
|
||||
private const float k_IconXOffset = 10f;
|
||||
private const float k_IconYOffset = -1.5f;
|
||||
#else
|
||||
private const float k_IconWidth = 14;
|
||||
private const float k_IconGap = 0f;
|
||||
private const float k_IconXOffset = 4f;
|
||||
private const float k_IconYOffset = -3f;
|
||||
#endif
|
||||
|
||||
protected BaseChart m_Chart;
|
||||
protected SerializedProperty m_Script;
|
||||
protected SerializedProperty m_MultiComponentMode;
|
||||
protected SerializedProperty m_EnableTextMeshPro;
|
||||
protected SerializedProperty m_ChartWidth;
|
||||
protected SerializedProperty m_ChartHeight;
|
||||
protected SerializedProperty m_Settings;
|
||||
protected SerializedProperty m_Theme;
|
||||
protected SerializedProperty m_Background;
|
||||
protected SerializedProperty m_Titles;
|
||||
protected SerializedProperty m_Legends;
|
||||
protected SerializedProperty m_Tooltips;
|
||||
protected SerializedProperty m_Vessels;
|
||||
protected SerializedProperty m_Radars;
|
||||
protected SerializedProperty m_Series;
|
||||
protected SerializedProperty m_Large;
|
||||
protected SerializedProperty m_ChartName;
|
||||
protected SerializedProperty m_DebugMode;
|
||||
|
||||
protected float m_DefaultLabelWidth;
|
||||
protected float m_DefaultFieldWidth;
|
||||
private int m_SeriesSize;
|
||||
private Vector2 scrollPos;
|
||||
private bool m_CheckWarning = false;
|
||||
private StringBuilder sb = new StringBuilder();
|
||||
|
||||
private bool m_BaseFoldout;
|
||||
private bool m_CustomFoldout;
|
||||
protected bool m_ShowAllComponent;
|
||||
protected Dictionary<string, bool> m_Flodouts = new Dictionary<string, bool>();
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
if (target == null) return;
|
||||
m_Chart = (BaseChart)target;
|
||||
m_Script = serializedObject.FindProperty("m_Script");
|
||||
m_MultiComponentMode = serializedObject.FindProperty("m_MultiComponentMode");
|
||||
m_EnableTextMeshPro = serializedObject.FindProperty("m_EnableTextMeshPro");
|
||||
m_ChartName = serializedObject.FindProperty("m_ChartName");
|
||||
m_ChartWidth = serializedObject.FindProperty("m_ChartWidth");
|
||||
m_ChartHeight = serializedObject.FindProperty("m_ChartHeight");
|
||||
m_Theme = serializedObject.FindProperty("m_Theme");
|
||||
m_Settings = serializedObject.FindProperty("m_Settings");
|
||||
m_Background = serializedObject.FindProperty("m_Background");
|
||||
m_Titles = serializedObject.FindProperty("m_Titles");
|
||||
m_Legends = serializedObject.FindProperty("m_Legends");
|
||||
m_Tooltips = serializedObject.FindProperty("m_Tooltips");
|
||||
m_Vessels = serializedObject.FindProperty("m_Vessels");
|
||||
m_Series = serializedObject.FindProperty("m_Series");
|
||||
m_Radars = serializedObject.FindProperty("m_Radars");
|
||||
|
||||
m_Large = serializedObject.FindProperty("m_Large");
|
||||
m_DebugMode = serializedObject.FindProperty("m_DebugMode");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (m_Chart == null && target == null)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
serializedObject.Update();
|
||||
m_DefaultLabelWidth = EditorGUIUtility.labelWidth;
|
||||
m_DefaultFieldWidth = EditorGUIUtility.fieldWidth;
|
||||
|
||||
OnStartInspectorGUI();
|
||||
OnMiddleInspectorGUI();
|
||||
OnEndInspectorGUI();
|
||||
OnDebugInspectorGUI();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
protected virtual void OnStartInspectorGUI()
|
||||
{
|
||||
BlockStart();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
var version = string.Format("v{0}_{1}", XChartsMgr.version, XChartsMgr.versionDate);
|
||||
if (m_EnableTextMeshPro.boolValue)
|
||||
{
|
||||
version += " TMP";
|
||||
}
|
||||
EditorGUILayout.LabelField(version);
|
||||
|
||||
if (GUILayout.Button("Github"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
BlockEnd();
|
||||
|
||||
BlockStart();
|
||||
m_BaseFoldout = EditorGUILayout.Foldout(m_BaseFoldout, "Base", true);
|
||||
if (m_BaseFoldout)
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_Script);
|
||||
EditorGUILayout.PropertyField(m_ChartName);
|
||||
var fileds = m_Chart.GetCustomChartInspectorShowFileds();
|
||||
if (fileds != null && fileds.Length > 0)
|
||||
{
|
||||
foreach (var filed in fileds)
|
||||
{
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty(filed));
|
||||
}
|
||||
}
|
||||
if (XChartsMgr.Instance.IsRepeatChartName(m_Chart, m_ChartName.stringValue))
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.HelpBox("chart name is repeated:" + m_ChartName.stringValue, MessageType.Error);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
BlockEnd();
|
||||
|
||||
BlockField(m_Theme);
|
||||
BlockField(m_Settings);
|
||||
BlockField(m_Background);
|
||||
|
||||
m_ShowAllComponent = m_MultiComponentMode.boolValue;
|
||||
BlockListField(m_ShowAllComponent, m_Titles);
|
||||
BlockListField(m_ShowAllComponent, m_Legends);
|
||||
BlockListField(m_ShowAllComponent, m_Tooltips);
|
||||
BlockListField(m_ShowAllComponent, SerieType.Liquid, m_Vessels);
|
||||
BlockListField(m_ShowAllComponent, SerieType.Radar, m_Radars);
|
||||
}
|
||||
|
||||
protected virtual void OnMiddleInspectorGUI()
|
||||
{
|
||||
BlockField(m_Series);
|
||||
}
|
||||
|
||||
protected virtual void OnEndInspectorGUI()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnDebugInspectorGUI()
|
||||
{
|
||||
BlockStart();
|
||||
EditorGUILayout.PropertyField(m_DebugMode);
|
||||
EditorGUILayout.PropertyField(m_MultiComponentMode);
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.Space();
|
||||
MoreDebugInspector();
|
||||
CheckWarning();
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected virtual void MoreDebugInspector()
|
||||
{
|
||||
}
|
||||
|
||||
protected void BlockStart()
|
||||
{
|
||||
if (XChartsSettings.editorBlockEnable) EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
}
|
||||
|
||||
protected void BlockEnd()
|
||||
{
|
||||
if (XChartsSettings.editorBlockEnable) EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
protected void BlockField(params SerializedProperty[] props)
|
||||
{
|
||||
if (props.Length == 0) return;
|
||||
BlockStart();
|
||||
foreach (var prop in props)
|
||||
EditorGUILayout.PropertyField(prop, true);
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected void BlockListField(bool all, params SerializedProperty[] props)
|
||||
{
|
||||
if (props.Length == 0) return;
|
||||
BlockStart();
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (all)
|
||||
{
|
||||
var flag = m_Flodouts.ContainsKey(prop.displayName) && m_Flodouts[prop.displayName];
|
||||
m_Flodouts[prop.displayName] = EditorGUILayout.Foldout(flag, prop.displayName, true);
|
||||
if (m_Flodouts[prop.displayName])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
var currRect = EditorGUILayout.GetControlRect(GUILayout.Height(0));
|
||||
currRect.y -= EditorGUIUtility.singleLineHeight;
|
||||
var rect1 = new Rect(currRect.width + k_IconXOffset,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconAdd, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
prop.InsertArrayElementAtIndex(prop.arraySize > 0 ? prop.arraySize - 1 : 0);
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
for (int i = 0; i < prop.arraySize; i++)
|
||||
{
|
||||
EditorGUILayout.PropertyField(prop.GetArrayElementAtIndex(i), true);
|
||||
currRect = EditorGUILayout.GetControlRect(GUILayout.Height(0));
|
||||
currRect.y -= EditorGUI.GetPropertyHeight(prop.GetArrayElementAtIndex(i));
|
||||
rect1 = new Rect(currRect.width + k_IconXOffset,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
var oldColor = GUI.contentColor;
|
||||
GUI.contentColor = Color.black;
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconRemove, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (prop.arraySize == 1)
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Delete component", "Confirm to delete last component?", "Sure", "Cancel"))
|
||||
{
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
prop.DeleteArrayElementAtIndex(i);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
}
|
||||
else if (i < prop.arraySize && i >= 0)
|
||||
{
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
prop.DeleteArrayElementAtIndex(i);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
chart.RemoveChartObject();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
}
|
||||
var rect2 = new Rect(currRect.width + k_IconXOffset - k_IconWidth - k_IconGap,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect2, ChartEditorHelper.Styles.iconDown, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (i < prop.arraySize - 1) prop.MoveArrayElement(i, i + 1);
|
||||
}
|
||||
var rect3 = new Rect(currRect.width + k_IconXOffset - 2 * (k_IconWidth + k_IconGap),
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(rect3, ChartEditorHelper.Styles.iconUp, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
if (i > 0) prop.MoveArrayElement(i, i - 1);
|
||||
}
|
||||
GUI.contentColor = oldColor;
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
else if (prop.arraySize > 0) EditorGUILayout.PropertyField(prop.GetArrayElementAtIndex(0), true);
|
||||
}
|
||||
BlockEnd();
|
||||
}
|
||||
|
||||
protected void BlockListField(bool all, SerieType serieType, params SerializedProperty[] props)
|
||||
{
|
||||
if (!m_Chart.ContainsSerie(serieType)) return;
|
||||
BlockListField(all, props);
|
||||
}
|
||||
|
||||
private void CheckWarning()
|
||||
{
|
||||
if (GUILayout.Button("Remove All Chart Object"))
|
||||
{
|
||||
m_Chart.RemoveChartObject();
|
||||
}
|
||||
// if (GUILayout.Button("Check XCharts Update"))
|
||||
// {
|
||||
// CheckVersionEditor.ShowWindow();
|
||||
// }
|
||||
if (m_CheckWarning)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Check Warning"))
|
||||
{
|
||||
m_CheckWarning = true;
|
||||
m_Chart.CheckWarning();
|
||||
}
|
||||
if (GUILayout.Button("Hide Warning"))
|
||||
{
|
||||
m_CheckWarning = false;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
sb.Length = 0;
|
||||
sb.AppendFormat("v{0}", XChartsMgr.fullVersion);
|
||||
if (!string.IsNullOrEmpty(m_Chart.warningInfo))
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append(m_Chart.warningInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append("Perfect! No warning!");
|
||||
}
|
||||
EditorGUILayout.HelpBox(sb.ToString(), MessageType.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GUILayout.Button("Check warning"))
|
||||
{
|
||||
m_CheckWarning = true;
|
||||
m_Chart.CheckWarning();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Assets/XCharts/Editor/CandlestickChartEditor.cs
Normal file
25
Assets/XCharts/Editor/CandlestickChartEditor.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI CandlestickChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(CandlestickChart), false)]
|
||||
public class CandlestickChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (CandlestickChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f433acf13ec404a6d91eb78352d18d4d
|
||||
guid: 1bc2ab7ace40d480e839052673b65a5d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
63
Assets/XCharts/Editor/CoordinateChartEditor.cs
Normal file
63
Assets/XCharts/Editor/CoordinateChartEditor.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI CoordinateChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(CoordinateChart), false)]
|
||||
public class CoordinateChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Grids;
|
||||
protected SerializedProperty m_MultipleXAxis;
|
||||
protected SerializedProperty m_XAxes;
|
||||
protected SerializedProperty m_MultipleYAxis;
|
||||
protected SerializedProperty m_YAxes;
|
||||
protected SerializedProperty m_DataZooms;
|
||||
protected SerializedProperty m_VisualMaps;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (CoordinateChart)target;
|
||||
m_Grids = serializedObject.FindProperty("m_Grids");
|
||||
m_XAxes = serializedObject.FindProperty("m_XAxes");
|
||||
m_YAxes = serializedObject.FindProperty("m_YAxes");
|
||||
m_DataZooms = serializedObject.FindProperty("m_DataZooms");
|
||||
m_VisualMaps = serializedObject.FindProperty("m_VisualMaps");
|
||||
}
|
||||
|
||||
protected override void OnStartInspectorGUI()
|
||||
{
|
||||
base.OnStartInspectorGUI();
|
||||
BlockListField(m_ShowAllComponent, m_DataZooms);
|
||||
BlockListField(m_ShowAllComponent, m_VisualMaps);
|
||||
BlockListField(m_ShowAllComponent, m_Grids);
|
||||
BlockListField(m_ShowAllComponent, m_XAxes);
|
||||
BlockListField(m_ShowAllComponent, m_YAxes);
|
||||
}
|
||||
|
||||
protected override void MoreDebugInspector()
|
||||
{
|
||||
base.MoreDebugInspector();
|
||||
CovertXYAxis();
|
||||
}
|
||||
|
||||
private void CovertXYAxis()
|
||||
{
|
||||
if (GUILayout.Button("Covert XY Axis"))
|
||||
{
|
||||
(m_Chart as CoordinateChart).CovertXYAxis(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcdc7a72224af419d96584fa40f822c9
|
||||
guid: 1dd7acd8b13f3f14e9891af4e8dd0b0b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
25
Assets/XCharts/Editor/GaugeChartEditor.cs
Normal file
25
Assets/XCharts/Editor/GaugeChartEditor.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI GaugeChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(GaugeChart), false)]
|
||||
public class GaugeChartEditor : BaseChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (GaugeChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d74ed458b24774b129611ed816b6b6cd
|
||||
guid: bd96c5068df484d1c95748a85d8380a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
25
Assets/XCharts/Editor/HeatmapChartEditor.cs
Normal file
25
Assets/XCharts/Editor/HeatmapChartEditor.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI HeatmapChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(HeatmapChart), false)]
|
||||
public class HeatmapChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (HeatmapChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/HeatmapChartEditor.cs.meta
Normal file
11
Assets/XCharts/Editor/HeatmapChartEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1144057dfc00f4572913a63ba5291dd7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/XCharts/Editor/LineChartEditor.cs
Normal file
25
Assets/XCharts/Editor/LineChartEditor.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI LineChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(LineChart), false)]
|
||||
public class LineChartEditor : CoordinateChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (LineChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/LineChartEditor.cs.meta
Normal file
11
Assets/XCharts/Editor/LineChartEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bd1a238bc5b407408b8f902aa3db9fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Assets/XCharts/Editor/LiquidChartEditor.cs
Normal file
20
Assets/XCharts/Editor/LiquidChartEditor.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
/******************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/******************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI LiquidChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(LiquidChart), false)]
|
||||
public class LiquidChartEditor : BaseChartEditor
|
||||
{
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/LiquidChartEditor.cs.meta
Normal file
11
Assets/XCharts/Editor/LiquidChartEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 307a1578a6be1403c98fdc27d99d1808
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/XCharts/Editor/PieChartEditor.cs
Normal file
25
Assets/XCharts/Editor/PieChartEditor.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI PieChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(PieChart), false)]
|
||||
public class PieChartEditor : BaseChartEditor
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (PieChart)target;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PieChartEditor.cs.meta
Normal file
11
Assets/XCharts/Editor/PieChartEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28de30021bed0f945af09633584fcb44
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
41
Assets/XCharts/Editor/PolarChartEditor.cs
Normal file
41
Assets/XCharts/Editor/PolarChartEditor.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI PolarChart.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(PolarChart), false)]
|
||||
public class PolarChartEditor : BaseChartEditor
|
||||
{
|
||||
protected SerializedProperty m_Polars;
|
||||
protected SerializedProperty m_RadiusAxes;
|
||||
protected SerializedProperty m_AngleAxes;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if(target == null) return;
|
||||
m_Chart = (PolarChart)target;
|
||||
m_Polars = serializedObject.FindProperty("m_Polars");
|
||||
m_RadiusAxes = serializedObject.FindProperty("m_RadiusAxes");
|
||||
m_AngleAxes = serializedObject.FindProperty("m_AngleAxes");
|
||||
}
|
||||
|
||||
protected override void OnStartInspectorGUI()
|
||||
{
|
||||
base.OnStartInspectorGUI();
|
||||
var showAll = m_MultiComponentMode.boolValue;
|
||||
BlockListField(showAll, m_Polars);
|
||||
BlockListField(showAll, m_RadiusAxes);
|
||||
BlockListField(showAll, m_AngleAxes);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PolarChartEditor.cs.meta
Normal file
11
Assets/XCharts/Editor/PolarChartEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 157ef5f1d75e04aa1814e0b188591912
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7861b681552cf4bc9b2c2f16d25c628c
|
||||
guid: 0ad1e8940e4805b49a18ea7a2cbd4bce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
36
Assets/XCharts/Editor/PropertyDrawers/AnimationDrawer.cs
Normal file
36
Assets/XCharts/Editor/PropertyDrawers/AnimationDrawer.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieAnimation), true)]
|
||||
public class AnimationDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Animation"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_FadeInDuration");
|
||||
PropertyField(prop, "m_FadeInDelay");
|
||||
PropertyField(prop, "m_FadeOutDuration");
|
||||
PropertyField(prop, "m_FadeOutDelay");
|
||||
PropertyField(prop, "m_DataChangeEnable");
|
||||
PropertyField(prop, "m_DataChangeDuration");
|
||||
PropertyField(prop, "m_ActualDuration");
|
||||
PropertyField(prop, "m_AlongWithLinePath");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AreaStyle), true)]
|
||||
public class AreaStyleDrawer : BasePropertyDrawer
|
||||
@@ -11,15 +17,16 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Origin");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_ToColor");
|
||||
PropertyField(prop, "m_HighlightColor");
|
||||
PropertyField(prop, "m_HighlightToColor");
|
||||
PropertyField(prop, "m_Opacity");
|
||||
PropertyField(prop, "m_ToTop");
|
||||
PropertyField(prop, "m_InnerFill");
|
||||
PropertyField(prop, "m_TooltipHighlight");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
194
Assets/XCharts/Editor/PropertyDrawers/AxisDrawer.cs
Normal file
194
Assets/XCharts/Editor/PropertyDrawers/AxisDrawer.cs
Normal file
@@ -0,0 +1,194 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Axis), true)]
|
||||
public class AxisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Axis"; } }
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_LogBase = prop.FindPropertyRelative("m_LogBase");
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
Axis.AxisType type = (Axis.AxisType)m_Type.enumValueIndex;
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
var isPolar = chart is PolarChart;
|
||||
EditorGUI.indentLevel++;
|
||||
PropertyField(prop, isPolar ? "m_PolarIndex" : "m_GridIndex");
|
||||
PropertyField(prop, "m_Type");
|
||||
if (type == Axis.AxisType.Time)
|
||||
{
|
||||
var chartTypeName = prop.serializedObject.targetObject.GetType().Name;
|
||||
if (!chartTypeName.Equals("GanttChart"))
|
||||
EditorGUILayout.HelpBox("The Time axis is currently only supported in GanttChart.", MessageType.Warning);
|
||||
}
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
if (type == Axis.AxisType.Log)
|
||||
{
|
||||
PropertyField(prop, "m_LogBaseE");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
PropertyField(prop, "m_LogBase");
|
||||
if (m_LogBase.floatValue <= 0 || m_LogBase.floatValue == 1)
|
||||
{
|
||||
m_LogBase.floatValue = 10;
|
||||
}
|
||||
EditorGUI.EndChangeCheck();
|
||||
}
|
||||
if (type == Axis.AxisType.Value || type == Axis.AxisType.Time)
|
||||
{
|
||||
PropertyField(prop, "m_MinMaxType");
|
||||
Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType)m_MinMaxType.enumValueIndex;
|
||||
switch (minMaxType)
|
||||
{
|
||||
case Axis.AxisMinMaxType.Default:
|
||||
break;
|
||||
case Axis.AxisMinMaxType.MinMax:
|
||||
break;
|
||||
case Axis.AxisMinMaxType.Custom:
|
||||
EditorGUI.indentLevel++;
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
EditorGUI.indentLevel--;
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_CeilRate");
|
||||
if (type == Axis.AxisType.Value)
|
||||
{
|
||||
PropertyField(prop, "m_Inverse");
|
||||
}
|
||||
}
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
PropertyField(prop, "m_InsertDataToHead");
|
||||
PropertyField(prop, "m_MaxCache");
|
||||
PropertyField(prop, "m_BoundaryGap");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_Interval");
|
||||
}
|
||||
DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_AxisName");
|
||||
PropertyField(prop, "m_AxisTick");
|
||||
PropertyField(prop, "m_AxisLabel");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_SplitArea");
|
||||
PropertyField(prop, "m_IconStyle");
|
||||
PropertyListField(prop, "m_Icons", true);
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
PropertyListField(prop, "m_Data", true);
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(XAxis), true)]
|
||||
public class XAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "XAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(YAxis), true)]
|
||||
public class YAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "YAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AngleAxis), true)]
|
||||
public class AngleAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AngleAxis"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_Clockwise");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(RadiusAxis), true)]
|
||||
public class RadiusAxisDrawer : AxisDrawer
|
||||
{
|
||||
public override string ClassName { get { return "RadiusAxis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisLabel), true)]
|
||||
public class AxisLabelDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AxisLabel"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_OnZero");
|
||||
PropertyField(prop, "m_ShowStartLabel");
|
||||
PropertyField(prop, "m_ShowEndLabel");
|
||||
PropertyField(prop, "m_TextLimit");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisName), true)]
|
||||
public class AxisNameDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "AxisName"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisSplitArea), true)]
|
||||
public class AxisSplitAreaDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "SplitArea"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Color");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/AxisDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/AxisDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0544f1db7f17644bb3cbe7c85da84d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
Assets/XCharts/Editor/PropertyDrawers/BackgroundDrawer.cs
Normal file
31
Assets/XCharts/Editor/PropertyDrawers/BackgroundDrawer.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Background), true)]
|
||||
public class BackgroundDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Background"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Image");
|
||||
PropertyField(prop, "m_ImageType");
|
||||
PropertyField(prop, "m_ImageColor");
|
||||
PropertyField(prop, "m_HideThemeBackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24e3f8609cdf9494cb350a110566176f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +1,17 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
public delegate void DelegateMenuAction(Vector2 postion);
|
||||
[CustomPropertyDrawer(typeof(Settings), true)]
|
||||
public class BasePropertyDrawer : PropertyDrawer
|
||||
{
|
||||
protected int m_Index;
|
||||
@@ -73,14 +80,6 @@ namespace XCharts.Editor
|
||||
return prop.propertyPath + "_" + index;
|
||||
}
|
||||
|
||||
protected void AddHelpBox(string message, MessageType type = MessageType.Warning, int line = 2)
|
||||
{
|
||||
var offset = EditorGUI.indentLevel * ChartEditorHelper.INDENT_WIDTH;
|
||||
EditorGUI.HelpBox(new Rect(m_DrawRect.x + offset, m_DrawRect.y, m_DrawRect.width - offset, EditorGUIUtility.singleLineHeight * line), message, type);
|
||||
for (int i = 0; i < line; i++)
|
||||
AddSingleLineHeight();
|
||||
}
|
||||
|
||||
protected void AddSingleLineHeight()
|
||||
{
|
||||
m_Heights[m_KeyName] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
@@ -100,7 +99,7 @@ namespace XCharts.Editor
|
||||
var toggleKeyName = m_KeyName + relativePropName;
|
||||
m_DataToggles[toggleKeyName] = ChartEditorHelper.MakeListWithFoldout(ref m_DrawRect, ref height,
|
||||
prop.FindPropertyRelative(relativePropName),
|
||||
m_DataToggles.ContainsKey(toggleKeyName) && m_DataToggles[toggleKeyName], showOrder, true);
|
||||
m_DataToggles.ContainsKey(toggleKeyName) && m_DataToggles[toggleKeyName], showOrder);
|
||||
m_Heights[m_KeyName] = height;
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
if (IngorePropertys.Contains(relativePropName)) return;
|
||||
if (!ChartEditorHelper.PropertyFieldWithMinValue(ref m_DrawRect, m_Heights, m_KeyName, prop,
|
||||
relativePropName, minValue))
|
||||
relativePropName, minValue))
|
||||
{
|
||||
Debug.LogError("PropertyField ERROR:" + prop.displayName + ", " + relativePropName);
|
||||
}
|
||||
@@ -126,7 +125,7 @@ namespace XCharts.Editor
|
||||
{
|
||||
if (IngorePropertys.Contains(relativePropName)) return;
|
||||
if (!ChartEditorHelper.PropertyFieldWithMaxValue(ref m_DrawRect, m_Heights, m_KeyName, prop,
|
||||
relativePropName, maxValue))
|
||||
relativePropName, maxValue))
|
||||
{
|
||||
Debug.LogError("PropertyField ERROR:" + prop.displayName + ", " + relativePropName);
|
||||
}
|
||||
@@ -169,41 +168,11 @@ namespace XCharts.Editor
|
||||
m_DisplayName, relativeProp);
|
||||
}
|
||||
}
|
||||
protected bool MakeComponentFoldout(SerializedProperty prop, string relativePropName, bool relativePropEnable,
|
||||
params HeaderMenuInfo[] menus)
|
||||
{
|
||||
if (string.IsNullOrEmpty(relativePropName))
|
||||
{
|
||||
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
|
||||
m_DisplayName, null, null, relativePropEnable, menus);
|
||||
}
|
||||
else
|
||||
{
|
||||
var relativeProp = prop.FindPropertyRelative(relativePropName);
|
||||
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
|
||||
m_DisplayName, relativeProp, null, relativePropEnable, menus);
|
||||
}
|
||||
}
|
||||
|
||||
protected bool MakeComponentFoldout(SerializedProperty prop, string relativePropName, string relativePropName2,
|
||||
bool relativePropEnable, params HeaderMenuInfo[] menus)
|
||||
protected virtual void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
if (string.IsNullOrEmpty(relativePropName))
|
||||
{
|
||||
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
|
||||
m_DisplayName, null, null, relativePropEnable, menus);
|
||||
}
|
||||
else
|
||||
{
|
||||
var relativeProp = prop.FindPropertyRelative(relativePropName);
|
||||
var relativeProp2 = prop.FindPropertyRelative(relativePropName2);
|
||||
return ChartEditorHelper.MakeComponentFoldout(ref m_DrawRect, m_Heights, m_PropToggles, m_KeyName,
|
||||
m_DisplayName, relativeProp, relativeProp2, relativePropEnable, menus);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void DrawExtendeds(SerializedProperty prop) { }
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
var key = GetKeyName(prop);
|
||||
@@ -1,12 +1,18 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if dUI_TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ComponentTheme), true)]
|
||||
public class ComponentThemeDrawer : BasePropertyDrawer
|
||||
@@ -15,7 +21,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
#if dUI_TextMeshPro
|
||||
@@ -25,6 +31,7 @@ namespace XCharts.Editor
|
||||
#endif
|
||||
PropertyField(prop, "m_FontSize");
|
||||
PropertyField(prop, "m_TextColor");
|
||||
//PropertyField(prop, "m_TextBackgroundColor");
|
||||
DrawExtendeds(prop);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
@@ -58,7 +65,6 @@ namespace XCharts.Editor
|
||||
{
|
||||
public override string ClassName { get { return "Axis"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(RadiusAxisTheme), true)]
|
||||
public class RadiusAxisThemeDrawer : BaseAxisThemeDrawer
|
||||
{
|
||||
@@ -67,15 +73,35 @@ namespace XCharts.Editor
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string>
|
||||
{
|
||||
"m_TextBackgroundColor",
|
||||
return new List<string> {
|
||||
"m_TextBackgroundColor" ,
|
||||
"m_LineLength",
|
||||
"m_SplitLineLength",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
[CustomPropertyDrawer(typeof(GaugeAxisTheme), true)]
|
||||
public class GaugeAxisThemeDrawer : AxisThemeDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Axis"; } }
|
||||
public override List<string> IngorePropertys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string> {
|
||||
"m_TextBackgroundColor" ,
|
||||
"m_LineLength",
|
||||
};
|
||||
}
|
||||
}
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_BarBackgroundColor");
|
||||
PropertyField(prop, "m_StageColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(DataZoomTheme), true)]
|
||||
public class DataZoomThemeDrawer : ComponentThemeDrawer
|
||||
@@ -142,12 +168,16 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_LineWidth");
|
||||
PropertyField(prop, "m_LineSymbolSize");
|
||||
PropertyField(prop, "m_LineSymbolSelectedSize");
|
||||
PropertyField(prop, "m_ScatterSymbolSize");
|
||||
PropertyField(prop, "m_ScatterSymbolSelectedSize");
|
||||
PropertyField(prop, "m_PieTooltipExtraRadius");
|
||||
PropertyField(prop, "m_PieSelectedOffset");
|
||||
PropertyField(prop, "m_CandlestickColor");
|
||||
PropertyField(prop, "m_CandlestickColor0");
|
||||
PropertyField(prop, "m_CandlestickBorderColor");
|
||||
72
Assets/XCharts/Editor/PropertyDrawers/DataZoomDrawer.cs
Normal file
72
Assets/XCharts/Editor/PropertyDrawers/DataZoomDrawer.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DataZoom), true)]
|
||||
public class DataZoomDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "DataZoom"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
var m_SupportInside = prop.FindPropertyRelative("m_SupportInside");
|
||||
var m_SupportSlider = prop.FindPropertyRelative("m_SupportSlider");
|
||||
var m_Start = prop.FindPropertyRelative("m_Start");
|
||||
var m_End = prop.FindPropertyRelative("m_End");
|
||||
var m_MinShowNum = prop.FindPropertyRelative("m_MinShowNum");
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Orient");
|
||||
PropertyField(prop, "m_SupportInside");
|
||||
if (m_SupportInside.boolValue)
|
||||
{
|
||||
PropertyField(prop, "m_SupportInsideScroll");
|
||||
PropertyField(prop, "m_SupportInsideDrag");
|
||||
}
|
||||
PropertyField(prop, m_SupportSlider);
|
||||
PropertyField(prop, "m_ZoomLock");
|
||||
PropertyField(prop, "m_ScrollSensitivity");
|
||||
PropertyField(prop, "m_RangeMode");
|
||||
PropertyField(prop, m_Start);
|
||||
PropertyField(prop, m_End);
|
||||
PropertyField(prop, m_MinShowNum);
|
||||
if (m_Start.floatValue < 0) m_Start.floatValue = 0;
|
||||
if (m_End.floatValue > 100) m_End.floatValue = 100;
|
||||
if (m_MinShowNum.intValue < 0) m_MinShowNum.intValue = 0;
|
||||
if (m_SupportSlider.boolValue)
|
||||
{
|
||||
PropertyField(prop, "m_ShowDataShadow");
|
||||
PropertyField(prop, "m_ShowDetail");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_FillerColor");
|
||||
PropertyField(prop, "m_Left");
|
||||
PropertyField(prop, "m_Right");
|
||||
PropertyField(prop, "m_Top");
|
||||
PropertyField(prop, "m_Bottom");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
PropertyListField(prop, "m_XAxisIndexs", true);
|
||||
PropertyListField(prop, "m_YAxisIndexs", true);
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyListField(prop, "m_XAxisIndexs", true);
|
||||
PropertyListField(prop, "m_YAxisIndexs", true);
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/DataZoomDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/DataZoomDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cba26e421f79077499f05aaf10d06b4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/XCharts/Editor/PropertyDrawers/EmphasisStyleDrawer.cs
Normal file
30
Assets/XCharts/Editor/PropertyDrawers/EmphasisStyleDrawer.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Emphasis), true)]
|
||||
public class EmphasisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Emphasis"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7de9b5e4c5d474fdd88ebb89f0924305
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
70
Assets/XCharts/Editor/PropertyDrawers/GaugeAxisDrawer.cs
Normal file
70
Assets/XCharts/Editor/PropertyDrawers/GaugeAxisDrawer.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(GaugeAxis), true)]
|
||||
public class GaugeAxisDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Axis"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_AxisTick");
|
||||
PropertyField(prop, "m_AxisLabel");
|
||||
PropertyField(prop, "m_AxisLabelText");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CustomPropertyDrawer(typeof(StageColor), true)]
|
||||
public class GaugeAxisLineStageColorDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Percent = prop.FindPropertyRelative("m_Percent");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
|
||||
ChartEditorHelper.MakeTwoField(ref drawRect, drawRect.width, m_Percent, m_Color, "Stage");
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(GaugePointer), true)]
|
||||
public class GaugePointerDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Pointer"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Length");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dec6cfc5ef85147738a81d8de84b079a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/XCharts/Editor/PropertyDrawers/GridDrawer.cs
Normal file
32
Assets/XCharts/Editor/PropertyDrawers/GridDrawer.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Grid), true)]
|
||||
public class GridDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Grid"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Left");
|
||||
PropertyField(prop, "m_Right");
|
||||
PropertyField(prop, "m_Top");
|
||||
PropertyField(prop, "m_Bottom");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/GridDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/GridDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4142159d55a64e1d88d81ac84b714d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +1,15 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(IconStyle), true)]
|
||||
public class IconStyleDrawer : BasePropertyDrawer
|
||||
@@ -11,13 +18,12 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Layer");
|
||||
PropertyField(prop, "m_Align");
|
||||
PropertyField(prop, "m_Sprite");
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ItemStyle), true)]
|
||||
public class ItemStyleDrawer : BasePropertyDrawer
|
||||
@@ -11,26 +17,24 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", false))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_Color0");
|
||||
PropertyField(prop, "m_ToColor");
|
||||
PropertyField(prop, "m_ToColor2");
|
||||
PropertyField(prop, "m_MarkColor");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_CenterColor");
|
||||
PropertyField(prop, "m_CenterGap");
|
||||
PropertyField(prop, "m_BorderType");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderGap");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_BorderColor0");
|
||||
PropertyField(prop, "m_BorderToColor");
|
||||
PropertyField(prop, "m_Opacity");
|
||||
PropertyField(prop, "m_ItemMarker");
|
||||
PropertyField(prop, "m_ItemFormatter");
|
||||
PropertyField(prop, "m_TooltipFormatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyListField(prop, "m_CornerRadius", true);
|
||||
--EditorGUI.indentLevel;
|
||||
40
Assets/XCharts/Editor/PropertyDrawers/LegendDrawer.cs
Normal file
40
Assets/XCharts/Editor/PropertyDrawers/LegendDrawer.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Legend), true)]
|
||||
public class LegendDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Legend"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_IconType");
|
||||
PropertyField(prop, "m_ItemWidth");
|
||||
PropertyField(prop, "m_ItemHeight");
|
||||
PropertyField(prop, "m_ItemGap");
|
||||
PropertyField(prop, "m_ItemAutoColor");
|
||||
PropertyField(prop, "m_TextAutoColor");
|
||||
PropertyField(prop, "m_SelectedMode");
|
||||
PropertyField(prop, "m_Orient");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyListField(prop, "m_Icons");
|
||||
PropertyListField(prop, "m_Data");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/LegendDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/LegendDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b96d10541649a23468168ba0bf1c0bc5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,17 +1,24 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ArrowStyle), true)]
|
||||
[CustomPropertyDrawer(typeof(Arrow), true)]
|
||||
public class ArrowDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Arrow"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Width");
|
||||
@@ -23,7 +30,7 @@ namespace XCharts.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CustomPropertyDrawer(typeof(LineArrow), true)]
|
||||
public class LineArrowStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
@@ -31,7 +38,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Position");
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(BaseLine), true)]
|
||||
public class BaseLineDrawer : BasePropertyDrawer
|
||||
@@ -11,7 +17,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
DrawExtendeds(prop);
|
||||
@@ -42,25 +48,8 @@ namespace XCharts.Editor
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_ShowStartLine");
|
||||
PropertyField(prop, "m_ShowEndLine");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisMinorSplitLine), true)]
|
||||
public class AxisMinorSplitLineDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "MinorSplitLine"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
//PropertyField(prop, "m_Distance");
|
||||
//PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisTick), true)]
|
||||
public class AxisTickDrawer : BaseLineDrawer
|
||||
{
|
||||
@@ -72,21 +61,36 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_ShowStartTick");
|
||||
PropertyField(prop, "m_ShowEndTick");
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AxisMinorTick), true)]
|
||||
public class AxisMinorTickDrawer : BaseLineDrawer
|
||||
[CustomPropertyDrawer(typeof(GaugeAxisSplitLine), true)]
|
||||
public class GaugeAxisSplitDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "MinorTick"; } }
|
||||
public override string ClassName { get { return "Split Line"; } }
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(GaugeAxisTick), true)]
|
||||
public class GaugeAxisTickDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Axis Tick"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
//PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(GaugeAxisLine), true)]
|
||||
public class GaugeAxisLineDrawer : BaseLineDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Axis Line"; } }
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_BarColor");
|
||||
PropertyField(prop, "m_BarBackgroundColor");
|
||||
PropertyField(prop, "m_StageColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(LineStyle), true)]
|
||||
public class LineStyleDrawer : BasePropertyDrawer
|
||||
@@ -11,7 +17,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Type");
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Location), true)]
|
||||
public class LocationDrawer : BasePropertyDrawer
|
||||
@@ -11,7 +17,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Align", true))
|
||||
if (MakeFoldout(prop, "m_Align"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Top");
|
||||
@@ -1,19 +1,29 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[ComponentEditor(typeof(MarkLine))]
|
||||
public class MarkLineEditor : MainComponentEditor<MarkLine>
|
||||
[CustomPropertyDrawer(typeof(MarkLine), true)]
|
||||
public class MarkLineDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
public override string ClassName { get { return "MarkLine"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField("m_SerieIndex");
|
||||
PropertyField("m_Animation");
|
||||
PropertyListField("m_Data", true);
|
||||
--EditorGUI.indentLevel;
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Animation");
|
||||
PropertyListField(prop, "m_Data", true);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +34,10 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var type = (MarkLineType) (prop.FindPropertyRelative("m_Type")).enumValueIndex;
|
||||
var type = (MarkLineType)(prop.FindPropertyRelative("m_Type")).enumValueIndex;
|
||||
var group = prop.FindPropertyRelative("m_Group").intValue;
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Name");
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/MarkLineDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/MarkLineDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9c530aeba79d40a8918424df421d081
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/XCharts/Editor/PropertyDrawers/PolarDrawer.cs
Normal file
30
Assets/XCharts/Editor/PropertyDrawers/PolarDrawer.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Polar), true)]
|
||||
public class PolarDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Polar"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyField(prop, "m_Radius");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/PolarDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/PolarDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48ff9465776e54e749f9ff8c424bafe2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
62
Assets/XCharts/Editor/PropertyDrawers/RadarDrawer.cs
Normal file
62
Assets/XCharts/Editor/PropertyDrawers/RadarDrawer.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Radar), true)]
|
||||
public class RadarDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Radar"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Shape");
|
||||
PropertyField(prop, "m_PositionType");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyField(prop, "m_Radius");
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
PropertyField(prop, "m_CeilRate");
|
||||
PropertyField(prop, "m_IsAxisTooltip");
|
||||
PropertyField(prop, "m_OutRangeColor");
|
||||
PropertyField(prop, "m_ConnectCenter");
|
||||
PropertyField(prop, "m_LineGradient");
|
||||
PropertyField(prop, "m_AxisLine");
|
||||
PropertyField(prop, "m_SplitLine");
|
||||
PropertyField(prop, "m_SplitArea");
|
||||
PropertyField(prop, "m_IndicatorList");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(Radar.Indicator), true)]
|
||||
public class RadarIndicatorDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Indicator"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyTwoFiled(prop, "m_Range");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/RadarDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/RadarDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09bf71ecf64f321468ac28af28bec878
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
459
Assets/XCharts/Editor/PropertyDrawers/SerieDrawer.cs
Normal file
459
Assets/XCharts/Editor/PropertyDrawers/SerieDrawer.cs
Normal file
@@ -0,0 +1,459 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Serie), true)]
|
||||
public class SerieDrawer : BasePropertyDrawer
|
||||
{
|
||||
private bool m_IsPolar = false;
|
||||
private List<bool> m_DataFoldout = new List<bool>();
|
||||
public override string ClassName { get { return "Serie"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
pos.width -= 9;
|
||||
base.OnGUI(pos, prop, label);
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
var type = prop.FindPropertyRelative("m_Type");
|
||||
var serieType = (SerieType)type.enumValueIndex;
|
||||
if (!MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
var orderButton = 48;
|
||||
var gap = 4;
|
||||
var drawRect = pos;
|
||||
drawRect.x += EditorGUIUtility.labelWidth + gap;
|
||||
drawRect.width = pos.width - drawRect.x + ChartEditorHelper.BOOL_WIDTH - orderButton;
|
||||
type.enumValueIndex = EditorGUI.Popup(drawRect, (int)serieType, GetChartSerieTypeNames(chart));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IsPolar = chart is PolarChart;
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
type.enumValueIndex = EditorGUI.Popup(m_DrawRect, "Type", (int)serieType, GetChartSerieTypeNames(chart));
|
||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||
m_DrawRect.y += hig;
|
||||
m_Heights[m_KeyName] += hig;
|
||||
|
||||
PropertyField(prop, "m_InsertDataToHead");
|
||||
PropertyField(prop, "m_Name");
|
||||
switch (serieType)
|
||||
{
|
||||
case SerieType.Line:
|
||||
PropertyField(prop, "m_Stack");
|
||||
if (m_IsPolar)
|
||||
{
|
||||
PropertyField(prop, "m_PolarIndex");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
}
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_SampleDist");
|
||||
PropertyField(prop, "m_SampleType");
|
||||
PropertyField(prop, "m_SampleAverage");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_IgnoreLineBreak");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_LineArrow");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
PropertyField(prop, "m_MarkLine");
|
||||
break;
|
||||
case SerieType.Bar:
|
||||
PropertyField(prop, "m_Stack");
|
||||
if (m_IsPolar)
|
||||
{
|
||||
PropertyField(prop, "m_PolarIndex");
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
}
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_BarType");
|
||||
PropertyField(prop, "m_BarPercentStack");
|
||||
PropertyField(prop, "m_BarWidth");
|
||||
PropertyField(prop, "m_BarGap");
|
||||
PropertyField(prop, "m_BarZebraWidth");
|
||||
PropertyField(prop, "m_BarZebraGap");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
PropertyField(prop, "m_MarkLine");
|
||||
break;
|
||||
case SerieType.Pie:
|
||||
PropertyField(prop, "m_RoseType");
|
||||
PropertyField(prop, "m_Space");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_MinAngle");
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
PropertyField(prop, "m_AvoidLabelOverlap");
|
||||
break;
|
||||
case SerieType.Ring:
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_RingGap");
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_Clockwise");
|
||||
PropertyField(prop, "m_TitleStyle");
|
||||
break;
|
||||
case SerieType.Radar:
|
||||
PropertyField(prop, "m_RadarType");
|
||||
PropertyField(prop, "m_RadarIndex");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
PropertyField(prop, "m_LineStyle");
|
||||
PropertyField(prop, "m_AreaStyle");
|
||||
break;
|
||||
case SerieType.Scatter:
|
||||
case SerieType.EffectScatter:
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_Symbol");
|
||||
break;
|
||||
case SerieType.Heatmap:
|
||||
PropertyField(prop, "m_Ignore");
|
||||
PropertyField(prop, "m_IgnoreValue");
|
||||
break;
|
||||
case SerieType.Gauge:
|
||||
PropertyField(prop, "m_GaugeType");
|
||||
PropertyTwoFiled(prop, "m_Center");
|
||||
PropertyTwoFiled(prop, "m_Radius");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_StartAngle");
|
||||
PropertyField(prop, "m_EndAngle");
|
||||
PropertyFieldLimitMax(prop, "m_SplitNumber", 36);
|
||||
PropertyField(prop, "m_RoundCap");
|
||||
PropertyField(prop, "m_TitleStyle");
|
||||
PropertyField(prop, "m_GaugeAxis");
|
||||
PropertyField(prop, "m_GaugePointer");
|
||||
break;
|
||||
case SerieType.Liquid:
|
||||
PropertyField(prop, "m_VesselIndex");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyField(prop, "m_WaveLength");
|
||||
PropertyField(prop, "m_WaveHeight");
|
||||
PropertyField(prop, "m_WaveSpeed");
|
||||
PropertyField(prop, "m_WaveOffset");
|
||||
break;
|
||||
case SerieType.Candlestick:
|
||||
PropertyField(prop, "m_XAxisIndex");
|
||||
PropertyField(prop, "m_YAxisIndex");
|
||||
PropertyFieldLimitMin(prop, "m_MinShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxShow", 0);
|
||||
PropertyFieldLimitMin(prop, "m_MaxCache", 0);
|
||||
PropertyField(prop, "m_BarWidth");
|
||||
PropertyField(prop, "m_Clip");
|
||||
PropertyField(prop, "m_ShowAsPositiveNumber");
|
||||
PropertyField(prop, "m_Large");
|
||||
PropertyField(prop, "m_LargeThreshold");
|
||||
break;
|
||||
case SerieType.Custom:
|
||||
var fileds = chart.GetCustomSerieInspectorShowFileds();
|
||||
if (fileds != null && fileds.Length > 0)
|
||||
{
|
||||
foreach (var filed in fileds)
|
||||
{
|
||||
PropertyField(prop, filed);
|
||||
}
|
||||
}
|
||||
var customs = chart.GetCustomSerieInspectorCustomFileds();
|
||||
if (customs != null && customs.Length > 0)
|
||||
{
|
||||
foreach (var custom in customs)
|
||||
{
|
||||
var customProp = prop.FindPropertyRelative(custom[0]);
|
||||
var anatherName = custom[1] + " (" + customProp.displayName + ")";
|
||||
EditorGUI.PropertyField(m_DrawRect, customProp, new GUIContent(anatherName));
|
||||
m_DrawRect.y += EditorGUI.GetPropertyHeight(prop);
|
||||
m_Heights[m_KeyName] += hig;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
PropertyField(prop, "m_IconStyle");
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_Emphasis");
|
||||
PropertyField(prop, "m_Animation");
|
||||
DrawData(pos, prop, serieType, ref m_DrawRect);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
private string[] GetChartSerieTypeNames(BaseChart chart)
|
||||
{
|
||||
var list = System.Enum.GetNames(typeof(SerieType));
|
||||
for (int i = 0; i < list.Length; i++)
|
||||
{
|
||||
if (list[i].Equals("Custom"))
|
||||
{
|
||||
var customName = chart.GetCustomSerieTypeName();
|
||||
if (!string.IsNullOrEmpty(customName))
|
||||
{
|
||||
list[i] = customName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void DrawData(Rect pos, SerializedProperty prop, SerieType serieType, ref Rect drawRect)
|
||||
{
|
||||
SerializedProperty m_Datas = prop.FindPropertyRelative("m_Data");
|
||||
SerializedProperty m_DataDimension = prop.FindPropertyRelative("m_ShowDataDimension");
|
||||
SerializedProperty m_ShowDataName = prop.FindPropertyRelative("m_ShowDataName");
|
||||
SerializedProperty m_ShowDataIcon = prop.FindPropertyRelative("m_ShowDataIcon");
|
||||
int index = InitToggle(prop);
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
m_DataFoldout[index] = EditorGUI.Foldout(drawRect, m_DataFoldout[index], "Data", true);
|
||||
drawRect.width = pos.width;
|
||||
|
||||
AddSingleLineHeight();
|
||||
if (m_DataFoldout[index])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
float nameWid = 45;
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var gap = 2;
|
||||
var namegap = 3;
|
||||
#else
|
||||
var gap = 0;
|
||||
var namegap = 0;
|
||||
#endif
|
||||
EditorGUI.PropertyField(new Rect(drawRect.x, drawRect.y, pos.width - 2 * nameWid - 2, pos.height),
|
||||
m_DataDimension);
|
||||
var nameRect = new Rect(pos.width - 2 * nameWid + 14 + gap, drawRect.y, nameWid - gap, pos.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
nameRect.x += ChartEditorHelper.BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(nameRect, new GUIContent("name")))
|
||||
{
|
||||
m_ShowDataName.boolValue = !m_ShowDataName.boolValue;
|
||||
}
|
||||
var iconRect = new Rect(pos.width - nameWid + 14, drawRect.y, nameWid + namegap, pos.height);
|
||||
if (XChartsSettings.editorBlockEnable)
|
||||
{
|
||||
iconRect.x += ChartEditorHelper.BLOCK_WIDTH;
|
||||
}
|
||||
if (GUI.Button(iconRect, new GUIContent("more")))
|
||||
{
|
||||
m_ShowDataIcon.boolValue = !m_ShowDataIcon.boolValue;
|
||||
}
|
||||
var jsonRect = new Rect(pos.width - 70, drawRect.y - pos.height - 2, 90, pos.height);
|
||||
if (GUI.Button(jsonRect, new GUIContent("data from json")))
|
||||
{
|
||||
PraseJsonDataEditor.chart = prop.serializedObject.targetObject as BaseChart;
|
||||
PraseJsonDataEditor.serieIndex = index;
|
||||
PraseJsonDataEditor.ShowWindow();
|
||||
}
|
||||
AddSingleLineHeight();
|
||||
var listSize = m_Datas.arraySize;
|
||||
listSize = EditorGUI.IntField(drawRect, "Size", listSize);
|
||||
AddSingleLineHeight();
|
||||
|
||||
if (listSize < 0) listSize = 0;
|
||||
if (m_DataDimension.intValue < 1) m_DataDimension.intValue = 1;
|
||||
int dimension = m_DataDimension.intValue;
|
||||
bool showName = m_ShowDataName.boolValue;
|
||||
bool showIcon = m_ShowDataIcon.boolValue;
|
||||
bool showSelected = (serieType == SerieType.Pie);
|
||||
if (listSize != m_Datas.arraySize)
|
||||
{
|
||||
while (listSize > m_Datas.arraySize) m_Datas.arraySize++;
|
||||
while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
|
||||
}
|
||||
if (listSize > 30 && !XChartsSettings.editorShowAllListData)
|
||||
{
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, i, pos.width);
|
||||
}
|
||||
if (num >= 10)
|
||||
{
|
||||
EditorGUI.LabelField(drawRect, "...");
|
||||
AddSingleLineHeight();
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, listSize - 1, pos.width);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_Datas.arraySize; i++)
|
||||
{
|
||||
DrawDataElement(ref drawRect, dimension, m_Datas, showName, showIcon, showSelected, i, pos.width);
|
||||
}
|
||||
}
|
||||
AddHeight(EditorGUIUtility.standardVerticalSpacing);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawDataElement(ref Rect drawRect, int dimension, SerializedProperty m_Datas, bool showName,
|
||||
bool showDetail, bool showSelected, int index, float currentWidth)
|
||||
{
|
||||
var lastX = drawRect.x;
|
||||
var lastWid = drawRect.width;
|
||||
var lastFieldWid = EditorGUIUtility.fieldWidth;
|
||||
var lastLabelWid = EditorGUIUtility.labelWidth;
|
||||
var serieData = m_Datas.GetArrayElementAtIndex(index);
|
||||
var sereName = serieData.FindPropertyRelative("m_Name");
|
||||
var selected = serieData.FindPropertyRelative("m_Selected");
|
||||
|
||||
var data = serieData.FindPropertyRelative("m_Data");
|
||||
var fieldCount = dimension + (showName ? 1 : 0);
|
||||
|
||||
if (fieldCount <= 1)
|
||||
{
|
||||
while (2 > data.arraySize)
|
||||
{
|
||||
var value = data.arraySize == 0 ? index : 0;
|
||||
data.arraySize++;
|
||||
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
|
||||
}
|
||||
SerializedProperty element = data.GetArrayElementAtIndex(1);
|
||||
if (showSelected)
|
||||
{
|
||||
drawRect.width = drawRect.width - 18;
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
drawRect.x = currentWidth - 40;
|
||||
EditorGUI.PropertyField(drawRect, selected, GUIContent.none);
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PropertyField(drawRect, element, new GUIContent("Element " + index));
|
||||
}
|
||||
AddHeight(EditorGUI.GetPropertyHeight(element));
|
||||
}
|
||||
else
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var gap = 2;
|
||||
var namegap = 3;
|
||||
#else
|
||||
var gap = 0;
|
||||
var namegap = 0;
|
||||
#endif
|
||||
EditorGUI.LabelField(drawRect, "Element " + index);
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15 + gap;
|
||||
var dataWidTotal = (currentWidth - (startX + 20.5f + 1));
|
||||
var dataWid = dataWidTotal / fieldCount;
|
||||
var xWid = dataWid - 2;
|
||||
for (int i = 0; i < dimension; i++)
|
||||
{
|
||||
var dataCount = i < 1 ? 2 : i + 1;
|
||||
while (dataCount > data.arraySize)
|
||||
{
|
||||
var value = data.arraySize == 0 ? index : 0;
|
||||
data.arraySize++;
|
||||
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = value;
|
||||
}
|
||||
drawRect.x = startX + i * xWid;
|
||||
drawRect.width = dataWid + 40;
|
||||
SerializedProperty element = data.GetArrayElementAtIndex(dimension <= 1 ? 1 : i);
|
||||
EditorGUI.PropertyField(drawRect, element, GUIContent.none);
|
||||
}
|
||||
if (showName)
|
||||
{
|
||||
drawRect.x = startX + (fieldCount - 1) * xWid;
|
||||
drawRect.width = dataWid + 40 + dimension * namegap;
|
||||
EditorGUI.PropertyField(drawRect, sereName, GUIContent.none);
|
||||
}
|
||||
AddSingleLineHeight();
|
||||
drawRect.x = lastX;
|
||||
drawRect.width = lastWid;
|
||||
EditorGUIUtility.fieldWidth = lastFieldWid;
|
||||
EditorGUIUtility.labelWidth = lastLabelWid;
|
||||
}
|
||||
if (showDetail)
|
||||
{
|
||||
EditorGUI.indentLevel += 2;
|
||||
var m_Ignore = serieData.FindPropertyRelative("m_Ignore");
|
||||
var m_Selected = serieData.FindPropertyRelative("m_Selected");
|
||||
var m_Id = serieData.FindPropertyRelative("m_Id");
|
||||
var m_EnableIcon = serieData.FindPropertyRelative("m_EnableIconStyle");
|
||||
var m_Icon = serieData.FindPropertyRelative("m_IconStyle");
|
||||
var m_EnableLabel = serieData.FindPropertyRelative("m_EnableLabel");
|
||||
var m_Label = serieData.FindPropertyRelative("m_Label");
|
||||
var m_EnableItemStyle = serieData.FindPropertyRelative("m_EnableItemStyle");
|
||||
var m_ItemStyle = serieData.FindPropertyRelative("m_ItemStyle");
|
||||
var m_EnableEmphasis = serieData.FindPropertyRelative("m_EnableEmphasis");
|
||||
var m_Emphasis = serieData.FindPropertyRelative("m_Emphasis");
|
||||
var m_EnableSymbol = serieData.FindPropertyRelative("m_EnableSymbol");
|
||||
var m_Symbol = serieData.FindPropertyRelative("m_Symbol");
|
||||
EditorGUI.PropertyField(drawRect, m_Ignore);
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Ignore));
|
||||
EditorGUI.PropertyField(drawRect, m_Selected);
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Selected));
|
||||
EditorGUI.PropertyField(drawRect, m_Id);
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Id));
|
||||
EditorGUI.PropertyField(drawRect, m_Icon);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableIcon, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Icon));
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableSymbol, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Symbol));
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableLabel, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Label));
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableItemStyle, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_ItemStyle));
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableEmphasis, 1, "(enable)");
|
||||
AddHeight(EditorGUI.GetPropertyHeight(m_Emphasis));
|
||||
EditorGUI.indentLevel -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
private int InitToggle(SerializedProperty prop)
|
||||
{
|
||||
int index = 0;
|
||||
var sindex = prop.propertyPath.LastIndexOf('[');
|
||||
var eindex = prop.propertyPath.LastIndexOf(']');
|
||||
if (sindex >= 0 && eindex >= 0)
|
||||
{
|
||||
var str = prop.propertyPath.Substring(sindex + 1, eindex - sindex - 1);
|
||||
int.TryParse(str, out index);
|
||||
}
|
||||
while (index >= m_DataFoldout.Count)
|
||||
{
|
||||
m_DataFoldout.Add(false);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/SerieDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/SerieDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30d9496b99e39944a6987e390bed91f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/XCharts/Editor/PropertyDrawers/SerieLabelDrawer.cs
Normal file
48
Assets/XCharts/Editor/PropertyDrawers/SerieLabelDrawer.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieLabel), true)]
|
||||
public class SerieLabelDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Label"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_AutoOffset");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_BackgroundHeight");
|
||||
PropertyField(prop, "m_PaddingLeftRight");
|
||||
PropertyField(prop, "m_PaddingTopBottom");
|
||||
PropertyField(prop, "m_Border");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_Line");
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_LineColor");
|
||||
PropertyField(prop, "m_LineWidth");
|
||||
PropertyField(prop, "m_LineGap");
|
||||
PropertyField(prop, "m_LineLength1");
|
||||
PropertyField(prop, "m_LineLength2");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d30d82b48b553451fad726478777a02e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +1,15 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieSymbol), true)]
|
||||
public class SerieSymbolDrawer : BasePropertyDrawer
|
||||
@@ -12,14 +18,13 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var type = (SymbolType)prop.FindPropertyRelative("m_Type").enumValueIndex;
|
||||
var type = (SerieSymbolType)prop.FindPropertyRelative("m_Type").enumValueIndex;
|
||||
PropertyField(prop, "m_Type");
|
||||
if (type == SymbolType.Custom)
|
||||
if (type == SerieSymbolType.Custom)
|
||||
{
|
||||
AddHelpBox("Custom symbol only work in PictorialBar serie", MessageType.Warning);
|
||||
PropertyField(prop, "m_Image");
|
||||
PropertyField(prop, "m_ImageType");
|
||||
PropertyField(prop, "m_Width");
|
||||
@@ -28,18 +33,18 @@ namespace XCharts.Editor
|
||||
}
|
||||
PropertyField(prop, "m_Gap");
|
||||
PropertyField(prop, "m_SizeType");
|
||||
switch ((SymbolSizeType)prop.FindPropertyRelative("m_SizeType").enumValueIndex)
|
||||
switch ((SerieSymbolSizeType)prop.FindPropertyRelative("m_SizeType").enumValueIndex)
|
||||
{
|
||||
case SymbolSizeType.Custom:
|
||||
case SerieSymbolSizeType.Custom:
|
||||
PropertyField(prop, "m_Size");
|
||||
PropertyField(prop, "m_SelectedSize");
|
||||
break;
|
||||
case SymbolSizeType.FromData:
|
||||
case SerieSymbolSizeType.FromData:
|
||||
PropertyField(prop, "m_DataIndex");
|
||||
PropertyField(prop, "m_DataScale");
|
||||
PropertyField(prop, "m_MinSize");
|
||||
PropertyField(prop, "m_MaxSize");
|
||||
PropertyField(prop, "m_SelectedDataScale");
|
||||
break;
|
||||
case SymbolSizeType.Function:
|
||||
case SerieSymbolSizeType.Callback:
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_StartIndex");
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a164822bc0fd4e5291f00c5a4ee86f6
|
||||
guid: e0c4d3c3303994821bde654cf67d414d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
43
Assets/XCharts/Editor/PropertyDrawers/SeriesDrawer.cs
Normal file
43
Assets/XCharts/Editor/PropertyDrawers/SeriesDrawer.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Series), true)]
|
||||
public class SeriesDrawer : PropertyDrawer
|
||||
{
|
||||
private bool m_SeriesModuleToggle = false;
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Series = prop.FindPropertyRelative("m_Series");
|
||||
m_SeriesModuleToggle = ChartEditorHelper.MakeListWithFoldout(ref drawRect,
|
||||
m_Series, m_SeriesModuleToggle, true, true);
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
float height = 0;
|
||||
if (m_SeriesModuleToggle)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Series");
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
for (int i = 0; i < m_Data.arraySize; i++)
|
||||
{
|
||||
height += EditorGUI.GetPropertyHeight(m_Data.GetArrayElementAtIndex(i)) + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return height;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/SeriesDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/SeriesDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c2458b1901047547b1a59d097786816
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Settings), true)]
|
||||
public class SettingsDrawer : BasePropertyDrawer
|
||||
@@ -11,24 +17,25 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", false, new HeaderMenuInfo("Reset", () =>
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
var btnWidth = 50;
|
||||
var btnRect = new Rect(pos.x + pos.width - btnWidth, pos.y, btnWidth, EditorGUIUtility.singleLineHeight);
|
||||
if (GUI.Button(btnRect, new GUIContent("Reset", "Reset to default settings")))
|
||||
{
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
chart.settings.Reset();
|
||||
})))
|
||||
{
|
||||
}
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_ReversePainter");
|
||||
PropertyField(prop, "m_MaxPainter");
|
||||
PropertyField(prop, "m_BasePainterMaterial");
|
||||
PropertyField(prop, "m_SeriePainterMaterial");
|
||||
PropertyField(prop, "m_UpperPainterMaterial");
|
||||
PropertyField(prop, "m_TopPainterMaterial");
|
||||
PropertyField(prop, "m_LineSmoothStyle");
|
||||
PropertyField(prop, "m_LineSmoothness");
|
||||
PropertyField(prop, "m_LineSegmentDistance");
|
||||
PropertyField(prop, "m_CicleSmoothness");
|
||||
PropertyField(prop, "m_AxisMaxSplitNumber");
|
||||
PropertyField(prop, "m_LegendIconLineWidth");
|
||||
PropertyListField(prop, "m_LegendIconCornerRadius", true);
|
||||
--EditorGUI.indentLevel;
|
||||
@@ -1,8 +1,14 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TextLimit), true)]
|
||||
public class TextLimitDrawer : BasePropertyDrawer
|
||||
@@ -11,7 +17,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Enable", true))
|
||||
if (MakeFoldout(prop, "m_Enable"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_MaxWidth");
|
||||
@@ -1,11 +1,17 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if dUI_TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TextStyle), true)]
|
||||
public class TextStyleDrawer : BasePropertyDrawer
|
||||
@@ -14,7 +20,7 @@ namespace XCharts.Editor
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show", true))
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
#if dUI_TextMeshPro
|
||||
@@ -23,19 +29,19 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Font");
|
||||
#endif
|
||||
PropertyField(prop, "m_Rotate");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_FontSize");
|
||||
PropertyField(prop, "m_LineSpacing");
|
||||
#if dUI_TextMeshPro
|
||||
PropertyField(prop, "m_TMPFontStyle");
|
||||
PropertyField(prop, "m_TMPSpriteAsset");
|
||||
PropertyField(prop, "m_TMPAlignment");
|
||||
#else
|
||||
PropertyField(prop, "m_FontStyle");
|
||||
PropertyField(prop, "m_Alignment");
|
||||
PropertyField(prop, "m_AutoAlign");
|
||||
PropertyField(prop, "m_AutoWrap");
|
||||
PropertyField(prop, "m_AutoAlign");
|
||||
#endif
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
172
Assets/XCharts/Editor/PropertyDrawers/ThemeDrawer.cs
Normal file
172
Assets/XCharts/Editor/PropertyDrawers/ThemeDrawer.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if dUI_TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ChartTheme), true)]
|
||||
public class ThemeDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Theme"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
var defaultWidth = pos.width;
|
||||
var defaultX = pos.x;
|
||||
var btnWidth = 50;
|
||||
if (MakeFoldout(prop, ""))
|
||||
{
|
||||
var btnRect = new Rect(m_DrawRect);
|
||||
btnRect.x = defaultX + defaultWidth - 2 * btnWidth - 2;
|
||||
btnRect.y = m_DrawRect.y - EditorGUIUtility.singleLineHeight - 3;
|
||||
btnRect.width = btnWidth;
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
if (GUI.Button(btnRect, new GUIContent("Reset", "Reset to theme default color")))
|
||||
{
|
||||
chart.theme.ResetTheme();
|
||||
chart.RefreshAllComponent();
|
||||
}
|
||||
btnRect.x = defaultX + defaultWidth - btnWidth;
|
||||
btnRect.width = btnWidth;
|
||||
if (GUI.Button(btnRect, new GUIContent("Export", "Export theme to asset for a new theme")))
|
||||
{
|
||||
ExportThemeWindow.target = chart;
|
||||
EditorWindow.GetWindow(typeof(ExportThemeWindow));
|
||||
}
|
||||
++EditorGUI.indentLevel;
|
||||
var chartNameList = XThemeMgr.GetAllThemeNames();
|
||||
var lastIndex = chartNameList.IndexOf(chart.theme.themeName);
|
||||
var y = pos.y + EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
var selectedIndex = EditorGUI.Popup(new Rect(pos.x, y, pos.width, EditorGUIUtility.singleLineHeight),
|
||||
"Theme", lastIndex, chartNameList.ToArray());
|
||||
AddSingleLineHeight();
|
||||
if (lastIndex != selectedIndex)
|
||||
{
|
||||
XThemeMgr.SwitchTheme(chart, chartNameList[selectedIndex]);
|
||||
}
|
||||
#if dUI_TextMeshPro
|
||||
PropertyField(prop, "m_TMPFont");
|
||||
if(chart.theme.tmpFont == null && !string.IsNullOrEmpty(chart.theme.tmpFontName))
|
||||
{
|
||||
var msg = string.Format("Can't find theme font asset:{0} in project.", chart.theme.tmpFontName);
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Error);
|
||||
}
|
||||
#else
|
||||
PropertyField(prop, "m_Font");
|
||||
if (chart.theme.font == null && !string.IsNullOrEmpty(chart.theme.fontName))
|
||||
{
|
||||
var msg = string.Format("Can't find theme font asset:{0} in project.", chart.theme.fontName);
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Error);
|
||||
}
|
||||
#endif
|
||||
PropertyField(prop, "m_ContrastColor");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_ColorPalette");
|
||||
PropertyField(prop, "m_Common");
|
||||
PropertyField(prop, "m_Title");
|
||||
PropertyField(prop, "m_SubTitle");
|
||||
PropertyField(prop, "m_Legend");
|
||||
PropertyField(prop, "m_Axis");
|
||||
PropertyField(prop, "m_RadiusAxis");
|
||||
PropertyField(prop, "m_AngleAxis");
|
||||
PropertyField(prop, "m_Polar");
|
||||
PropertyField(prop, "m_Gauge");
|
||||
PropertyField(prop, "m_Radar");
|
||||
PropertyField(prop, "m_Tooltip");
|
||||
PropertyField(prop, "m_DataZoom");
|
||||
PropertyField(prop, "m_VisualMap");
|
||||
PropertyField(prop, "m_Serie");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPropertyField(Rect pos, SerializedProperty prop, ref float y)
|
||||
{
|
||||
float height = EditorGUI.GetPropertyHeight(prop, new GUIContent(prop.displayName), true);
|
||||
EditorGUI.PropertyField(new Rect(pos.x, y, pos.width, height), prop, true);
|
||||
y += height + EditorGUIUtility.standardVerticalSpacing;
|
||||
m_Heights[m_KeyName] += height + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
public class ExportThemeWindow : EditorWindow
|
||||
{
|
||||
public static BaseChart target;
|
||||
private static ExportThemeWindow window;
|
||||
private string m_ChartName;
|
||||
static void Init()
|
||||
{
|
||||
window = (ExportThemeWindow)EditorWindow.GetWindow(typeof(ExportThemeWindow), false, "Export Theme", true);
|
||||
window.minSize = new Vector2(600, 50);
|
||||
window.maxSize = new Vector2(600, 50);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
GUILayout.Space(10);
|
||||
GUILayout.Label("Input a new name for theme:");
|
||||
m_ChartName = GUILayout.TextField(m_ChartName);
|
||||
|
||||
GUILayout.Space(10);
|
||||
GUILayout.Label("Export path:");
|
||||
if (string.IsNullOrEmpty(m_ChartName))
|
||||
{
|
||||
GUILayout.Label("Need input a new name.");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(XThemeMgr.GetThemeAssetPath(m_ChartName));
|
||||
}
|
||||
|
||||
GUILayout.Space(20);
|
||||
if (GUILayout.Button("Export"))
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_ChartName))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:Need input a new name!"));
|
||||
}
|
||||
else if (XThemeMgr.ContainsTheme(m_ChartName))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:The name you entered is already in use!"));
|
||||
}
|
||||
else if (IsAssetsExist(XThemeMgr.GetThemeAssetPath(m_ChartName)))
|
||||
{
|
||||
ShowNotification(new GUIContent("ERROR:The asset is exist! \npath="
|
||||
+ XThemeMgr.GetThemeAssetPath(m_ChartName)));
|
||||
}
|
||||
else
|
||||
{
|
||||
XThemeMgr.ExportTheme(target.theme, m_ChartName);
|
||||
ShowNotification(new GUIContent("SUCCESS:The theme is exported. \npath="
|
||||
+ XThemeMgr.GetThemeAssetPath(m_ChartName)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsAssetsExist(string path)
|
||||
{
|
||||
return File.Exists(Application.dataPath + "/../" + path);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Assets/XCharts/Editor/PropertyDrawers/TitleDrawer.cs
Normal file
33
Assets/XCharts/Editor/PropertyDrawers/TitleDrawer.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Title), true)]
|
||||
public class TitleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Title"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Text");
|
||||
PropertyField(prop, "m_SubText");
|
||||
PropertyField(prop, "m_ItemGap");
|
||||
PropertyField(prop, "m_Location");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
PropertyField(prop, "m_SubTextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/XCharts/Editor/PropertyDrawers/TitleDrawer.cs.meta
Normal file
11
Assets/XCharts/Editor/PropertyDrawers/TitleDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22ae7ec778f27c1409cb9151ce7b9aba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user