FAQ 1: How to adjust the margin between the axis and the background?
FAQ 2: How to play agian the fadeIn animation?
FAQ 3: How to customize the color of data item in line chart and pie chart?
FAQ 4: How to formatter the text of axis label, such as add a units text?
FAQ 5: How to stack the bar of bar chart
FAQ 6: How to make the bar serie in the same bar but not stack?
FAQ 7: How to adjust the bar width and gap of barchart?
FAQ 8: How to adjust the color of bar?
FAQ 9: Can I adjust the anchor of chart?
FAQ 10: Can display more than 1000 data?
FAQ 11: Can line chart drawing be dash, dot and dash-dot?
FAQ 12: How to limit the value range of the Y-axis?
FAQ 13: How to customize the tick value range of value axis?
FAQ 14: How to display text at the top of data items?
FAQ 15: How do I customize icons for data items?
FAQ 16: How to anti-aliasing and make the chart smoother?
FAQ 17: Why does mouse over chart Tooltip not show?
FAQ 18: How not to display the bar line of Tooltip?
FAQ 19: How do I customize the display of Tooltip?
FAQ 20: How do I get the Y-axis to display multiple decimal places?
FAQ 21: How do I dynamically update data with code?
FAQ 22: How to display legend? Why are legends sometimes not displayed?
FAQ 23: How to make chart as prefab?
FAQ 24: How do I draw custom graphic in chart,such as line or dot?
FAQ 25: How to achieve similar data movement effect of ELECTRO cardiogram?
FAQ 26: How do I use the background component? What are the conditions?
FAQ 27: Mesh can not have more than 65000 vertices?
FAQ 28: Why are the parameters set in Serie reset after they run?
FAQ 29: How to change the color of serie symbol?
FAQ 30: How to deal with TMP errors when importing or updating XCharts?
FAQ 31: Support empty data? How to achieve the effect of line chart disconnection?
FAQ 32: 2.x What are the common problems when upgrading version 3.x?
Grid
conponent,which can adjust the left, right, up, down margins of chart.
call the chart.AnimationReset()
API.
Theme
->colorPalette
, or the sub component LineStyle
and ItemStyle
of Serie
.
Adjust formatter
and numericFormatter
parameter of Legend
, AxisLabel
, Tooltop
, SerieLabel
.
Set the stack
parameter of Serie
, the series will stack in a bar with the same stack
.
Set the barGap
of Serie
to -1
,stack
to null.
Adjust the barWidth
and barGap
parameter of Serie
, the last serie
's barWidth
and barGap
are valid when multiple serie
.
Adjust the ItemStyle
of Data
in inspector
.
Yes, you can set any one of 16 anchors but the value use default.
Yes. But UGUI
limits 65000
vertices to a single Graphic
, so too much data may not be displayed completely. The sampling simplification curve can be turned on by setting the sampling distance sampleDist
. You can also set some parameters to reduce the number of vertices in the chart to help show more data. Such as reducing the size of the chart, close or reduce the axis of the client drawing, close Symbol
and Label
display. A Normal
line chart occupies fewer vertices than a Smooth
line chart. The 1.5.0
and above versions can set large
and largeThreshold
parameters to enable performance mode.
Yes. Adjust the lineType
of Serie
.
Select the minMaxType
of Axis
as Custom
, then set min
and max
to the values you want.
By default, it is automatically split by the splitNumber
of Axis
. Also, you can customize the interval
to the range you want.
Adjust the Label
of Serie
.
Set the Icon
of Data
in Serie
.
Open the Anti-Aliasing
setting in Unity
. Selected the UI Canvas Render Mode
as Screen Space-Camera
, selected MSAA
, set 4
times or higher anti-aliasing. The sawtooth can only be reduced and unavoidable. The higher the pixel, the less obvious the sawtooth is.
Verify Toolip
is opened. Verify that the parent node of chart has turned off mouse events.
Set the type
of Tooltup
as None
. Or adjust the parameters of lineStyle
.
See the formatter
, itemFormatter
, titleFormatter
parameters of Tooltip
.
Set the numericFormatter
parameter of AxisLabel
.
See example: Example01_UpdateData.cs
First, the name
in Serie
must have a value that is not null. Then set Legend
is show
, where data
can be empty by default, indicating that all legends are displayed. If you only want to display part of the Serie
legend, fill in data
with the name
of the legend you want to display. If none of the values in data
are name
of the series, the legend will not be displayed.
Before make prefab, please delete all sub gameObject under chart which auto-created by XCharts
.
Implement onCustomDraw
of chart, see Example12_CustomDrawing.cs
.
See Example_Dynamic.cs
.
Setting show
to true
for the background
component.
This is the limit of UGUI
on the number of vertices for a single Graphic
. XCharts
is draw chart on a single Graphic
, so there is also this limitation. The solution can be referred to: FAQ 10: Can display more than 1000 data
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.
The color of 'Symbol' is the color of 'ItemStyle' used.
XCharts does not enable TMP by default, so there are no references to TMP on asmdef. This issue may occur when updating XCharts after TMP is enabled locally. It can be solved in the following two ways:
XCharts.Runtime.asmdef
and XCharts.Editor.asmdef
and manually add references to TextMeshPro
dUI_TextMeshPro
macro for Scripting Define Symbols in PlayerSettingVersion 3.8.0
after adding Daemon XCharts - Daemon, will be XCharts - Daemon import project, When updating XCharts, the daemon automatically refreshes the asmdef based on the locally enabled TMP to ensure proper compilation.
data
of Serie
is of type double
, so it cannot represent empty data. Empty data can be achieved by turning on Serie's ignore and specifying ignoreValue. You can also set the ignore parameter for each SerieData. The ignoreLineBreak parameter can be set to disconnect or connect after ignoring data.
XCharts.Runtime.XChartsMgr
is missing the class attribute ExtensionOfNativeClass
!
3.x version does not need to mount XChartsMgr, directly delete the _xcharts_
node on the scene.