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

Add expand charts dashboard #2096

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
fde91fb
add binary charts
Terdious Jun 3, 2024
43d9b8e
feat: Add expand functionality to chart component
Terdious Jun 3, 2024
c0aee17
fix: eslint and prettier
Terdious Jun 3, 2024
441e881
feat: Add column functionality to EditDashboard component
Terdious Jun 3, 2024
13230cc
fix: i18n, prettier and eslint
Terdious Jun 3, 2024
d977bc6
chore: Update EditDashboard component state handling and fix boxNotEm…
Terdious Jun 4, 2024
bdda5f7
fix: prettier
Terdious Jun 4, 2024
fc8bc79
fix: Fix bug in EditBoxColumns component
Terdious Jun 4, 2024
fcc9cd6
Merge branch 'master' into add-binary-chart
Terdious Jun 4, 2024
c8cf074
fix: Remove delete column button from translation files
Terdious Jun 4, 2024
31ade93
fix: Update German translation file
Terdious Jun 4, 2024
7cd2aa3
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Jun 4, 2024
df8c3ad
Merge branch 'master' into add-choice-number-columns-dashboard
Terdious Jun 4, 2024
62489dd
chore: Update y-axis label formatting in ApexChartTimelineOptions.js
Terdious Jun 6, 2024
4e014e9
fix: eslint
Terdious Jun 6, 2024
e240059
fix: Improve accessibility and styling of EditBoxColumns component
Terdious Jun 7, 2024
161e4c4
fix: Improve German translation for "Add a column on dashboard"
Terdious Jun 7, 2024
f59e389
fix: Improve column layout in EditBoxColumns component
Terdious Jun 7, 2024
4688e6a
fix: Update y-axis label formatting and x-axis min/max in ApexChartTi…
Terdious Jun 8, 2024
146dd19
fix: Improve column layout and accessibility in EditBoxColumns component
Terdious Jun 9, 2024
9df1bff
fix: prettier+eslint
Terdious Jun 10, 2024
b2e5663
fix: prettier
Terdious Jun 10, 2024
c6b55c9
refactor: reordered styles
Terdious Jun 10, 2024
7cda77a
fix: review non-useful code
Terdious Jun 10, 2024
db73645
fix: Update condition for checking values length in Chart.jsx
Terdious Jun 10, 2024
43ced17
fix: review me
Terdious Jun 10, 2024
51ed358
Merge remote-tracking branch 'origin/add-binary-chart' into add-zoom-…
Terdious Jun 10, 2024
3a922c8
Merge remote-tracking branch 'origin/add-zoom-charts-dashboard' into …
Terdious Jun 10, 2024
0d77b17
fix: Update height calculation in ApexChartComponent
Terdious Jun 10, 2024
ec5fd5a
Improve column layout and accessibility in EditBoxColumns component
Terdious Jun 12, 2024
0854ef0
Merge branch 'master' into add-binary-chart
Terdious Jun 12, 2024
a0bf86d
Merge branch 'master' into add-choice-number-columns-dashboard
Terdious Jun 12, 2024
1acf5a5
fix: prettier
Terdious Jun 12, 2024
ac8452d
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Jun 12, 2024
9e765e9
Merge branch 'add-binary-chart' into add-zoom-charts-dashboard
Terdious Jun 13, 2024
0c4a977
chore: Update height calculation in ApexChartComponent
Terdious Jun 13, 2024
89d1200
Merge branch 'master' into add-choice-number-columns-dashboard
Terdious Jun 13, 2024
f5a842e
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Jun 13, 2024
513a316
Merge branch 'master' into add-choice-number-columns-dashboard
Terdious Jun 13, 2024
68a7eec
fix: review
Terdious Jun 13, 2024
e170399
fix: review
Terdious Jun 13, 2024
0809b3b
fix: review delete mutationObserver and resizeObserver
Terdious Jun 13, 2024
57ca61d
refactor: review - EditBoxColumns component - delete position sticky
Terdious Jun 13, 2024
678ee43
refactor: remove position sticky from EditBoxColumns component and an…
Terdious Jun 17, 2024
786a4a9
fix: prettier
Terdious Jun 17, 2024
85e4754
Merge branch 'master' into add-binary-chart
Terdious Jun 17, 2024
7781260
fix: If select a binary device, then unselect it, then select a non-b…
Terdious Jun 17, 2024
d29a752
debug: add console.log to debug
Terdious Jun 17, 2024
2e94147
fix: On mobile, the popup is outside of the screen
Terdious Jun 17, 2024
f519dd4
fix: prettier + eslint (1 error for debug
Terdious Jun 17, 2024
a27ae0b
refactor: Limit the length of chart labels in ApexChartTimelineOptions
Terdious Jun 17, 2024
e7d8f32
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Jun 17, 2024
7ba0229
Merge branch 'GladysAssistant:master' into add-binary-chart
Terdious Aug 29, 2024
4bf2dea
update columns
Terdious Aug 29, 2024
c12f95a
Merge branch 'GladysAssistant:master' into add-choice-number-columns-…
Terdious Aug 29, 2024
594dbbb
Normalize all the line endings
Terdious Aug 30, 2024
2d61715
style: Remove unnecessary CSS properties in edit-dashboard style.css
Terdious Aug 30, 2024
925614c
style: Update EditBoxColumns class to include 'align-items-start'
Terdious Aug 30, 2024
815af8f
style: Update media query breakpoints in edit-dashboard style.css
Terdious Aug 30, 2024
05ab42b
Merge branch 'GladysAssistant:master' into add-zoom-charts-dashboard
Terdious Aug 30, 2024
9e30e4c
style: Add min-width to columnBoxHeader in edit-dashboard style.css
Terdious Aug 30, 2024
47a3d8d
refactor(chart): Update date format in ApexChartComponent
Terdious Aug 30, 2024
8343bfe
feat: Add support for start_date and end_date in device feature aggre…
Terdious Sep 2, 2024
f073b5a
feat: Add support for start_date and end_date in device feature aggre…
Terdious Sep 2, 2024
e799d63
chore(chart): Update y-axis label positioning in ApexChartTimelineOpt…
Terdious Sep 2, 2024
b731728
chore(chart): Update y-axis label positioning in ApexChartTimelineOpt…
Terdious Sep 3, 2024
cebce56
feat(chart): Add support for selecting device features and loading ch…
Terdious Sep 3, 2024
e4d56cc
Merge pull request #9 from Terdious/add-choice-number-columns-dashboard
Terdious Sep 4, 2024
0da901a
Merge pull request #8 from Terdious/add-binary-chart
Terdious Sep 4, 2024
ead8043
chore(chart): Update y-axis label positioning in ApexChartTimelineOpt…
Terdious Sep 4, 2024
fcb647c
Merge pull request #10 from Terdious/add-binary-chart
Terdious Sep 4, 2024
d87a44b
Merge branch 'add-binary-chart' into add-zoom-charts-dashboard
Terdious Sep 4, 2024
ec8e8bc
feat(chart): Improve y-axis label positioning in ApexChartTimelineOpt…
Terdious Sep 4, 2024
aa5b29b
Merge branch 'test-news-chart-and-expand' into add-zoom-charts-dashboard
Terdious Sep 4, 2024
61e25ef
fix(chart): Set default start and end dates in Chartbox component
Terdious Sep 5, 2024
296c89a
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Sep 30, 2024
dc101fe
fix: Fix rendering issue in ApexChartComponent
Terdious Sep 30, 2024
1de3752
Merge branch 'master' into add-zoom-charts-dashboard
Terdious Oct 7, 2024
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
2 changes: 2 additions & 0 deletions front/src/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import SignupSuccess from '../routes/signup/5-success';
import Dashboard from '../routes/dashboard';
import NewDashboard from '../routes/dashboard/new-dashboard';
import EditDashboard from '../routes/dashboard/edit-dashboard';
import ExpandedDashboard from '../routes/dashboard/expanded-dashboard';

import IntegrationPage from '../routes/integration';
import ChatPage from '../routes/chat';
Expand Down Expand Up @@ -230,6 +231,7 @@ const AppRouter = connect(
<Dashboard path="/dashboard" />
<Dashboard path="/dashboard/:dashboardSelector" />
<EditDashboard path="/dashboard/:dashboardSelector/edit" />
<ExpandedDashboard path="/dashboard/:dashboardSelector/expanded/:x/:y" />
<NewDashboard path="/dashboard/create/new" />
<IntegrationPage path="/dashboard/integration" />

Expand Down
4 changes: 2 additions & 2 deletions front/src/components/boxs/chart/ApexChartBarOptions.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const getApexChartBarOptions = ({ displayAxes, series, colors, locales, defaultLocale }) => {
const getApexChartBarOptions = ({ displayAxes, height, series, colors, locales, defaultLocale }) => {
const options = {
chart: {
locales,
defaultLocale,
type: 'bar',
fontFamily: 'inherit',
height: displayAxes ? 200 : 100,
height,
parentHeightOffset: 0,
toolbar: {
show: false
Expand Down
28 changes: 17 additions & 11 deletions front/src/components/boxs/chart/ApexChartComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,19 @@ class ApexChartComponent extends Component {
return createTooltipContent(opts, startDate, endDate);
};
}
options.tooltip.custom = function(opts) {
options.tooltip.custom = function (opts) {
return formatter_custom(opts);
};
}
getBarChartOptions = () => {
let height;
if (this.props.size === 'big' && !this.props.display_axes) {
height = 100 + this.props.additionalHeight;
} else {
height = 200 + this.props.additionalHeight;
}
const options = getApexChartBarOptions({
height,
displayAxes: this.props.display_axes,
series: this.props.series,
colors: mergeArray(this.props.colors, DEFAULT_COLORS),
Expand All @@ -116,11 +123,11 @@ class ApexChartComponent extends Component {
getAreaChartOptions = () => {
let height;
if (this.props.size === 'small' && !this.props.display_axes) {
height = 40;
height = 40 + this.props.additionalHeight;
} else if (this.props.size === 'big' && !this.props.display_axes) {
height = 80;
height = 80 + this.props.additionalHeight;
} else {
height = 200;
height = 200 + this.props.additionalHeight;
}
const options = getApexChartAreaOptions({
height,
Expand All @@ -137,11 +144,11 @@ class ApexChartComponent extends Component {
getLineChartOptions = () => {
let height;
if (this.props.size === 'small' && !this.props.display_axes) {
height = 40;
height = 40 + this.props.additionalHeight;
} else if (this.props.size === 'big' && !this.props.display_axes) {
height = 80;
height = 80 + this.props.additionalHeight;
} else {
height = 200;
height = 200 + this.props.additionalHeight;
}
const options = getApexChartLineOptions({
height,
Expand All @@ -157,11 +164,11 @@ class ApexChartComponent extends Component {
getStepLineChartOptions = () => {
let height;
if (this.props.size === 'small' && !this.props.display_axes) {
height = 40;
height = 40 + this.props.additionalHeight;
} else if (this.props.size === 'big' && !this.props.display_axes) {
height = 80;
height = 80 + this.props.additionalHeight;
} else {
height = 200;
height = 200 + this.props.additionalHeight;
}
const options = getApexChartStepLineOptions({
height,
Expand Down Expand Up @@ -214,7 +221,6 @@ class ApexChartComponent extends Component {
this.chart.updateOptions(options);
} else {
this.chart = new ApexCharts(this.chartRef.current, options);

this.chart.render();
}
};
Expand Down
Loading
Loading