Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Added marker icon customization option (#53) #55

Closed
wants to merge 1 commit into from
Closed

Added marker icon customization option (#53) #55

wants to merge 1 commit into from

Conversation

tpachmann
Copy link
Contributor

Hi guys!

As promised in issue #53, I've been working on an easier way to customize the marker icons directly in the Grafana dashboard.
The changes introduce the functionality to adjust the global and point-specific marker styles without the need to rebuild the plugin (for a full explanation of the feature, please refer to my changes to the README.md):

marker-style-config-specific

Here's my (more or less) detailed list of changes:

  • Added grouping for config options (General, Markers, Ant Path, Heat):
    grouped-config

  • Migrated to SVG icon (now defined inline with fully customizable color)

  • Added config options for default (primary) & secondary marker icons:
    marker-style-config-global

  • Usage of useMemo for createMarkers to improve performance

  • Fixed invalid colors for Ant Paths (now using hex colors instead of the unsupported color names from Grafana)

Once again, feedback is highly appreciated :)

Best regards!
Tim

@xkilian
Copy link

xkilian commented Apr 7, 2021

@tpachmann How does this related to the WIP in #51 for multiple tracks which included :

  • Custom SVG Markers for different timeseries by label value
  • Custom AntPath colours for different timeseries by label value

From what I understand, what you are implementing is a little different than associating Custom SVG markers with label values. Using labels is really how I envisioned to differentiate dynamically types of devices (cars/buses/people/base stations/etc.)?

@tpachmann
Copy link
Contributor Author

Hi @xkilian,

first of all thanks for your feedback!

The main idea behind these changes was a simple option to change the default marker icon and its color - I've added the point-specific overwrites to the styles just for the case that someone wants to style a few of the markers differently than the rest.
Tbh, I didn't really have the "multiple tracks" idea in my head and therefore actually missed out on the related work that has already been done in #51..

So this PR might indeed be kind of a duplicate to @eh-steve's approach in his draft (great work btw!) - the implementation for point-specific overwrites via labels is also a better idea than getting it directly from the data.

As #51 is still WIP and I don't really know the progress of it: Should I close this PR as a duplicate or adjust it to use the proposed label structure as an iterim solution?

@eh-steve
Copy link

eh-steve commented Apr 8, 2021

I am planning to finish off my PR as soon as I get a chance but the code is pretty much done (just need README updates and adding example configs/screenshots). If you want to make any changes to that PR, feel free

@tpachmann
Copy link
Contributor Author

Closing this PR due to existing related work in #51.

@tpachmann tpachmann closed this Apr 19, 2021
@j-or j-or mentioned this pull request Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants