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

Added app builder configuration for "show legend" to toggle display o… #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion force-app/main/default/lwc/chartBuilder/chartBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</template>
<c-legend
position={legendPosition}
display={showLegend}
label-fontfamily="'Salesforce Sans', Arial, sans-serif"
label-fontcolor="rgb(8, 7, 7)"
></c-legend>
Expand Down Expand Up @@ -67,4 +68,4 @@ <h3 class="slds-text-heading_medium slds-text-color_error">
</div>
</template>
</div>
</template>
</template>
5 changes: 4 additions & 1 deletion force-app/main/default/lwc/chartBuilder/chartBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export default class ChartBuilder extends LightningElement {
@api
legendPosition;

@api
showLegend;

@api
colorPalette = 'default';

Expand Down Expand Up @@ -261,4 +264,4 @@ export default class ChartBuilder extends LightningElement {
static FAKE_ID = 'xxxxxxxxxxxxxxx';
static SOQL_DATA_PROVIDER_APEX_TYPE = 'SOQLDataProvider';
static DEFAULT_CSS_CLASS = 'slds-card slds-p-around_small';
}
}
16 changes: 16 additions & 0 deletions force-app/main/default/lwc/chartBuilder/chartBuilder.js-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@
type="String"
datasource="top,bottom,right,left"
/>
<property
name="showLegend"
label="Show Legend"
description="Toggle display of the legend on or off"
required="false"
default="true"
type="Boolean"
/>
<property
name="styleCss"
label="CSS Style"
Expand Down Expand Up @@ -144,6 +152,14 @@
type="String"
datasource="top,bottom,right,left"
/>
<property
name="showLegend"
label="Show Legend"
description="Toggle display of the legend on or off"
required="false"
default="true"
type="Boolean"
/>
<property
name="styleCss"
label="CSS Style"
Expand Down