An open API service indexing awesome lists of open source software.

https://github.com/mark194/qplotmarker

**QPlotMarker** – an interactive marker for **QChart** (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.
https://github.com/mark194/qplotmarker

chart cpp cpp17 data-plotting data-visualization interactive-graphs markers plotting qplotmarker qt qt5 qt5-chart qt6 qt6-app qtcharts realtime-plotting scientific-plotting svg

Last synced: 5 months ago
JSON representation

**QPlotMarker** – an interactive marker for **QChart** (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.

Awesome Lists containing this project

README

          

# qplotmarker


Баннер проекта

**QPlotMarker** – an interactive marker for **QChart** (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.

# Install
You must have installed [project dependencies](https://github.com/Mark194/qplotmarker#dependencies)

1. Clone repository

```git clone https://github.com/Mark194/qplotmarker```

2. Go to directory

```cd qplotmarker```

3. Create and go to the build directory

```mkdir build```

```cd build```

4. Project configuration via CMake

```cmake ..```

If you need to specify a specific generator, use

```cmake -G "Visual Studio 17 2022" ..```

If you want to configure the library as static, add the option

```-DBUILD_SHARED_LIBS=OFF```

5. Build project

```cmake --build .```

6. Installing the library into the system

```cmake --install .```

By default, installation goes to /usr/local/ on Linux/macOS or C:\Program Files (x86)\ on Windows. To change the path, specify

```-DCMAKE_INSTALL_PREFIX=/your/path ```

[Library releases]: https://github.com/Mark194/qplotmarker/releases

# Integration

## QMake Integration

### 1. Add include path
INCLUDEPATH += $$PWD/thirdparty/qplotmarker/include

### 2. Link static library
LIBS += -L$$PWD/thirdparty/qplotmarker/lib -lqplotmarker

### OR compile sources directly (if needed)
SOURCES += $$PWD/thirdparty/qplotmarker/src/*.cpp
HEADERS += $$PWD/thirdparty/qplotmarker/include/*.h

## CMake Integration

### Method 1: Using find_package (Recommended if installed system-wide)

```cmake```

```find_package(qplotmarker REQUIRED)```

```target_link_libraries(your_target PRIVATE qplotmarker::qplotmarker)```

### Method 2: Manual configuration (For custom locations)

```
# For header files

target_include_directories(your_target PRIVATE
path/to/qplotmarker/include
)

# For static library
target_link_libraries(your_target PRIVATE
path/to/qplotmarker/lib/libqplotmarker.a
)

# Or for shared library
target_link_libraries(your_target PRIVATE
path/to/qplotmarker/lib/libqplotmarker.so
```

### Method 3: Using FetchContent (For direct GitHub integration)

```
include(FetchContent)
FetchContent_Declare(
qplotmarker
GIT_REPOSITORY https://github.com/Mark194/qplotmarker.git
GIT_TAG v1.0.0
)
FetchContent_MakeAvailable(qplotmarker)
target_link_libraries(your_target PRIVATE qplotmarker)
```

# Support
If you have any difficulties or questions about using the package, create a
[discussion](https://github.com/Mark194/qplotmarker/issues/new/choose) in this repository or write to email

# Dependencies

- **Qt Core**: Version **5.15.2+** or **6.4.2+**
- **Required Modules**:
- `QtCharts` (for plotting functionality)
- `QtSvg` (for SVG support)
- **Compiler**:
- Qt5: GCC 7+, Clang 6+, MSVC 2017 (v19.16+)
- Qt6: GCC 9+, Clang 10+, MSVC 2019 (v19.28+)
- **Additional Notes**:
- On Windows: MSVC is recommended (MinGW may have issues with QtCharts)
- On macOS: Xcode 12+ required for Qt6
- On Linux: Install `libgl1-mesa-dev` and other development tools

Found compatibility issues? Please report in [Issues](https://github.com/Mark194/qplotmarker/issues).

# Examples

Ready-to-use code examples are available in the [examples](https://github.com/Mark194/qplotmarker/tree/main/examples) folder. These demonstrate:
- Basic usage of plotting functionality
- Advanced marker customization
- Integration with Qt widgets

## Visual Examples
| Miniature | Description |
|-----------|----------|
| ![Full size](screenshots/base_example.png) | **Base Example**
|
| ![Full size](screenshots/qplotmarker_distance.png) | **PlotMarker Distance**
Coord difference between markers |

# Special Thanks

We would like to express our special gratitude to **[ShonZelno](https://github.com/ShonZelno)** for their valuable contributions to this project, including:
- Active participation in development and testing
- Suggesting innovative ideas and improvements
- Helping to identify and fix critical issues

Your involvement made this library significantly better!