Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add custom text to the diagram #421

Closed
SvenMuc opened this issue Sep 26, 2015 · 4 comments
Closed

How to add custom text to the diagram #421

SvenMuc opened this issue Sep 26, 2015 · 4 comments

Comments

@SvenMuc
Copy link
Contributor

SvenMuc commented Sep 26, 2015

Hi,
I'm currently trying to adde custom text within the bar chart diagram. What's the best way to do so?
Are there already some internal functions available?

Thanks for you support
Sven

@liuxuan30
Copy link
Member

It depends on what text you want to add and where. There is labels, values text, and ChartMarker to let you display some custom text when you tap the bar; of cause you could write your own code to display the chart markers when the chart is loaded.

@SvenMuc
Copy link
Contributor Author

SvenMuc commented Sep 28, 2015

I'd like to plot three histograms into one diagram and add a text field (description) above each bar chart. It is just a label which I'd like to position at any place in the diagram.

I saw a function called drawExtras . Is that the right place to add custom drawings?

@SvenMuc
Copy link
Contributor Author

SvenMuc commented Sep 29, 2015

Hi, attached you can find an example what I'm planning to do.
bildschirmfoto 2015-09-29 um 20 01 49

Alternatively, I'm also thinking about groups at the x-axis, like Excel does.

@liuxuan30
Copy link
Member

Technically, as long as you know how it works, you can draw whatever you like on the canvas. Just keep it easy for you to maintain if any version upgrade;

There is legend, chart marker, here for you. But looks like you need to override and calculate the right position. For ultimate flexibility, I would consider create a chart marker; Anyway, just pick one you feel comfortable to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants