Skip to content

How to add a text to the chart #448

Answered by wirew0rm
asmirn1 asked this question in Q&A
Discussion options

You must be logged in to vote

setEditable(false) seems to only affect dragging on the line and not on the label, this is a bug, which we should fix.
For not drawing the line, you could use css, check the AbstractSingleValueIndicatorSample for an example of using css to style the indicator.

On the other hand, if you only want to have text, you could also implement your own plugin (probably based on one of the ValueIndicator variants). This should be pretty simple and would give you a lot more influence on how and where everything is rendered.

Looking at your screenshot, you seem to want to add labels to data points, for that usecase there is also the LabeledMarkerRenderer, which allows you to add your strings into your…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@asmirn1
Comment options

@RalphSteinhagen
Comment options

@RalphSteinhagen
Comment options

@asmirn1
Comment options

@RalphSteinhagen
Comment options

Answer selected by asmirn1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants