-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 style for line charts #876
Comments
It should also support different marker styles to overlay on the line, similar to matlab, matplotlib, etc. Ie, small dots, asterisks, plus, circle, box, etc etc. |
It should also support a way to control the size of said markers, and the lines |
is there any workaround? |
you can make series dashed with stroke-dasharray property with css |
@comfortme thanks for the tip. I'm just looking to style a line completely as dashed, but if I have a series of 4 lines and need only one of them to be dashed which selector would I use to have stroke-dasharray applied to that specific line I want dashed? I'd like to something like below, but I have no way (at least that I know of) to target the specific line. And ideas? Thanks!
|
hmm :nth-child maybe? |
@jrhite Any update on this? |
I used a combination of the two tips given to me above,
|
@jrhite where did you put that css to change the line chart ? |
I used a similar css approach for getting other shapes besides circles in the bubble chart, but it still feels very hacky (partially because we can't target these components with the component css, since it's outside the angular css scope). Seems like a very common requirement to be able to add a css class to lines or points in a series, seems like this could really be a powerful change that could enable a lot more chart flexibility- @lukekroon I had to put it in the global scss file, since otherwise it can't target these components outside of the angular component scope- |
Any update on setting just a portion of the line data as "dashed"? or any workaround available for this task? |
Hai, |
@JUBINBIJU yes, in the global style.scss - "I had to put it in the global scss file" - #876 (comment) |
@chriszrc I added it in style.scss but still the chart remains the same. What might be the possible issue? <ngx-charts-line-chart [view]="[500, 400]" [results]="lineChartDataset" [xAxisLabel]="'x-axis'" [yAxisLabel]="'y-axis'" [legend]="true" [showXAxisLabel]="true" [showYAxisLabel]="true" [xAxis]="true" [yAxis]="true"> |
@JUBINBIJU add a codesandbox, impossible to tell without it, you can start off something like this - https://codesandbox.io/s/angular-ngx-charts-e7hx2 |
I'm submitting a ... (check one with "x")
ngx-charts
tag) or the gitter chat for support questionsCurrent behavior
Line charts (as far as i could see) has only one default appearance for every line (continuous)
Expected behavior
Would be nice to be able to set line appearance to something like "dashed" or similar, bonus points for setting just a portion of the data as "dashed"
What is the motivation / use case for changing the behavior?
Have a better visual of the resulting chart, for example to recognize real values against estimated values.
Something like this: http://www.andypope.info/ngs/ng45.gif
The text was updated successfully, but these errors were encountered: