Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.0] - 2021-01-31
### Added
- tag matches for struct Axis : allow for synchronisation between subplots on x-axis
- fn matches in impl of Axis

## [0.6.0] - 2020-xx-xx
### Added
Expand Down Expand Up @@ -46,7 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.4.1] - 2020-03-26
### Fixed
- Added error message to capture the scenario when there is no default browser (or no browser at all) on a machine.
- Added error message to capture the scenario when there is no default browser (or no browser at all) on a machine.
The message suggests a few alternatives.

## [0.4.0] - 2020-02-27
Expand All @@ -66,10 +70,10 @@ The message suggests a few alternatives.
- `TraceSerialize` renamed to `Trace`
- `Plot::show_jpg` renamed to `Plot::show_jpeg` for consistency
- Removed HexColor type. Hex color input is still supported using `String`s or string slices
- Refactored project structure:
- Refactored project structure:
- All plots `Trace`s are now accessible from the main namespace `plotly::`.
- Enums and structs common to more than 1 plot type and/or the `Layout` now live in `plotly::common::`
- Internal methods and structs that are not considered part of the public API are now in `plotly::private::`
- Internal methods and structs that are not considered part of the public API are now in `plotly::private::`

### Fixed
- Color serialization was operating correctly only on Rgb, Rgba and Hex colors ignoring the named colors
Expand All @@ -84,7 +88,7 @@ The message suggests a few alternatives.
- Box plot
- Scatter and Box plot with error bars
- Candlestick plot
- OHLC plot
- OHLC plot
- Extended README.md with a few basic examples
- The API is now based on the builder pattern
- Extended color set
Expand Down Expand Up @@ -119,4 +123,4 @@ The message suggests a few alternatives.
## [0.1.0] - 2020-01-26
### Added
- Placeholder repository.
- Proof of concept implementation of a scatter plot.
- Proof of concept implementation of a scatter plot.
10 changes: 10 additions & 0 deletions plotly/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,9 @@ pub struct Axis {
#[serde(skip_serializing_if = "Option::is_none")]
dtick: Option<f64>,

#[serde(skip_serializing_if = "Option::is_none")]
matches: Option<String>,

#[serde(skip_serializing_if = "Option::is_none", rename = "tickvals")]
tick_values: Option<Vec<f64>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "tick_text")]
Expand Down Expand Up @@ -839,6 +842,13 @@ impl Axis {
Default::default()
}

pub fn matches(mut self, matches : bool) -> Axis {
if matches {
self.matches = Some(String::from("x"));
}
self
}

pub fn visible(mut self, visible: bool) -> Axis {
self.visible = Some(visible);
self
Expand Down