-
Notifications
You must be signed in to change notification settings - Fork 4
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 Cards #44
base: master
Are you sure you want to change the base?
Add Cards #44
Conversation
navneetrai
commented
Oct 31, 2020
- Added Charts as cards
README.md
Outdated
->chartModel(AppUser::class) | ||
->chartName('default') | ||
->width('1/2'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we indent these lines for better readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
README.md
Outdated
->chartModel(AppUser::class) | ||
->chartName('earnings') | ||
->width('1/2'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we indent these lines for better readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
README.md
Outdated
->chartModel(AppUser::class) | ||
->chartName('default') | ||
->settings([ | ||
'type' => 'bar', | ||
'titleProp' => 'name', | ||
'identProp' => 'id', | ||
'height' => 250, | ||
'indexColor' => '#999999', | ||
'color' => '#FF0000', | ||
'parameters' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], | ||
'options' => ['responsive' => true, 'maintainAspectRatio' => false], | ||
]) | ||
->width('1/2'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we indent these lines for better readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<chartjs-bar-chart v-if="isType('bar')" | ||
:dataset="comparisonDataset" | ||
:additionalDatasets="card.additionalDatasets" | ||
:settings="card.settings" | ||
:height="card.settings.height" | ||
:width="card.settings.width" | ||
/> | ||
<chartjs-line-chart v-else | ||
:dataset="comparisonDataset" | ||
:additionalDatasets="card.additionalDatasets" | ||
:settings="card.settings" | ||
:height="card.settings.height" | ||
:width="card.settings.width" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to use a dynamic component here since everything is the same except for the component itself? Maybe something along these lines:
<component :is="componentType" v-bind="options"></component>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvanscott This change is already a part of #41
Is it okay to handle it in that rebase?
Co-authored-by: David VanScott <[email protected]>
Co-authored-by: David VanScott <[email protected]>