Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Axis Title and Offset #88

Open
danvass opened this issue Feb 19, 2017 · 7 comments
Open

Axis Title and Offset #88

danvass opened this issue Feb 19, 2017 · 7 comments

Comments

@danvass
Copy link

danvass commented Feb 19, 2017

Is it possible to set an axis title and also to make the axis start a bit before and after the min and max values in a line chart? In addition, can you use strings for axis values on line charts and to place a dot at each of the data points?

I couldn't find any info in the wiki about this or the issues.

@marzolfb
Copy link
Contributor

"Possible to set an axis title?" - no, not right now but that is a very reasonable enhancement request.

"Make the axis start a bit before and after the min and max values in a line chart?" - I'm not sure I understand. Could you provide a screenshot example of what you see know and the data and options you are using for your chart and what you'd like to see instead? (Also is it a SmoothLine or StockLine?). The tailLength option may address what you want (although I suspect not) but I would need to understand your situation better.

"can you use strings for axis values?" - yes, supply a function in the labelFunction option - see the "StockLineChartDynamicTickLabels" example in the example app (regrettably, the wiki docs haven't kept up at this moment with changes like this option in the library)

"to place a dot at each of the data points?" - yes, use set the showTicks: option on axisX/axisY to true

@danvass
Copy link
Author

danvass commented Feb 19, 2017

Thanks @marzolfb

  1. I see, that would be a nice feature to have.

  2. I'll check if tailLength fixes it but to try clarify. If I have a graph with two data points one at x=1 and x=2, I'd like the graph to show the axis from x=0 and x=4 so that the graph doesn't abruptly start and end. I can't send a screenshot as not at my laptop at the moment. It's also SmoothLine but not sure which of the two I'll use yet.

  3. Great, thanks.

  4. That just places dots along the axis, I meant dots along the line itself at each data point.

@marzolfb
Copy link
Contributor

marzolfb commented Feb 19, 2017

On 2 - Ahh, I think you want to use the min and max options on the chart. However, these unfortunately only apply to the y-axis and not the x-axis (see my discussion with Cody-G-G on this topic - #80)

On 4 - Unfortunately, no, that ability isn't there. Thats's a duplicate of #40 which, like your Axis title suggestion, is also a very reasonable enhancement request

@danvass
Copy link
Author

danvass commented Feb 19, 2017

Okay - great thanks. Those would be some nice additional features but apart from that it's a really great library. Thank you!

@danvass
Copy link
Author

danvass commented Feb 24, 2017

@marzolfb Another enhancement features that would be useful would be to be able to set the axis 'steps'. For example, tell it so that each y axis line is 5 apart. So the axis Y shows 0 then 5 then 10 then 15 and so on.

@marzolfb
Copy link
Contributor

@dvassilev I believe that use case is supported via the tickValues option. See the StockLineChartStaticTickLabels chart in the example app for reference - you should be able to substitute numbers for values instead of the strings shown in the example.

@VanessaChu
Copy link

Is the tickValues supported for Bar Chart?

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

No branches or pull requests

3 participants