-
Notifications
You must be signed in to change notification settings - Fork 720
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
Hide axes lines and labels? Legends - enable and disable? Option to disable the dots(data points)? #195
Comments
Please help me with this. |
Also, is there a way to take 100% of the entire width. I do not see an option to pass the width as 100%. Or is there a way? Since the doc says, mention the width and height in pixels. Still haven't received a reply to this ticket - and the previous issues. |
Also, take a look at these 3 graphs. But when the values are in the range of 1000's or 10,000's the graph would simply add too much of y-axis labels. Why so? The logic for y-axis labels should be based on the data-points and it's values. And not on the ranges of values. Or maybe a combination of both. |
Hey @anishnair02, sorry for reviving a dead issue. You can remove the axis lines with CSS. The /* x axis */
.frappe-chart .x.axis .line-vertical {
display: none;
}
/* y axis */
.frappe-chart .y.axis .line-horizontal {
display: none;
} If you want to remove the numbers on the y-axis, just add a .frappe-chart .y.axis .line-horizontal,
.frappe-chart .y.axis .line-horizontal text {
display: none;
} Legend is removed with: .frappe-chart .legend {
display: none;
} However, I haven't been able to solve how to expand the chart now that values are missing. |
@moso Your solution above worked for removing the lines from the chart, but it didn't remove the numbers along the axes. I had to do the following to completely remove all the lines and labels: /* x axis */
.frappe-chart .x.axis .line-vertical,
.frappe-chart .x.axis text {
display: none;
}
/* y axis */
.frappe-chart .y.axis .line-horizontal,
.frappe-chart .y.axis text {
display: none;
} I noticed that the line and the text were siblings in the DOM tree, so I just removed the .line-horiz/vert from the path to the |
This is a feature many have requested. And we see the need for such chart even in other projects we build. We'll implement this in v2 for sure |
Thanks @scmmishra! Looking forward to v2. In the meantime, have you any suggestion to make the chart full width without the axises? |
still no way to disable chart-legend properly? |
x-axis values show like dots, is this possible to disable ? |
new Chart("#chart",{
lineOptions: { hideDots: 1 }, // to get rid of the dots on the lines
axisOptions: { xIsSeries: true }, // show fewer labels when there are many
data : {
labels: ["1","2","3","4","5"],
datasets:[
{ name:"first set", values:[0,1, 2, 1, 0] },
{ name:"second set", values:[1, 2, 1, 0, 1] },
],
},
}) |
Expected Behaviour
I do not see the option to hide the x and y-axis lines and labels.
I want the chart to be full-width without the axes lines and labels and ticks, just the chart.
Also, is there an option to enable the legends?
I would also want to hide the dots(data points) and show it only when I hover on it.
Also, is there an option to smoothen the curves once the data points are hidden, rather than showing it as pointed(and edgy)?
Actual Behaviour
Please check the attached screenshot.
Steps to Reproduce:
NOTE: Have attached a screenshot of how it is right now and how I want it to be.
Frappé Charts version: v1.1.0
The text was updated successfully, but these errors were encountered: