-
-
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
Feature Request: Reports use attribute "Web: Report Color" to display lines #1238
Comments
My solution to this is In CombinedReportsPage.jsx
and modify MapRoutePath as :
then in MapRoutePath.js: Modify this line to add color1
construct variable as:
Add the color property as follows:
|
where is deviceColor defined? |
@DanielNagy Apologies for missing this, I did it as :
` the getColorForDevice() function is given in my previous comment. I would have posted the whole file for ease of use, but I modified some other parameters and tried to give code that can be easily added to the original file instead |
Great, I did do something smilar in the end. For others following along, github broke the formatting above, here is a fixed version.
Now to work out how to add Ant path function, instead of arrows to indicate direction. |
Hello @DanielNagy, please were you able to implement this?
|
Hi @DanielNagy and @michalis97500 . Sorry, newbie questions: |
Sorry, I'm an idiot. I see the correct useEffect in MapRoutePath.js to change. |
@Amc-101 Hope im not too late in answering, those files were the only changes. Unfortunately I don't have the files anymore as I have overwritten them with the newer updates... I moved to generating the reports in another way via accessing the DB directly |
@michalis97500 - thanks for replying. That's a shame about the overwrites but maybe you remember (even roughly) where the deviceColor definition fits? eg the block that starts with: I tried replacing the original items.map call to 'MapRouteCoordinates' in CombinedReportPage.jsx because I couldn't see any better place to try but that doesn't seem to be it. I think it's the only bit I haven't sorted. |
I'm always frustrated when trying to produce reports of several vehicles at the same time. All lines are drawn with the same blue color and thus distinguishing routes of different vehicles becomes extremely difficult
Each vehicle can get the color from its attribute as a way to display the routes in the reports.
No alternatives to this. The data must be exported, analyzed and plotted manually (maybe by python?) which defeats the purpose of the reports
The text was updated successfully, but these errors were encountered: