Skip to content
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

Axis and renderer CSS Styling #598

Merged
merged 19 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
30 changes: 30 additions & 0 deletions chartfx-chart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<name>chartfx-chart</name>
<properties>
<project.moduleName>io.fair-acc.chartfx</project.moduleName>
<sass.version>1.64.2</sass.version>
<scss.inputDir>${project.basedir}/src/main/resources/io/fair_acc/chartfx/</scss.inputDir>
<css.outputDir>${scss.inputDir}</css.outputDir>
wirew0rm marked this conversation as resolved.
Show resolved Hide resolved
</properties>

<description>This charting library ${project.artifactId}- is an extension
Expand Down Expand Up @@ -93,5 +96,32 @@
<version>2.1.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin> <!-- Converts Sass files to CSS -->
<groupId>us.hebi.sass</groupId>
<artifactId>sass-cli-maven-plugin</artifactId>
<version>1.0.3</version>
<configuration>
<sassVersion>${sass.version}</sassVersion>
<args>
<arg>${scss.inputDir}:${css.outputDir}</arg>
<arg>--no-source-map</arg>
</args>
</configuration>
<executions>
<execution>
<id>sass-exec</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

Original file line number Diff line number Diff line change
@@ -1,61 +1,55 @@
@font-face {
font-family: 'fair-chart-icons';
src: url('fonts/fair-chart-icons.eot?yr8ymj');
src:
url('fonts/fair-chart-icons.eot?yr8ymj#iefix') format('embedded-opentype'),
url('fonts/fair-chart-icons.ttf?yr8ymj') format('truetype'),
url('fonts/fair-chart-icons.woff?yr8ymj') format('woff'),
url('fonts/fair-chart-icons.svg?yr8ymj#fair-chart-icons') format('svg');
font-family: "fair-chart-icons";
src: url("fonts/fair-chart-icons.eot?yr8ymj");
src: url("fonts/fair-chart-icons.eot?yr8ymj#iefix") format("embedded-opentype"), url("fonts/fair-chart-icons.ttf?yr8ymj") format("truetype"), url("fonts/fair-chart-icons.woff?yr8ymj") format("woff"), url("fonts/fair-chart-icons.svg?yr8ymj#fair-chart-icons") format("svg");
font-weight: normal;
font-style: normal;
font-display: block;
}

[class^="icon-"],
[class^=icon-],
[class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'fair-chart-icons' !important;
font-family: "fair-chart-icons" !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.icon-info_icon .path1::before {
content: "\49";
content: "I";
color: rgb(0, 0, 205);
}

.icon-info_icon .path2::before {
content: "\4a";
content: "J";
margin-left: -1em;
color: rgb(255, 255, 255);
}

.icon-warn_icon .path1::before {
content: "\57";
content: "W";
color: rgb(255, 215, 0);
}

.icon-warn_icon .path2::before {
content: "\58";
content: "X";
margin-left: -1.1376953125em;
color: rgb(0, 0, 0);
}

.icon-error_icon .path1::before {
content: "\45";
content: "E";
color: rgb(237, 28, 36);
}

.icon-error_icon .path2::before {
content: "\46";
content: "F";
margin-left: -1em;
color: rgb(255, 255, 255);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@font-face {
font-family: 'fair-chart-icons';
src: url('fonts/fair-chart-icons.eot?yr8ymj');
src:
url('fonts/fair-chart-icons.eot?yr8ymj#iefix') format('embedded-opentype'),
url('fonts/fair-chart-icons.ttf?yr8ymj') format('truetype'),
url('fonts/fair-chart-icons.woff?yr8ymj') format('woff'),
url('fonts/fair-chart-icons.svg?yr8ymj#fair-chart-icons') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}

[class^="icon-"],
[class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'fair-chart-icons' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.icon-info_icon .path1::before {
content: "\49";
color: rgb(0, 0, 205);
}

.icon-info_icon .path2::before {
content: "\4a";
margin-left: -1em;
color: rgb(255, 255, 255);
}

.icon-warn_icon .path1::before {
content: "\57";
color: rgb(255, 215, 0);
}

.icon-warn_icon .path2::before {
content: "\58";
margin-left: -1.1376953125em;
color: rgb(0, 0, 0);
}

.icon-error_icon .path1::before {
content: "\45";
color: rgb(237, 28, 36);
}

.icon-error_icon .path2::before {
content: "\46";
margin-left: -1em;
color: rgb(255, 255, 255);
}

.text {
-fx-font-family: "fair-chart-icons";
}
15 changes: 7 additions & 8 deletions chartfx-chart/src/main/resources/io/fair_acc/chartfx/chart.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
-fx-pref-width: 500px;
-fx-max-width: 4096px;
-fx-max-height: 4096px;

/* no padding by default */
-fx-padding: 0px;
}
Expand Down Expand Up @@ -79,7 +78,7 @@

.chart-series-line {
-fx-stroke-width: 1px;
-fx-effect: null;
-fx-effect: NULL;
}

.value-indicator-label {
Expand Down Expand Up @@ -134,12 +133,12 @@
.value-watch-indicator-marker {
-fx-stroke-width: 0.5;
-fx-stroke: black;
-fx-fill: #416ef4ff;
-fx-fill: #416ef4;
}

.range-indicator-rect {
-fx-stroke: transparent;
-fx-fill: #416ef468;
-fx-fill: rgba(65, 110, 244, 0.4078431373);
}

.chart-major-grid-lines {
Expand Down Expand Up @@ -180,13 +179,13 @@
}

.chart-alternative-column-fill {
-fx-fill: null;
-fx-stroke: null;
-fx-fill: NULL;
-fx-stroke: NULL;
}

.chart-alternative-row-fill {
-fx-fill: null;
-fx-stroke: null;
-fx-fill: NULL;
-fx-stroke: NULL;
}

.chart-vertical-zero-line,
Expand Down
Loading