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

Line Plot not plotting properly #56

Open
RohitJacob opened this issue May 8, 2017 · 7 comments
Open

Line Plot not plotting properly #56

RohitJacob opened this issue May 8, 2017 · 7 comments

Comments

@RohitJacob
Copy link

RohitJacob commented May 8, 2017

screen shot 2017-05-08 at 10 40 45 am

I've used the examples to plot, but just changed the data source its picking from (another csv) and there's no way my data should ever plot like this.
Is there a fix or is there something I'm missing?

@nmkridler
Copy link
Contributor

yikes, maybe there's an ordering issue?

@RohitJacob
Copy link
Author

@nmkridler I don't think so, but is there any documentation on how the LineChart function works and the parameters that it works with?
Like what does this do and what are the parameters?
LineChart(df, fig, "segment", ["value"], init_params={"Data": "Steps"})

@nmkridler
Copy link
Contributor

nmkridler commented May 8, 2017

I need to revisit a chunk of the documentation, but this should still be applicable:
pxyley.charts.mg.line_chart

"segment" is the x-axis column name, ["value"] is a list of columns to plot on the y-axis. init_params will filter the dataframe where "Data" == "Steps".

@RohitJacob
Copy link
Author

@nmkridler the datapoints that highlight on hover are sequential, but its the in-betweens are really going for a twirl. Is there an aspect of the plot that I can control the "curvy-ness" of the graph?

@nmkridler
Copy link
Contributor

The wrapper I wrote is really simple, but it can be extended to pass arbitrary options. In the next version, I can make it possible to pass additional options such as the ones listed in their documentation.

I tried to override the options that get sent to the JavaScript bundle, but it looks like I have some sort of version mismatch. The only way to get around this is to build your own bundle. The tests folder can be used as an example, but I don't think it's very straightforward. Have you tried the plotly line plot?

@RohitJacob
Copy link
Author

Yes I've run all the examples and I'm using metricgraphics as a boilerplate. There are no problems with ordering of the x axis, its seems to be some stylistic function that's curving it a bit too much and unnecessarily

@nmkridler
Copy link
Contributor

After metrics-graphics 2.10, the interpolate option takes a function, so there's no way to change it without rebuilding the JavaScript bundle. The tests directory shows how to point to a different bundle, but building the JS bundle is not straightforward. I'll put this on the list of things to change for the next version.

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

2 participants